[FFmpeg-devel] [PATCH v2] avcodec/dovi - correctly read el_bit_depth_minus8 and ext_mapping_idc

Cosmin Stejerean cosmin at cosmin.at
Wed May 22 18:50:34 EEST 2024



> On May 21, 2024, at 9:19 PM, Andreas Rheinhardt <andreas.rheinhardt at outlook.com> wrote:
> 
> Cosmin Stejerean via ffmpeg-devel:
>> From: Cosmin Stejerean <cosmin at cosmin.at>
>> 
>> These two fields are coded together into a single 16 bit integer with upper 8
>> bits for ext_mapping_idc and lower 8 bits for el_bit_depth_minus8.
>> 
>> Furthermore ext_mapping_idc has two components, upper 3 bits and lower 5 bits.
> 
> How do you know about these fields? You seem to know something that
> Niklas doesn't.

I can see them in the output of the DoVi verifier.

 RPU Header
...
  |  Sequence header
...
  |    BL_video_full_range_flag                  0
  |    BL_bit_depth                              10
  |    EL_bit_depth                              10
  |    ext_mapping_idc[4:0]                      1
  |    ext_mapping_idc[7:5]                      4
  |    vdr_bit_depth                             12
...

>> --- a/libavutil/dovi_meta.h
>> +++ b/libavutil/dovi_meta.h
>> @@ -87,6 +87,8 @@ typedef struct AVDOVIRpuDataHeader {
>>     uint8_t bl_video_full_range_flag;
>>     uint8_t bl_bit_depth; /* [8, 16] */
>>     uint8_t el_bit_depth; /* [8, 16] */
>> +    uint8_t ext_mapping_idc_0_4; /* extended base layer inverse mapping indicator */
>> +    uint8_t ext_mapping_idc_5_7; /* reserved */
> 
> This is an ABI break. All new additions need to be put at the end.
> Furthermore this needs an entry in APIChanges and a lavu minor version
> bump. And it should be in a patch of its own.

Ok, sending v3.

- Cosmin


More information about the ffmpeg-devel mailing list