[FFmpeg-devel] [PATCH 7/7] Handle AVID MJPEG streams directly in the MJPEG decoder.

Anton Khirnov anton at khirnov.net
Sun Dec 13 11:44:47 EET 2020


Quoting James Almer (2020-12-13 01:17:52)
> On 12/12/2020 12:45 PM, Anton Khirnov wrote:
> > AVID streams, currently handled by the AVRN decoder can be (depending on
> > extradata contents) either MJPEG or raw video. To decode the MJPEG
> > variant, the AVRN decoder currently instantiates a MJPEG decoder
> > internally and forwards decoded frames to the caller (possibly after
> > cropping them).
> > 
> > This is suboptimal, because the AVRN decoder does not forward all the
> > features of the internal MJPEG decoder, such as direct rendering.
> > Handling such forwarding in a full and generic manner would be quite
> > hard, so it is simpler to just handle those streams in the MJPEG decoder
> > directly.
> > 
> > The AVRN decoder, which now handles only the raw streams, can now be
> > marked as supporting direct rendering.
> > 
> > This also removes the last remaining internal use of the obsolete
> > decoding API.
> > ---
> >   libavcodec/avrndec.c  | 74 ++-----------------------------------------
> >   libavcodec/mjpegdec.c | 11 +++++++
> >   libavcodec/version.h  |  2 +-
> >   libavformat/avidec.c  |  6 ++++
> >   libavformat/isom.c    |  2 +-
> >   libavformat/version.h |  2 +-
> >   tests/fate/video.mak  |  2 +-
> >   7 files changed, 23 insertions(+), 76 deletions(-)
> > 
> > diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c
> > index d85e3c2000..a80851cefa 100644
> > --- a/libavcodec/avrndec.c
> > +++ b/libavcodec/avrndec.c
> > @@ -21,13 +21,10 @@
> >   
> >   #include "avcodec.h"
> >   #include "internal.h"
> > -#include "mjpeg.h"
> > -#include "mjpegdec.h"
> 
> You can probably also remove the jpegtables dep in configure and the 
> mjpegdec.o entry in Makefile for the avrn decoder.

Right, done that locally.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list