[FFmpeg-cvslog] avcodec/prores_metadata_bsf: add smpte2084 format support

Limin Wang git at videolan.org
Sun May 3 01:45:54 EEST 2020


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Mon Nov  4 19:10:00 2019 +0800| [2d17f43fe1958de338530c0b03b8d5de397a8e72] | committer: Limin Wang

avcodec/prores_metadata_bsf: add smpte2084 format support

It's based on the following specs:
RDD 36:2015 - SMPTE Registered Disclosure Doc - Apple ProRes Bitstream Syntax and Decoding Process

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d17f43fe1958de338530c0b03b8d5de397a8e72
---

 doc/bitstream_filters.texi       | 2 ++
 libavcodec/prores_metadata_bsf.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
index 8fe5b3ad75..e2de4fd4ed 100644
--- a/doc/bitstream_filters.texi
+++ b/doc/bitstream_filters.texi
@@ -589,6 +589,8 @@ Keep the same transfer characteristics property (default).
 @item unknown
 @item bt709
 BT 601, BT 709, BT 2020
+ at item smpte2084
+SMPTE ST 2084
 @end table
 
 
diff --git a/libavcodec/prores_metadata_bsf.c b/libavcodec/prores_metadata_bsf.c
index 0510d3520a..24615e9305 100644
--- a/libavcodec/prores_metadata_bsf.c
+++ b/libavcodec/prores_metadata_bsf.c
@@ -140,10 +140,11 @@ static const AVOption options[] = {
     {"smpte431",                        NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_SMPTE431},     INT_MIN, INT_MAX, FLAGS, "color_primaries"},
     {"smpte432",                        NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_SMPTE432},     INT_MIN, INT_MAX, FLAGS, "color_primaries"},
 
-    {"color_trc", "select color transfer", OFFSET(transfer_characteristics), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_TRC_BT709, FLAGS, "color_trc"},
+    {"color_trc", "select color transfer", OFFSET(transfer_characteristics), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_TRC_NB, FLAGS, "color_trc"},
     {"auto", "keep the same color transfer",  0, AV_OPT_TYPE_CONST, {.i64=-1},                               INT_MIN, INT_MAX, FLAGS, "color_trc"},
     {"unknown",                        NULL,  0, AV_OPT_TYPE_CONST, {.i64=0},                                INT_MIN, INT_MAX, FLAGS, "color_trc"},
     {"bt709",                          NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_TRC_BT709},                  INT_MIN, INT_MAX, FLAGS, "color_trc"},
+    {"smpte2084",                      NULL,  0, AV_OPT_TYPE_CONST, {.i64=AVCOL_TRC_SMPTE2084},              INT_MIN, INT_MAX, FLAGS, "color_trc"},
 
     {"colorspace", "select colorspace", OFFSET(matrix_coefficients), AV_OPT_TYPE_INT, {.i64=-1}, -1,  AVCOL_SPC_BT2020_NCL, FLAGS, "colorspace"},
     {"auto", "keep the same colorspace",  0, AV_OPT_TYPE_CONST, {.i64=-1},                            INT_MIN, INT_MAX, FLAGS, "colorspace"},



More information about the ffmpeg-cvslog mailing list