* [FFmpeg-devel] [PATCH] avcodec/dovi_rpudec: fix reading el_bit_depth_minus8
[not found] <20240624155609.51649-1-cosmin@cosmin.at>
@ 2024-06-24 15:56 ` Cosmin Stejerean via ffmpeg-devel
2024-06-24 16:04 ` Niklas Haas
0 siblings, 1 reply; 2+ messages in thread
From: Cosmin Stejerean via ffmpeg-devel @ 2024-06-24 15:56 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Cosmin Stejerean
From: Cosmin Stejerean <cosmin@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
_______________________________________________
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] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/dovi_rpudec: fix reading el_bit_depth_minus8
2024-06-24 15:56 ` [FFmpeg-devel] [PATCH] avcodec/dovi_rpudec: fix reading el_bit_depth_minus8 Cosmin Stejerean via ffmpeg-devel
@ 2024-06-24 16:04 ` Niklas Haas
0 siblings, 0 replies; 2+ messages in thread
From: Niklas Haas @ 2024-06-24 16:04 UTC (permalink / raw)
To: Cosmin Stejerean via ffmpeg-devel, ffmpeg-devel; +Cc: Cosmin Stejerean
On Mon, 24 Jun 2024 15:56:12 +0000 Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
> From: Cosmin Stejerean <cosmin@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@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
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] 2+ messages in thread
end of thread, other threads:[~2024-06-24 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20240624155609.51649-1-cosmin@cosmin.at>
2024-06-24 15:56 ` [FFmpeg-devel] [PATCH] avcodec/dovi_rpudec: fix reading el_bit_depth_minus8 Cosmin Stejerean via ffmpeg-devel
2024-06-24 16:04 ` Niklas Haas
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