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

Submitted by Paul B Mahol on May 1, 2018, 7:39 p.m.

Details

Message ID 20180501194013.9552-9-onemda@gmail.com
State New
Headers show

Commit Message

Paul B Mahol May 1, 2018, 7:39 p.m.
Add .color_range field to encoder's AVCodec struct.

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

Patch hide | download patch | download mbox

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 81f3865ea6..371be3ea63 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1430,5 +1430,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,
 };