[FFmpeg-devel] [PATCH 11/23] avcodec/mjpegenc: add support for non-YUVJ formats
Paul B Mahol
onemda at gmail.com
Tue Dec 12 15:56:09 EET 2017
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/mjpegenc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index d2fcb8e191..4824406bcb 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -415,8 +415,10 @@ AVCodec ff_mjpeg_encoder = {
.close = ff_mpv_encode_end,
.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY,
.pix_fmts = (const enum AVPixelFormat[]) {
+ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P,
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE
},
+ .color_ranges = (const enum AVColorRange[]){AVCOL_RANGE_JPEG, -1},
.priv_class = &mjpeg_class,
};
#endif
@@ -439,8 +441,9 @@ AVCodec ff_amv_encoder = {
.encode2 = amv_encode_picture,
.close = ff_mpv_encode_end,
.pix_fmts = (const enum AVPixelFormat[]) {
- AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE
+ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE
},
+ .color_ranges = (const enum AVColorRange[]){AVCOL_RANGE_JPEG, -1},
.priv_class = &amv_class,
};
#endif
--
2.11.0
More information about the ffmpeg-devel
mailing list