[FFmpeg-devel] [PATCH 4/4] mjpeg: Use profile names in the encoder and decoder

Vittorio Giovara vittorio.giovara at gmail.com
Mon Nov 5 19:26:14 EET 2018


On Fri, Nov 2, 2018 at 5:29 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2018-11-02 20:35 GMT+01:00, Vittorio Giovara <vittorio.giovara at gmail.com>:
> > ---
> >  libavcodec/codec_desc.c | 1 +
> >  libavcodec/mjpegdec.c   | 2 ++
> >  libavcodec/profiles.c   | 9 +++++++++
> >  libavcodec/profiles.h   | 1 +
> >  libavcodec/version.h    | 2 +-
> >  5 files changed, 14 insertions(+), 1 deletion(-)
>
> How does this patch affect the encoder?
>

sorry forgot to fold in these changes

diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index d2fcb8e191..0ea7bd3d10 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -38,6 +38,7 @@
 #include "mpegvideo.h"
 #include "mjpeg.h"
 #include "mjpegenc.h"
+#include "profiles.h"

 static int alloc_huffman(MpegEncContext *s)
 {
@@ -418,6 +419,7 @@ AVCodec ff_mjpeg_encoder = {
         AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P,
AV_PIX_FMT_NONE
     },
     .priv_class     = &mjpeg_class,
+    .profiles       = NULL_IF_CONFIG_SMALL(ff_mjpeg_profiles),
 };
 #endif

-- 
Vittorio


More information about the ffmpeg-devel mailing list