[FFmpeg-devel] [PATCH] avcodec/dovi_rpudec: fix reading el_bit_depth_minus8
Niklas Haas
ffmpeg at haasn.xyz
Mon Jun 24 19:04:55 EEST 2024
On Mon, 24 Jun 2024 15:56:12 +0000 Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel at ffmpeg.org> wrote:
> From: Cosmin Stejerean <cosmin at cosmin.at>
>
> now that we are reading ext_mapping_idc as the upper 8 bits of
> el_bit_depth_minus8 we need to use get_ue_golomb_long rather than
> get_ue_golomb_31 for reading it
>
> ---
> libavcodec/dovi_rpudec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/dovi_rpudec.c b/libavcodec/dovi_rpudec.c
> index 8cafdcf5e6..c025800206 100644
> --- a/libavcodec/dovi_rpudec.c
> +++ b/libavcodec/dovi_rpudec.c
> @@ -420,7 +420,7 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size,
>
> if ((hdr->rpu_format & 0x700) == 0) {
> int bl_bit_depth_minus8 = get_ue_golomb_31(gb);
> - int el_bit_depth_minus8 = get_ue_golomb_31(gb);
> + int el_bit_depth_minus8 = get_ue_golomb_long(gb);
> int vdr_bit_depth_minus8 = get_ue_golomb_31(gb);
> int reserved_zero_3bits;
> /* ext_mapping_idc is in the upper 8 bits of el_bit_depth_minus8 */
> --
> 2.42.1
LGTM. I checked also the equivalent for set_ue_golomb(), but it's fine
up to 2^16-2, which is enough for the max value of (0xFF << 8) | 8.
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list