[FFmpeg-devel] [PATCH 08/24] avcodec/proresenc: prores supports limited color range only

Paul B Mahol onemda at gmail.com
Wed Dec 13 12:59:24 EET 2017


Add .color_range field to encoder's AVCodec struct.

Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/proresenc_anatoliy.c | 2 ++
 libavcodec/proresenc_kostya.c   | 1 +
 2 files changed, 3 insertions(+)

diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 0516066163..cb86d2df44 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -611,6 +611,7 @@ AVCodec ff_prores_aw_encoder = {
     .close          = prores_encode_close,
     .encode2        = prores_encode_frame,
     .pix_fmts       = (const enum AVPixelFormat[]){AV_PIX_FMT_YUV422P10, AV_PIX_FMT_NONE},
+    .color_ranges   = (const enum AVColorRange[]){AVCOL_RANGE_MPEG, AVCOL_RANGE_UNSPECIFIED},
     .capabilities   = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY,
     .profiles       = profiles
 };
@@ -625,6 +626,7 @@ AVCodec ff_prores_encoder = {
     .close          = prores_encode_close,
     .encode2        = prores_encode_frame,
     .pix_fmts       = (const enum AVPixelFormat[]){AV_PIX_FMT_YUV422P10, AV_PIX_FMT_NONE},
+    .color_ranges   = (const enum AVColorRange[]){AVCOL_RANGE_MPEG, AVCOL_RANGE_UNSPECIFIED},
     .capabilities   = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY,
     .profiles       = profiles
 };
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 149dc81b3c..807f9c9c84 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1367,5 +1367,6 @@ AVCodec ff_prores_ks_encoder = {
                           AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
                           AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_NONE
                       },
+    .color_ranges   = (const enum AVColorRange[]){ AVCOL_RANGE_MPEG, AVCOL_RANGE_UNSPECIFIED },
     .priv_class     = &proresenc_class,
 };
-- 
2.11.0



More information about the ffmpeg-devel mailing list