aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp3.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-08 15:18:12 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-11 00:27:45 +0200
commit9cdf82c2c2f0cec6d3963737bfdf3b3f3112ff20 (patch)
tree74f8ed5b6a51ced9f8dd0821da4dd00c8efa5944 /libavcodec/vp3.c
parent95e876f069e9c5ed268ddcdeb06cc5e056c5e63c (diff)
downloadffmpeg-9cdf82c2c2f0cec6d3963737bfdf3b3f3112ff20.tar.gz
avcodec/vlc: Use proper namespace
Therefore use a proper prefix for this API, e.g. ff_init_vlc_sparse -> ff_vlc_init_sparse ff_free_vlc -> ff_vlc_free INIT_VLC_LE -> VLC_INIT_LE INIT_VLC_USE_NEW_STATIC -> VLC_INIT_USE_STATIC (The ancient INIT_VLC_USE_STATIC has been removed in 595324e143b57a52e2329eb47b84395c70f93087, so that the NEW has been dropped.) Finally, reorder the flags and change their values accordingly. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index acab098203..5002800ef2 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -361,19 +361,19 @@ static av_cold int vp3_decode_end(AVCodecContext *avctx)
av_frame_free(&s->golden_frame.f);
for (i = 0; i < FF_ARRAY_ELEMS(s->coeff_vlc); i++)
- ff_free_vlc(&s->coeff_vlc[i]);
+ ff_vlc_free(&s->coeff_vlc[i]);
- ff_free_vlc(&s->superblock_run_length_vlc);
- ff_free_vlc(&s->fragment_run_length_vlc);
- ff_free_vlc(&s->mode_code_vlc);
- ff_free_vlc(&s->motion_vector_vlc);
+ ff_vlc_free(&s->superblock_run_length_vlc);
+ ff_vlc_free(&s->fragment_run_length_vlc);
+ ff_vlc_free(&s->mode_code_vlc);
+ ff_vlc_free(&s->motion_vector_vlc);
for (j = 0; j < 2; j++)
for (i = 0; i < 7; i++)
- ff_free_vlc(&s->vp4_mv_vlc[j][i]);
+ ff_vlc_free(&s->vp4_mv_vlc[j][i]);
for (i = 0; i < 2; i++)
- ff_free_vlc(&s->block_pattern_vlc[i]);
+ ff_vlc_free(&s->block_pattern_vlc[i]);
return 0;
}
@@ -2439,7 +2439,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
/* init VLC tables */
bias_tabs = CONFIG_VP4_DECODER && s->version >= 2 ? vp4_bias : vp3_bias;
for (int i = 0; i < FF_ARRAY_ELEMS(s->coeff_vlc); i++) {
- ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i], 11, 32,
+ ret = ff_vlc_init_from_lengths(&s->coeff_vlc[i], 11, 32,
&bias_tabs[i][0][1], 2,
&bias_tabs[i][0][0], 2, 1,
0, 0, avctx);
@@ -2450,7 +2450,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
for (i = 0; i < FF_ARRAY_ELEMS(s->coeff_vlc); i++) {
const HuffTable *tab = &s->huffman_table[i];
- ret = ff_init_vlc_from_lengths(&s->coeff_vlc[i], 11, tab->nb_entries,
+ ret = ff_vlc_init_from_lengths(&s->coeff_vlc[i], 11, tab->nb_entries,
&tab->entries[0].len, sizeof(*tab->entries),
&tab->entries[0].sym, sizeof(*tab->entries), 1,
0, 0, avctx);
@@ -2459,25 +2459,25 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
}
}
- ret = ff_init_vlc_from_lengths(&s->superblock_run_length_vlc, SUPERBLOCK_VLC_BITS, 34,
+ ret = ff_vlc_init_from_lengths(&s->superblock_run_length_vlc, SUPERBLOCK_VLC_BITS, 34,
superblock_run_length_vlc_lens, 1,
NULL, 0, 0, 1, 0, avctx);
if (ret < 0)
return ret;
- ret = ff_init_vlc_from_lengths(&s->fragment_run_length_vlc, 5, 30,
+ ret = ff_vlc_init_from_lengths(&s->fragment_run_length_vlc, 5, 30,
fragment_run_length_vlc_len, 1,
NULL, 0, 0, 0, 0, avctx);
if (ret < 0)
return ret;
- ret = ff_init_vlc_from_lengths(&s->mode_code_vlc, 3, 8,
+ ret = ff_vlc_init_from_lengths(&s->mode_code_vlc, 3, 8,
mode_code_vlc_len, 1,
NULL, 0, 0, 0, 0, avctx);
if (ret < 0)
return ret;
- ret = ff_init_vlc_from_lengths(&s->motion_vector_vlc, VP3_MV_VLC_BITS, 63,
+ ret = ff_vlc_init_from_lengths(&s->motion_vector_vlc, VP3_MV_VLC_BITS, 63,
&motion_vector_vlc_table[0][1], 2,
&motion_vector_vlc_table[0][0], 2, 1,
-31, 0, avctx);
@@ -2487,7 +2487,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
#if CONFIG_VP4_DECODER
for (j = 0; j < 2; j++)
for (i = 0; i < 7; i++) {
- ret = ff_init_vlc_from_lengths(&s->vp4_mv_vlc[j][i], VP4_MV_VLC_BITS, 63,
+ ret = ff_vlc_init_from_lengths(&s->vp4_mv_vlc[j][i], VP4_MV_VLC_BITS, 63,
&vp4_mv_vlc[j][i][0][1], 2,
&vp4_mv_vlc[j][i][0][0], 2, 1, -31,
0, avctx);
@@ -2497,7 +2497,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
/* version >= 2 */
for (i = 0; i < 2; i++)
- if ((ret = init_vlc(&s->block_pattern_vlc[i], 3, 14,
+ if ((ret = vlc_init(&s->block_pattern_vlc[i], 3, 14,
&vp4_block_pattern_vlc[i][0][1], 2, 1,
&vp4_block_pattern_vlc[i][0][0], 2, 1, 0)) < 0)
return ret;