[FFmpeg-devel] [PATCH] cbs_av1: Make fake OBU size length field a write option
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Sep 26 12:19:50 EEST 2023
Mark Thompson:
> This is an option to modify the behaviour of the writer, not a syntax
> field.
> ---
> Tested by hacking av1_metadata. For example, adding:
>
> av_opt_set_int(ctx->common.output->priv_data, "fixed_obu_size_length",
> 7, 0);
>
> gets you OBU headers that look like:
>
> [trace_headers @ 0x55706fcb2880] OBU header
> [trace_headers @ 0x55706fcb2880] 0
> obu_forbidden_bit 0 = 0
> [trace_headers @ 0x55706fcb2880] 1
> obu_type 0100 = 4
> [trace_headers @ 0x55706fcb2880] 5
> obu_extension_flag 0 = 0
> [trace_headers @ 0x55706fcb2880] 6
> obu_has_size_field 1 = 1
> [trace_headers @ 0x55706fcb2880] 7
> obu_reserved_1bit 0 = 0
> [trace_headers @ 0x55706fcb2880] 8 obu_size
> 10101110100010101000000010000000100000001000000000000000 = 1326
>
> It's not obvious that there is any value in exposing this option more
> generally, though? It could made a visible option of av1_metadata or
> others if there is any use-case for it.
>
> Thanks,
>
> - Mark
>
>
> libavcodec/cbs_av1.c | 31 +++++++++++++++++++++----------
> libavcodec/cbs_av1.h | 5 ++++-
> libavcodec/vaapi_encode_av1.c | 4 +++-
> 3 files changed, 28 insertions(+), 12 deletions(-)
What is the advantage of this? Why would people want to waste space?
- Andreas
More information about the ffmpeg-devel
mailing list