Will apply soon.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
On Thu, Sep 14, 2023 at 3:34 PM Andreas Rheinhardt <
andreas.rheinha...@outlook.com> wrote:
> Paul B Mahol:
> > +unsigned val, bits;
> > +
> > +bits = get_vlc2(gb, lag_tab.table, VLC_BITS, 3);
> > +if (bits > 31) {
> > *value = 0;
> > return AVERROR_INVALIDDATA;
>
> U
Paul B Mahol:
> +unsigned val, bits;
> +
> +bits = get_vlc2(gb, lag_tab.table, VLC_BITS, 3);
> +if (bits > 31) {
> *value = 0;
> return AVERROR_INVALIDDATA;
Using a signed int and checking for zero is simpler.
And the depth of this VLC is 1, not 3.
- Andreas
___
New patch attached.
From e7d44f39eba93d567bc8e70826793c3e032311b1 Mon Sep 17 00:00:00 2001
From: Paul B Mahol
Date: Tue, 12 Sep 2023 01:29:55 +0200
Subject: [PATCH] avcodec/lagarith: use VLC for prob code length
Signed-off-by: Paul B Mahol
---
libavcodec/lagarith.c | 56
Paul B Mahol:
>
> +#include "libavutil/mem_internal.h"
I don't get what this header is needed for. You are not adding anything
ALIGNED and this file does not require it.
> +#define VLC_BITS 11
> +
> enum LagarithFrameType {
> FRAME_RAW = 1,/**< uncompressed */
> FRAME_U_
Patch Attached.
From cd774229dcf32cb44455031663b4357f0597b4c0 Mon Sep 17 00:00:00 2001
From: Paul B Mahol
Date: Tue, 12 Sep 2023 01:29:55 +0200
Subject: [PATCH] avcodec/lagarith: use VLC for prob code length
Signed-off-by: Paul B Mahol
---
libavcodec/lagarith.c | 57