diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-22 15:09:55 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-01-04 16:28:55 +0100 |
commit | 3ff94f88c2f4687a7b4aae05793cc2b6821c64f0 (patch) | |
tree | 2c9eb6f781f891ed6a59d18bfdf362c03c965d48 /libavcodec | |
parent | 8a431a2bb6295aab5517fb646e45b457a3d6de6c (diff) | |
download | ffmpeg-3ff94f88c2f4687a7b4aae05793cc2b6821c64f0.tar.gz |
avcodec/speedhqenc: Inline constants
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/speedhqenc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c index 8f8b791164..967774931c 100644 --- a/libavcodec/speedhqenc.c +++ b/libavcodec/speedhqenc.c @@ -213,8 +213,9 @@ static void encode_block(MpegEncContext *s, int16_t *block, int n) 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])); } else { - /* escape seems to be pretty rare <5% so I do not optimize it */ - put_bits_le(&s->pb, ff_rl_speedhq.table_vlc[121][1], ff_rl_speedhq.table_vlc[121][0]); + /* escape seems to be pretty rare <5% so I do not optimize it; + * the values correspond to ff_rl_speedhq.table_vlc[121] */ + put_bits_le(&s->pb, 6, 32); /* escape: only clip in this case */ put_bits_le(&s->pb, 6, run); put_bits_le(&s->pb, 12, level + 2048); @@ -222,8 +223,8 @@ static void encode_block(MpegEncContext *s, int16_t *block, int n) last_non_zero = i; } } - /* end of block */ - put_bits_le(&s->pb, ff_rl_speedhq.table_vlc[122][1], ff_rl_speedhq.table_vlc[122][0]); + /* end of block; the values correspond to ff_rl_speedhq.table_vlc[122] */ + put_bits_le(&s->pb, 4, 6); } void ff_speedhq_encode_mb(MpegEncContext *s, int16_t block[12][64]) |