From d8bc4d23e3698e00867c358b9df9efc94cb5ab9a Mon Sep 17 00:00:00 2001 From: Limin Wang Date: Mon, 4 Nov 2019 19:10:01 +0800 Subject: [PATCH] avcodec/prores_metadata_bsf: add arib-std-b67 format support It's based on the following specs: RDD 45:2017 - SMPTE Registered Disclosure Doc - Interoperable Master Format - Application ProRes Signed-off-by: Limin Wang --- doc/bitstream_filters.texi | 7 +++++++ libavcodec/prores_metadata_bsf.c | 1 + 2 files changed, 8 insertions(+) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi index e2de4fd4ed..9aa2f00296 100644 --- a/doc/bitstream_filters.texi +++ b/doc/bitstream_filters.texi @@ -591,6 +591,8 @@ Keep the same transfer characteristics property (default). BT 601, BT 709, BT 2020 @item smpte2084 SMPTE ST 2084 +@item arib-std-b67 +ARIB STD-B67 @end table @@ -616,6 +618,11 @@ Set Rec709 colorspace for each frame of the file ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov @end example +Set Hybrid Log-Gamma parameters for each frame of the file +@example +ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt2020:color_trc=arib-std-b67:colorspace=bt2020nc output.mov +@end example + @section remove_extra Remove extradata from packets. diff --git a/libavcodec/prores_metadata_bsf.c b/libavcodec/prores_metadata_bsf.c index 24615e9305..8bfcb5092b 100644 --- a/libavcodec/prores_metadata_bsf.c +++ b/libavcodec/prores_metadata_bsf.c @@ -145,6 +145,7 @@ static const AVOption options[] = { {"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"}, + {"arib-std-b67", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_TRC_ARIB_STD_B67}, 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"},