diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-22 00:39:13 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-27 15:44:38 +0200 |
commit | 18412c76e6f087d15a26864999fd2d63df72cdc6 (patch) | |
tree | 25b963a572a7bf94f841c9c866bc5adcff34b7df /libavcodec/speedhqenc.c | |
parent | 19ede649a00c10baef68216bbf72609e2ba2ab9b (diff) | |
download | ffmpeg-18412c76e6f087d15a26864999fd2d63df72cdc6.tar.gz |
avcodec/speedhqenc: Avoid unnecessary indirection
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/speedhqenc.c')
-rw-r--r-- | libavcodec/speedhqenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c index 6cf40aac2d..58b5e858a8 100644 --- a/libavcodec/speedhqenc.c +++ b/libavcodec/speedhqenc.c @@ -222,11 +222,11 @@ static void encode_block(MpegEncContext *s, int16_t *block, int n) if (alevel <= ff_rl_speedhq.max_level[0][run]) { code = ff_rl_speedhq.index_run[0][run] + alevel - 1; /* store the VLC & sign at once */ - put_bits_le(&s->pb, ff_rl_speedhq.table_vlc[code][1] + 1, - ff_rl_speedhq.table_vlc[code][0] + (sign << ff_rl_speedhq.table_vlc[code][1])); + put_bits_le(&s->pb, ff_speedhq_vlc_table[code][1] + 1, + ff_speedhq_vlc_table[code][0] | (sign << ff_speedhq_vlc_table[code][1])); } else { /* escape seems to be pretty rare <5% so I do not optimize it; - * the values correspond to ff_rl_speedhq.table_vlc[121] */ + * the values correspond to ff_speedhq_vlc_table[121] */ put_bits_le(&s->pb, 6, 32); /* escape: only clip in this case */ put_bits_le(&s->pb, 6, run); @@ -235,7 +235,7 @@ static void encode_block(MpegEncContext *s, int16_t *block, int n) last_non_zero = i; } } - /* end of block; the values correspond to ff_rl_speedhq.table_vlc[122] */ + /* end of block; the values correspond to ff_speedhq_vlc_table[122] */ put_bits_le(&s->pb, 4, 6); } |