* [FFmpeg-devel] [PATCH v3 0/5] avcodec/dovi - disable metadata compression by default [not found] <20240523195019.64019-1-cosmin@cosmin.at> @ 2024-05-23 19:50 ` Cosmin Stejerean via ffmpeg-devel 2024-06-18 19:21 ` Niklas Haas [not found] ` <20240523195019.64019-2-cosmin@cosmin.at> ` (4 subsequent siblings) 5 siblings, 1 reply; 8+ messages in thread From: Cosmin Stejerean via ffmpeg-devel @ 2024-05-23 19:50 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Cosmin Stejerean From: Cosmin Stejerean <cosmin@cosmin.at> not all clients support metadata compression, output when vdr_dm_metadata_changed fails the DV verifier. Compared to v2 this makes the dovi field name a parameter of the DOVI_ENCODING_OPTS macro as requested. It also splits up the commits into introducing the macro, guarding compression by it, and then leveraging it in the encoder. I split up each encoder into a separate patch since the original support was added in separate patches but this could also be squashed when applying if that's better. Cosmin Stejerean (5): avcodec/dovi_rpu - add field to disable metadata compression avcodec/dovi_rpuenc - guard metadata compression by enable_compression avcodec/libaomenc - switch DolbyVision options to DOVI_ENCODING_OPTS avcodec/libsvtav1 - switch DolbyVision options to DOVI_ENCODING_OPTS avcodec/libx265 - switch DolbyVision options to DOVI_ENCODING_OPTS libavcodec/dovi_rpu.h | 10 ++++++++++ libavcodec/dovi_rpuenc.c | 8 ++++++-- libavcodec/libaomenc.c | 3 +-- libavcodec/libsvtav1.c | 3 +-- libavcodec/libx265.c | 3 +-- 5 files changed, 19 insertions(+), 8 deletions(-) -- 2.42.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH v3 0/5] avcodec/dovi - disable metadata compression by default 2024-05-23 19:50 ` [FFmpeg-devel] [PATCH v3 0/5] avcodec/dovi - disable metadata compression by default Cosmin Stejerean via ffmpeg-devel @ 2024-06-18 19:21 ` Niklas Haas [not found] ` <7CD3ACDC-B8C6-433C-8122-7BE26306B1E8@cosmin.at> 0 siblings, 1 reply; 8+ messages in thread From: Niklas Haas @ 2024-06-18 19:21 UTC (permalink / raw) To: Cosmin Stejerean via ffmpeg-devel, ffmpeg-devel; +Cc: Cosmin Stejerean On Thu, 23 May 2024 19:50:23 +0000 Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote: > From: Cosmin Stejerean <cosmin@cosmin.at> > > not all clients support metadata compression, output when vdr_dm_metadata_changed fails the DV verifier. > > Compared to v2 this makes the dovi field name a parameter of the > DOVI_ENCODING_OPTS macro as requested. It also splits up the commits into > introducing the macro, guarding compression by it, and then leveraging it in > the encoder. > > I split up each encoder into a separate patch since the original support was > added in separate patches but this could also be squashed when applying if > that's better. > > Cosmin Stejerean (5): > avcodec/dovi_rpu - add field to disable metadata compression > avcodec/dovi_rpuenc - guard metadata compression by enable_compression > avcodec/libaomenc - switch DolbyVision options to DOVI_ENCODING_OPTS > avcodec/libsvtav1 - switch DolbyVision options to DOVI_ENCODING_OPTS > avcodec/libx265 - switch DolbyVision options to DOVI_ENCODING_OPTS > > libavcodec/dovi_rpu.h | 10 ++++++++++ > libavcodec/dovi_rpuenc.c | 8 ++++++-- > libavcodec/libaomenc.c | 3 +-- > libavcodec/libsvtav1.c | 3 +-- > libavcodec/libx265.c | 3 +-- > 5 files changed, 19 insertions(+), 8 deletions(-) > > -- > 2.42.1 > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". I suppose this series is redundant now with the compression changes from my BSF patchset? Unless we want to preserve the macro for purely stylistic reasons, but we can probably stomach the duplication of only a single option field. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <7CD3ACDC-B8C6-433C-8122-7BE26306B1E8@cosmin.at>]
* Re: [FFmpeg-devel] [PATCH v3 0/5] avcodec/dovi - disable metadata compression by default [not found] ` <7CD3ACDC-B8C6-433C-8122-7BE26306B1E8@cosmin.at> @ 2024-06-20 14:41 ` Cosmin Stejerean via ffmpeg-devel 0 siblings, 0 replies; 8+ messages in thread From: Cosmin Stejerean via ffmpeg-devel @ 2024-06-20 14:41 UTC (permalink / raw) To: FFmpeg development discussions and patches; +Cc: Cosmin Stejerean > On Jun 19, 2024, at 3:21 AM, Niklas Haas <ffmpeg@haasn.xyz> wrote: > > On Thu, 23 May 2024 19:50:23 +0000 Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote: >> From: Cosmin Stejerean <cosmin@cosmin.at> >> >> not all clients support metadata compression, output when vdr_dm_metadata_changed fails the DV verifier. >> >> Compared to v2 this makes the dovi field name a parameter of the >> DOVI_ENCODING_OPTS macro as requested. It also splits up the commits into >> introducing the macro, guarding compression by it, and then leveraging it in >> the encoder. >> >> I split up each encoder into a separate patch since the original support was >> added in separate patches but this could also be squashed when applying if >> that's better. >> >> Cosmin Stejerean (5): >> avcodec/dovi_rpu - add field to disable metadata compression >> avcodec/dovi_rpuenc - guard metadata compression by enable_compression >> avcodec/libaomenc - switch DolbyVision options to DOVI_ENCODING_OPTS >> avcodec/libsvtav1 - switch DolbyVision options to DOVI_ENCODING_OPTS >> avcodec/libx265 - switch DolbyVision options to DOVI_ENCODING_OPTS >> >> libavcodec/dovi_rpu.h | 10 ++++++++++ >> libavcodec/dovi_rpuenc.c | 8 ++++++-- >> libavcodec/libaomenc.c | 3 +-- >> libavcodec/libsvtav1.c | 3 +-- >> libavcodec/libx265.c | 3 +-- >> 5 files changed, 19 insertions(+), 8 deletions(-) >> >> -- >> 2.42.1 >> >> >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > > I suppose this series is redundant now with the compression changes from > my BSF patchset? > > Unless we want to preserve the macro for purely stylistic reasons, but > we can probably stomach the duplication of only a single option field. > Agreed, I think we can abandon this patchset in favor of the BSF one. - Cosmin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20240523195019.64019-2-cosmin@cosmin.at>]
* [FFmpeg-devel] [PATCH v3 1/5] avcodec/dovi_rpu - field and macro for metadata compression [not found] ` <20240523195019.64019-2-cosmin@cosmin.at> @ 2024-05-23 19:50 ` Cosmin Stejerean via ffmpeg-devel 0 siblings, 0 replies; 8+ messages in thread From: Cosmin Stejerean via ffmpeg-devel @ 2024-05-23 19:50 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Cosmin Stejerean From: Cosmin Stejerean <cosmin@cosmin.at> Add a field to enable or disable metadata compression since not all clients support this. Introduce DOVI_ENCODING_OPTS macro to faciliate exposing this as an option to encoders. --- libavcodec/dovi_rpu.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/dovi_rpu.h b/libavcodec/dovi_rpu.h index 8ce0c88e9d..5406425c0d 100644 --- a/libavcodec/dovi_rpu.h +++ b/libavcodec/dovi_rpu.h @@ -28,6 +28,11 @@ #include "libavutil/frame.h" #include "avcodec.h" +#define DOVI_ENCODING_OPTS(dovi) \ + { "dolbyvision", "Enable Dolby Vision RPU coding", OFFSET(dovi.enable), AV_OPT_TYPE_BOOL, {.i64 = FF_DOVI_AUTOMATIC }, -1, 1, VE, .unit = "dovi" }, \ + { "auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DOVI_AUTOMATIC}, .flags = VE, .unit = "dovi" }, \ + { "dv_enable_compression", "Enable Dolby Vision metadata compression", OFFSET(dovi.enable_compression), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, VE }, + #define DOVI_MAX_DM_ID 15 typedef struct DOVIContext { void *logctx; @@ -71,6 +76,11 @@ typedef struct DOVIContext { AVDOVIDmData *ext_blocks; int num_ext_blocks; + /** + * Enable metadata compression in the output. Currently this is experimental. + */ + int enable_compression; + /** * Private fields internal to dovi_rpu.c */ -- 2.42.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20240523195019.64019-3-cosmin@cosmin.at>]
* [FFmpeg-devel] [PATCH v3 2/5] avcodec/dovi_rpuenc - guard metadata compression [not found] ` <20240523195019.64019-3-cosmin@cosmin.at> @ 2024-05-23 19:50 ` Cosmin Stejerean via ffmpeg-devel 0 siblings, 0 replies; 8+ messages in thread From: Cosmin Stejerean via ffmpeg-devel @ 2024-05-23 19:50 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Cosmin Stejerean From: Cosmin Stejerean <cosmin@cosmin.at> Guard use_prev_vdr_rpu by the new enable_compression field since not all clients support this. Separately output when vdr_dm_metadata_changed == 0 fails the DV verifier so turn that off unconditionally for now. --- libavcodec/dovi_rpuenc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c index 3c3e0f84c0..26ed25733a 100644 --- a/libavcodec/dovi_rpuenc.c +++ b/libavcodec/dovi_rpuenc.c @@ -512,8 +512,12 @@ int ff_dovi_rpu_generate(DOVIContext *s, const AVDOVIMetadata *metadata, } } - vdr_dm_metadata_changed = !s->color || memcmp(s->color, color, sizeof(*color)); - use_prev_vdr_rpu = !memcmp(&s->vdr[vdr_rpu_id]->mapping, mapping, sizeof(*mapping)); + // the output when vdr_dm_metadata_changed is 0 fails the DV verifier + // force it to 1 until we can get some samples or documentation on correct syntax + vdr_dm_metadata_changed = 1; // !s->color || memcmp(s->color, color, sizeof(*color)); + + // not all clients support metadata compression + use_prev_vdr_rpu = s->enable_compression && !memcmp(&s->vdr[vdr_rpu_id]->mapping, mapping, sizeof(*mapping)); buffer_size = 12 /* vdr seq info */ + 5 /* CRC32 + terminator */; buffer_size += num_ext_blocks_v1 * 13; -- 2.42.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20240523195019.64019-4-cosmin@cosmin.at>]
* [FFmpeg-devel] [PATCH v3 3/5] avcodec/libaomenc - switch to DOVI_ENCODING_OPTS [not found] ` <20240523195019.64019-4-cosmin@cosmin.at> @ 2024-05-23 19:50 ` Cosmin Stejerean via ffmpeg-devel 0 siblings, 0 replies; 8+ messages in thread From: Cosmin Stejerean via ffmpeg-devel @ 2024-05-23 19:50 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Cosmin Stejerean From: Cosmin Stejerean <cosmin@cosmin.at> --- libavcodec/libaomenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index dec74ebecd..22429717e8 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -1487,8 +1487,7 @@ static const AVOption options[] = { { "ssim", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AOM_TUNE_SSIM}, 0, 0, VE, .unit = "tune"}, FF_AV1_PROFILE_OPTS { "still-picture", "Encode in single frame mode (typically used for still AVIF images).", OFFSET(still_picture), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, VE }, - { "dolbyvision", "Enable Dolby Vision RPU coding", OFFSET(dovi.enable), AV_OPT_TYPE_BOOL, {.i64 = FF_DOVI_AUTOMATIC }, -1, 1, VE, .unit = "dovi" }, - { "auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DOVI_AUTOMATIC}, .flags = VE, .unit = "dovi" }, + DOVI_ENCODING_OPTS(dovi) { "enable-rect-partitions", "Enable rectangular partitions", OFFSET(enable_rect_partitions), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-1to4-partitions", "Enable 1:4/4:1 partitions", OFFSET(enable_1to4_partitions), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, { "enable-ab-partitions", "Enable ab shape partitions", OFFSET(enable_ab_partitions), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE}, -- 2.42.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20240523195019.64019-6-cosmin@cosmin.at>]
* [FFmpeg-devel] [PATCH v3 5/5] avcodec/libx265 - switch to DOVI_ENCODING_OPTS [not found] ` <20240523195019.64019-6-cosmin@cosmin.at> @ 2024-05-23 19:50 ` Cosmin Stejerean via ffmpeg-devel 0 siblings, 0 replies; 8+ messages in thread From: Cosmin Stejerean via ffmpeg-devel @ 2024-05-23 19:50 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Cosmin Stejerean From: Cosmin Stejerean <cosmin@cosmin.at> --- libavcodec/libx265.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index ac1dbc4f97..70e447fc0e 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -951,8 +951,7 @@ static const AVOption options[] = { { "a53cc", "Use A53 Closed Captions (if available)", OFFSET(a53_cc), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE }, { "x265-params", "set the x265 configuration using a :-separated list of key=value parameters", OFFSET(x265_opts), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE }, #if X265_BUILD >= 167 - { "dolbyvision", "Enable Dolby Vision RPU coding", OFFSET(dovi.enable), AV_OPT_TYPE_BOOL, {.i64 = FF_DOVI_AUTOMATIC }, -1, 1, VE, .unit = "dovi" }, - { "auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DOVI_AUTOMATIC}, .flags = VE, .unit = "dovi" }, + DOVI_ENCODING_OPTS(dovi) #endif { NULL } }; -- 2.42.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20240523195019.64019-5-cosmin@cosmin.at>]
* [FFmpeg-devel] [PATCH v3 4/5] avcodec/libsvtav1 - switch to DOVI_ENCODING_OPTS [not found] ` <20240523195019.64019-5-cosmin@cosmin.at> @ 2024-05-23 19:50 ` Cosmin Stejerean via ffmpeg-devel 0 siblings, 0 replies; 8+ messages in thread From: Cosmin Stejerean via ffmpeg-devel @ 2024-05-23 19:50 UTC (permalink / raw) To: ffmpeg-devel; +Cc: Cosmin Stejerean From: Cosmin Stejerean <cosmin@cosmin.at> --- libavcodec/libsvtav1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 2fef8c8971..4a8cab4eb9 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -731,8 +731,7 @@ static const AVOption options[] = { AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 63, VE }, { "svtav1-params", "Set the SVT-AV1 configuration using a :-separated list of key=value parameters", OFFSET(svtav1_opts), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE }, - { "dolbyvision", "Enable Dolby Vision RPU coding", OFFSET(dovi.enable), AV_OPT_TYPE_BOOL, {.i64 = FF_DOVI_AUTOMATIC }, -1, 1, VE, .unit = "dovi" }, - { "auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DOVI_AUTOMATIC}, .flags = VE, .unit = "dovi" }, + DOVI_ENCODING_OPTS(dovi) {NULL}, }; -- 2.42.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-06-20 14:41 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20240523195019.64019-1-cosmin@cosmin.at> 2024-05-23 19:50 ` [FFmpeg-devel] [PATCH v3 0/5] avcodec/dovi - disable metadata compression by default Cosmin Stejerean via ffmpeg-devel 2024-06-18 19:21 ` Niklas Haas [not found] ` <7CD3ACDC-B8C6-433C-8122-7BE26306B1E8@cosmin.at> 2024-06-20 14:41 ` Cosmin Stejerean via ffmpeg-devel [not found] ` <20240523195019.64019-2-cosmin@cosmin.at> 2024-05-23 19:50 ` [FFmpeg-devel] [PATCH v3 1/5] avcodec/dovi_rpu - field and macro for metadata compression Cosmin Stejerean via ffmpeg-devel [not found] ` <20240523195019.64019-3-cosmin@cosmin.at> 2024-05-23 19:50 ` [FFmpeg-devel] [PATCH v3 2/5] avcodec/dovi_rpuenc - guard " Cosmin Stejerean via ffmpeg-devel [not found] ` <20240523195019.64019-4-cosmin@cosmin.at> 2024-05-23 19:50 ` [FFmpeg-devel] [PATCH v3 3/5] avcodec/libaomenc - switch to DOVI_ENCODING_OPTS Cosmin Stejerean via ffmpeg-devel [not found] ` <20240523195019.64019-6-cosmin@cosmin.at> 2024-05-23 19:50 ` [FFmpeg-devel] [PATCH v3 5/5] avcodec/libx265 " Cosmin Stejerean via ffmpeg-devel [not found] ` <20240523195019.64019-5-cosmin@cosmin.at> 2024-05-23 19:50 ` [FFmpeg-devel] [PATCH v3 4/5] avcodec/libsvtav1 " Cosmin Stejerean via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git