[FFmpeg-devel] [PATCH] avcodec/jpeglsdec: Don't allocate+free JPEGLSState for every frame
Michael Niedermayer
michael at niedermayer.cc
Tue Apr 20 18:34:00 EEST 2021
On Wed, Apr 14, 2021 at 11:21:40PM +0200, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
> libavcodec/jpeglsdec.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
[...]
> @@ -548,7 +548,7 @@ AVCodec ff_jpegls_decoder = {
> .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"),
> .type = AVMEDIA_TYPE_VIDEO,
> .id = AV_CODEC_ID_JPEGLS,
> - .priv_data_size = sizeof(MJpegDecodeContext),
> + .priv_data_size = sizeof(JpegLSDecodeContext),
> .init = ff_mjpeg_decode_init,
> .close = ff_mjpeg_decode_end,
Sorry for not spotting this before it was applied but this feels problematic
a mjpeg could contain jpeg-ls
in fact iam pretty sure you can mix lossless and lossy coding in a single jpeg
image. Not sure if there is something in jpeg-ls that would prevent it from
being part of the mix.
I think its easier/more robust if the same context type would be used
Thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210420/8fa53aa2/attachment.sig>
More information about the ffmpeg-devel
mailing list