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/rl.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/rl.c')
-rw-r--r-- | libavcodec/rl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rl.c b/libavcodec/rl.c index a78242d488..b45cf117c1 100644 --- a/libavcodec/rl.c +++ b/libavcodec/rl.c @@ -118,7 +118,7 @@ av_cold void ff_rl_init_vlc(RLTable *rl, unsigned static_size) if (code >= rl->last) run += 192; } } - rl->rl_vlc[q][i].len = len; + rl->rl_vlc[q][i].len8 = len; rl->rl_vlc[q][i].level = level; rl->rl_vlc[q][i].run = run; } |