diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-07 16:12:42 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2025-03-17 03:26:07 +0100 |
commit | 0facdafd1e10f61f59897734d80e16b568bb9b00 (patch) | |
tree | fb0f98bf6c606b3db975aaf89c37cdeadc41fcca /libavcodec/mpeg12.c | |
parent | 54d582e7495144605e1c5405b9420691428cafd8 (diff) | |
download | ffmpeg-0facdafd1e10f61f59897734d80e16b568bb9b00.tar.gz |
avcodec/vlc: Merge VLCElem and RL_VLC_ELEM
It will simplify creating RL-VLCs (which until now used
a stack-based VLC as temporary buffer).
Notice that there would be another option to merge them, namely:
struct VLCElem {
union {
VLCBaseType sym;
int16_t level;
};
int8_t len;
uint8_t run;
};
The main difference to the current patch is that this would change
the type of the length field of VLCElem to int8_t from int16_t.
It turns out that that this would entail additional sign extensions
on ppc, see https://godbolt.org/z/behWYEYE7. I have therefore refrained
from doing so, although it would make the patch simpler.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 444ea83f3c..0d4a36be04 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -119,7 +119,7 @@ av_cold void ff_init_2d_vlc_rl(const uint16_t table_vlc[][2], RL_VLC_ELEM rl_vlc level = table_level[code]; } } - rl_vlc[i].len = len; + rl_vlc[i].len8 = len; rl_vlc[i].level = level; rl_vlc[i].run = run; } |