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

Submitted by Vittorio Giovara on Nov. 5, 2018, 5:26 p.m.

Details

Message ID CABLWnS_wb_y8y2XkV-Rnt_Tnw=BCzHUeQ_XXqbPGMkcQVhBu4w@mail.gmail.com
State New
Headers show

Commit Message

Vittorio Giovara Nov. 5, 2018, 5:26 p.m.
On Fri, Nov 2, 2018 at 5:29 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

> 2018-11-02 20:35 GMT+01:00, Vittorio Giovara <vittorio.giovara@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

Patch hide | download patch | download mbox

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