Message ID | 20201012081217.1643833-3-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | e78bbbc2b1e413d11e9edf818e1dc07f16aecf91 |
Headers | show |
Series | [FFmpeg-devel,1/7] avcodec/indeo2: Remove #ifdef BITSTREAM_READER_LE cruft | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
On Mon, Oct 12, 2020 at 10:12:13AM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> > --- > libavcodec/speedhq.c | 34 +++++++++++++++++----------------- > 1 file changed, 17 insertions(+), 17 deletions(-) lgtm > > diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c > index 64758164de..5759cdb036 100644 > --- a/libavcodec/speedhq.c > +++ b/libavcodec/speedhq.c > @@ -132,7 +132,7 @@ static const uint8_t speedhq_run[121] = { > 31, > }; > > -static RLTable ff_rl_speedhq = { > +static RLTable rl_speedhq = { > 121, > 121, > (const uint16_t (*)[])speedhq_vlc, > @@ -152,21 +152,21 @@ static const uint8_t unscaled_quant_matrix[64] = { > 27, 29, 35, 38, 46, 56, 69, 83 > }; > > -static uint8_t ff_speedhq_static_rl_table_store[2][2*MAX_RUN + MAX_LEVEL + 3]; > +static uint8_t speedhq_static_rl_table_store[2][2*MAX_RUN + MAX_LEVEL + 3]; > > -static VLC ff_dc_lum_vlc_le; > -static VLC ff_dc_chroma_vlc_le; > -static VLC ff_dc_alpha_run_vlc_le; > -static VLC ff_dc_alpha_level_vlc_le; > +static VLC dc_lum_vlc_le; > +static VLC dc_chroma_vlc_le; > +static VLC dc_alpha_run_vlc_le; > +static VLC dc_alpha_level_vlc_le; > > static inline int decode_dc_le(GetBitContext *gb, int component) > { > int code, diff; > > if (component == 0 || component == 3) { > - code = get_vlc2(gb, ff_dc_lum_vlc_le.table, DC_VLC_BITS, 2); > + code = get_vlc2(gb, dc_lum_vlc_le.table, DC_VLC_BITS, 2); > } else { > - code = get_vlc2(gb, ff_dc_chroma_vlc_le.table, DC_VLC_BITS, 2); > + code = get_vlc2(gb, dc_chroma_vlc_le.table, DC_VLC_BITS, 2); > } > if (!code) { > diff = 0; > @@ -190,7 +190,7 @@ static inline int decode_alpha_block(const SHQContext *s, GetBitContext *gb, uin > int run, level; > > UPDATE_CACHE_LE(re, gb); > - GET_VLC(run, re, gb, ff_dc_alpha_run_vlc_le.table, ALPHA_VLC_BITS, 2); > + GET_VLC(run, re, gb, dc_alpha_run_vlc_le.table, ALPHA_VLC_BITS, 2); > > if (run < 0) break; > i += run; > @@ -198,7 +198,7 @@ static inline int decode_alpha_block(const SHQContext *s, GetBitContext *gb, uin > return AVERROR_INVALIDDATA; > > UPDATE_CACHE_LE(re, gb); > - GET_VLC(level, re, gb, ff_dc_alpha_level_vlc_le.table, ALPHA_VLC_BITS, 2); > + GET_VLC(level, re, gb, dc_alpha_level_vlc_le.table, ALPHA_VLC_BITS, 2); > block[i++] = level; > } > > @@ -236,7 +236,7 @@ static inline int decode_dct_block(const SHQContext *s, GetBitContext *gb, int l > for ( ;; ) { > int level, run; > UPDATE_CACHE_LE(re, gb); > - GET_RL_VLC(level, run, re, gb, ff_rl_speedhq.rl_vlc[0], > + GET_RL_VLC(level, run, re, gb, rl_speedhq.rl_vlc[0], > TEX_VLC_BITS, 2, 0); > if (level == 127) { > break; > @@ -511,7 +511,7 @@ static av_cold void compute_alpha_vlcs(void) > > av_assert0(entry == FF_ARRAY_ELEMS(run_code)); > > - INIT_LE_VLC_SPARSE_STATIC(&ff_dc_alpha_run_vlc_le, ALPHA_VLC_BITS, > + INIT_LE_VLC_SPARSE_STATIC(&dc_alpha_run_vlc_le, ALPHA_VLC_BITS, > FF_ARRAY_ELEMS(run_code), > run_bits, 1, 1, > run_code, 2, 2, > @@ -551,7 +551,7 @@ static av_cold void compute_alpha_vlcs(void) > > av_assert0(entry == FF_ARRAY_ELEMS(level_code)); > > - INIT_LE_VLC_SPARSE_STATIC(&ff_dc_alpha_level_vlc_le, ALPHA_VLC_BITS, > + INIT_LE_VLC_SPARSE_STATIC(&dc_alpha_level_vlc_le, ALPHA_VLC_BITS, > FF_ARRAY_ELEMS(level_code), > level_bits, 1, 1, > level_code, 2, 2, > @@ -582,19 +582,19 @@ static av_cold void speedhq_static_init(void) > ff_mpeg12_vlc_dc_lum_bits, > ff_mpeg12_vlc_dc_lum_code_reversed, > 12); > - INIT_LE_VLC_STATIC(&ff_dc_lum_vlc_le, DC_VLC_BITS, 12, > + INIT_LE_VLC_STATIC(&dc_lum_vlc_le, DC_VLC_BITS, 12, > ff_mpeg12_vlc_dc_lum_bits, 1, 1, > ff_mpeg12_vlc_dc_lum_code_reversed, 2, 2, 512); > reverse_code(ff_mpeg12_vlc_dc_chroma_code, > ff_mpeg12_vlc_dc_chroma_bits, > ff_mpeg12_vlc_dc_chroma_code_reversed, > 12); > - INIT_LE_VLC_STATIC(&ff_dc_chroma_vlc_le, DC_VLC_BITS, 12, > + INIT_LE_VLC_STATIC(&dc_chroma_vlc_le, DC_VLC_BITS, 12, > ff_mpeg12_vlc_dc_chroma_bits, 1, 1, > ff_mpeg12_vlc_dc_chroma_code_reversed, 2, 2, 514); > > - ff_rl_init(&ff_rl_speedhq, ff_speedhq_static_rl_table_store); > - INIT_2D_VLC_RL(ff_rl_speedhq, 674, INIT_VLC_LE); > + ff_rl_init(&rl_speedhq, speedhq_static_rl_table_store); > + INIT_2D_VLC_RL(rl_speedhq, 674, INIT_VLC_LE); > > compute_alpha_vlcs(); > } > -- > 2.25.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c index 64758164de..5759cdb036 100644 --- a/libavcodec/speedhq.c +++ b/libavcodec/speedhq.c @@ -132,7 +132,7 @@ static const uint8_t speedhq_run[121] = { 31, }; -static RLTable ff_rl_speedhq = { +static RLTable rl_speedhq = { 121, 121, (const uint16_t (*)[])speedhq_vlc, @@ -152,21 +152,21 @@ static const uint8_t unscaled_quant_matrix[64] = { 27, 29, 35, 38, 46, 56, 69, 83 }; -static uint8_t ff_speedhq_static_rl_table_store[2][2*MAX_RUN + MAX_LEVEL + 3]; +static uint8_t speedhq_static_rl_table_store[2][2*MAX_RUN + MAX_LEVEL + 3]; -static VLC ff_dc_lum_vlc_le; -static VLC ff_dc_chroma_vlc_le; -static VLC ff_dc_alpha_run_vlc_le; -static VLC ff_dc_alpha_level_vlc_le; +static VLC dc_lum_vlc_le; +static VLC dc_chroma_vlc_le; +static VLC dc_alpha_run_vlc_le; +static VLC dc_alpha_level_vlc_le; static inline int decode_dc_le(GetBitContext *gb, int component) { int code, diff; if (component == 0 || component == 3) { - code = get_vlc2(gb, ff_dc_lum_vlc_le.table, DC_VLC_BITS, 2); + code = get_vlc2(gb, dc_lum_vlc_le.table, DC_VLC_BITS, 2); } else { - code = get_vlc2(gb, ff_dc_chroma_vlc_le.table, DC_VLC_BITS, 2); + code = get_vlc2(gb, dc_chroma_vlc_le.table, DC_VLC_BITS, 2); } if (!code) { diff = 0; @@ -190,7 +190,7 @@ static inline int decode_alpha_block(const SHQContext *s, GetBitContext *gb, uin int run, level; UPDATE_CACHE_LE(re, gb); - GET_VLC(run, re, gb, ff_dc_alpha_run_vlc_le.table, ALPHA_VLC_BITS, 2); + GET_VLC(run, re, gb, dc_alpha_run_vlc_le.table, ALPHA_VLC_BITS, 2); if (run < 0) break; i += run; @@ -198,7 +198,7 @@ static inline int decode_alpha_block(const SHQContext *s, GetBitContext *gb, uin return AVERROR_INVALIDDATA; UPDATE_CACHE_LE(re, gb); - GET_VLC(level, re, gb, ff_dc_alpha_level_vlc_le.table, ALPHA_VLC_BITS, 2); + GET_VLC(level, re, gb, dc_alpha_level_vlc_le.table, ALPHA_VLC_BITS, 2); block[i++] = level; } @@ -236,7 +236,7 @@ static inline int decode_dct_block(const SHQContext *s, GetBitContext *gb, int l for ( ;; ) { int level, run; UPDATE_CACHE_LE(re, gb); - GET_RL_VLC(level, run, re, gb, ff_rl_speedhq.rl_vlc[0], + GET_RL_VLC(level, run, re, gb, rl_speedhq.rl_vlc[0], TEX_VLC_BITS, 2, 0); if (level == 127) { break; @@ -511,7 +511,7 @@ static av_cold void compute_alpha_vlcs(void) av_assert0(entry == FF_ARRAY_ELEMS(run_code)); - INIT_LE_VLC_SPARSE_STATIC(&ff_dc_alpha_run_vlc_le, ALPHA_VLC_BITS, + INIT_LE_VLC_SPARSE_STATIC(&dc_alpha_run_vlc_le, ALPHA_VLC_BITS, FF_ARRAY_ELEMS(run_code), run_bits, 1, 1, run_code, 2, 2, @@ -551,7 +551,7 @@ static av_cold void compute_alpha_vlcs(void) av_assert0(entry == FF_ARRAY_ELEMS(level_code)); - INIT_LE_VLC_SPARSE_STATIC(&ff_dc_alpha_level_vlc_le, ALPHA_VLC_BITS, + INIT_LE_VLC_SPARSE_STATIC(&dc_alpha_level_vlc_le, ALPHA_VLC_BITS, FF_ARRAY_ELEMS(level_code), level_bits, 1, 1, level_code, 2, 2, @@ -582,19 +582,19 @@ static av_cold void speedhq_static_init(void) ff_mpeg12_vlc_dc_lum_bits, ff_mpeg12_vlc_dc_lum_code_reversed, 12); - INIT_LE_VLC_STATIC(&ff_dc_lum_vlc_le, DC_VLC_BITS, 12, + INIT_LE_VLC_STATIC(&dc_lum_vlc_le, DC_VLC_BITS, 12, ff_mpeg12_vlc_dc_lum_bits, 1, 1, ff_mpeg12_vlc_dc_lum_code_reversed, 2, 2, 512); reverse_code(ff_mpeg12_vlc_dc_chroma_code, ff_mpeg12_vlc_dc_chroma_bits, ff_mpeg12_vlc_dc_chroma_code_reversed, 12); - INIT_LE_VLC_STATIC(&ff_dc_chroma_vlc_le, DC_VLC_BITS, 12, + INIT_LE_VLC_STATIC(&dc_chroma_vlc_le, DC_VLC_BITS, 12, ff_mpeg12_vlc_dc_chroma_bits, 1, 1, ff_mpeg12_vlc_dc_chroma_code_reversed, 2, 2, 514); - ff_rl_init(&ff_rl_speedhq, ff_speedhq_static_rl_table_store); - INIT_2D_VLC_RL(ff_rl_speedhq, 674, INIT_VLC_LE); + ff_rl_init(&rl_speedhq, speedhq_static_rl_table_store); + INIT_2D_VLC_RL(rl_speedhq, 674, INIT_VLC_LE); compute_alpha_vlcs(); }
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavcodec/speedhq.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)