[FFmpeg-devel] [PATCH] avcodec/dovi_rpudec - correctly read el_bit_depth_minus8 when ext_mapping_idc is non-zero

Cosmin Stejerean cosmin at cosmin.at
Tue May 21 18:23:38 EEST 2024



> On May 21, 2024, at 3:21 AM, Niklas Haas <ffmpeg at haasn.xyz> wrote:
> 
> On Tue, 21 May 2024 01:17:32 +0000 Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel at ffmpeg.org> wrote:
>> From: Cosmin Stejerean <cosmin at cosmin.at>
>> 
>> It looks like the el_bitdepth_minus8 value in the header can also encode
>> ext_mapping_idc in the upper 8 bits.
>> 
>> Samples having a non-zero ext_mapping_idc fail validation currently because the
>> value returned is out of range. This bypasses this by currently ignoring the
>> ext_mapping_idc and using only the lower 8 bits for el_bitdepth_minus8.
> 
> What is ext_mapping_idc? If it's signalled data that can't be
> reconstructed, we need to store it somewhere into AVDOVIMetadata and
> then re-synthesize it during encoding. Otherwise the RPU transcode will
> be lossy.

I'm not actually sure what it does, but from what I can tell on the current samples it doesn't matter if in the process of transcoding it ends up being set to 0. However it's not hard to save it and re-synthesize it so I can send a new patch that does that.

- Cosmin


More information about the ffmpeg-devel mailing list