[2/4] vlc/rl: Add avpriv_ prefix to allow them to be used from libavformat

Message ID 1330005641-19309-2-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö Feb. 23, 2012, 2 p.m.
---
 libavcodec/4xm.c           |    2 +-
 libavcodec/bitstream.c     |    6 +++---
 libavcodec/cook.c          |    6 +++---
 libavcodec/dnxhddec.c      |   12 ++++++------
 libavcodec/dv.c            |    2 +-
 libavcodec/faxcompr.c      |   10 +++++-----
 libavcodec/fraps.c         |    4 ++--
 libavcodec/get_bits.h      |   12 ++++++------
 libavcodec/h261dec.c       |    2 +-
 libavcodec/h261enc.c       |    2 +-
 libavcodec/huffman.c       |    2 +-
 libavcodec/huffyuv.c       |   12 ++++++------
 libavcodec/indeo5.c        |    2 +-
 libavcodec/ituh263dec.c    |    4 ++--
 libavcodec/ituh263enc.c    |    4 ++--
 libavcodec/ivi_common.c    |    4 ++--
 libavcodec/mimic.c         |    2 +-
 libavcodec/mjpegdec.c      |   10 +++++-----
 libavcodec/motionpixels.c  |    2 +-
 libavcodec/mpc8.c          |    4 ++--
 libavcodec/mpeg12.c        |    4 ++--
 libavcodec/mpeg12enc.c     |    4 ++--
 libavcodec/mpeg4videodec.c |    6 +++---
 libavcodec/mpeg4videoenc.c |    2 +-
 libavcodec/mpegvideo.c     |    6 +++---
 libavcodec/msmpeg4.c       |    4 ++--
 libavcodec/rl.h            |    6 +++---
 libavcodec/rv34.c          |    8 ++++----
 libavcodec/rv40.c          |   16 ++++++++--------
 libavcodec/smacker.c       |    6 +++---
 libavcodec/truemotion2.c   |    2 +-
 libavcodec/utvideo.c       |   12 ++++++------
 libavcodec/vorbisdec.c     |    2 +-
 libavcodec/vp3.c           |   18 +++++++++---------
 libavcodec/vp6.c           |    8 ++++----
 libavcodec/wma.c           |    6 +++---
 36 files changed, 107 insertions(+), 107 deletions(-)

Patch

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 139a642..61618cf 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -918,7 +918,7 @@  static av_cold int decode_end(AVCodecContext *avctx)
         av_freep(&f->cfrm[i].data);
         f->cfrm[i].allocated_size = 0;
     }
-    ff_free_vlc(&f->pre_vlc);
+    avpriv_free_vlc(&f->pre_vlc);
     if (f->current_picture.data[0])
         avctx->release_buffer(avctx, &f->current_picture);
     if (f->last_picture.data[0])
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index f77b9c4..e19f3c2 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -253,9 +253,9 @@  static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
    (byte/word/long) to store the 'bits', 'codes', and 'symbols' tables.
 
    'use_static' should be set to 1 for tables, which should be freed
-   with av_free_static(), 0 if ff_free_vlc() will be used.
+   with av_free_static(), 0 if avpriv_free_vlc() will be used.
 */
-int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
+int avpriv_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
              const void *bits, int bits_wrap, int bits_size,
              const void *codes, int codes_wrap, int codes_size,
              const void *symbols, int symbols_wrap, int symbols_size,
@@ -318,7 +318,7 @@  int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
 }
 
 
-void ff_free_vlc(VLC *vlc)
+void avpriv_free_vlc(VLC *vlc)
 {
     av_freep(&vlc->table);
 }
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index bc262f1..bcc651a 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -321,11 +321,11 @@  static av_cold int cook_decode_close(AVCodecContext *avctx)
 
     /* Free the VLC tables. */
     for (i = 0; i < 13; i++)
-        ff_free_vlc(&q->envelope_quant_index[i]);
+        avpriv_free_vlc(&q->envelope_quant_index[i]);
     for (i = 0; i < 7; i++)
-        ff_free_vlc(&q->sqvh[i]);
+        avpriv_free_vlc(&q->sqvh[i]);
     for (i = 0; i < q->num_subpackets; i++)
-        ff_free_vlc(&q->subpacket[i].ccpl);
+        avpriv_free_vlc(&q->subpacket[i].ccpl);
 
     av_log(avctx, AV_LOG_DEBUG, "Memory deallocated.\n");
 
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index cc248ef..ecf2f59 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -79,9 +79,9 @@  static int dnxhd_init_vlc(DNXHDContext *ctx, int cid)
         }
         ctx->cid_table = &ff_dnxhd_cid_table[index];
 
-        ff_free_vlc(&ctx->ac_vlc);
-        ff_free_vlc(&ctx->dc_vlc);
-        ff_free_vlc(&ctx->run_vlc);
+        avpriv_free_vlc(&ctx->ac_vlc);
+        avpriv_free_vlc(&ctx->dc_vlc);
+        avpriv_free_vlc(&ctx->run_vlc);
 
         init_vlc(&ctx->ac_vlc, DNXHD_VLC_BITS, 257,
                  ctx->cid_table->ac_bits, 1, 1,
@@ -391,9 +391,9 @@  static av_cold int dnxhd_decode_close(AVCodecContext *avctx)
 
     if (ctx->picture.data[0])
         avctx->release_buffer(avctx, &ctx->picture);
-    ff_free_vlc(&ctx->ac_vlc);
-    ff_free_vlc(&ctx->dc_vlc);
-    ff_free_vlc(&ctx->run_vlc);
+    avpriv_free_vlc(&ctx->ac_vlc);
+    avpriv_free_vlc(&ctx->dc_vlc);
+    avpriv_free_vlc(&ctx->run_vlc);
     return 0;
 }
 
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 3deaa5e..2d55506 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -314,7 +314,7 @@  static av_cold int dvvideo_init(AVCodecContext *avctx)
             dv_rl_vlc[i].level = level;
             dv_rl_vlc[i].run   = run;
         }
-        ff_free_vlc(&dv_vlc);
+        avpriv_free_vlc(&dv_vlc);
 
         dv_vlc_map_tableinit();
     }
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c
index a0fa825..6167f1d 100644
--- a/libavcodec/faxcompr.c
+++ b/libavcodec/faxcompr.c
@@ -110,11 +110,11 @@  av_cold void ff_ccitt_unpack_init(void)
     ccitt_vlc[1].table = code_table2;
     ccitt_vlc[1].table_allocated = 648;
     for(i = 0; i < 2; i++){
-        ff_init_vlc_sparse(&ccitt_vlc[i], 9, CCITT_SYMS,
-                           ccitt_codes_lens[i], 1, 1,
-                           ccitt_codes_bits[i], 1, 1,
-                           ccitt_syms, 2, 2,
-                           INIT_VLC_USE_NEW_STATIC);
+        avpriv_init_vlc_sparse(&ccitt_vlc[i], 9, CCITT_SYMS,
+                               ccitt_codes_lens[i], 1, 1,
+                               ccitt_codes_bits[i], 1, 1,
+                               ccitt_syms, 2, 2,
+                               INIT_VLC_USE_NEW_STATIC);
     }
     INIT_VLC_STATIC(&ccitt_group3_2d_vlc, 9, 11,
                     ccitt_group3_2d_lens, 1, 1,
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index 3643325..980683f 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -113,13 +113,13 @@  static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
             if(j) dst[i] += dst[i - stride];
             else if(Uoff) dst[i] += 0x80;
             if (get_bits_left(&gb) < 0) {
-                ff_free_vlc(&vlc);
+                avpriv_free_vlc(&vlc);
                 return AVERROR_INVALIDDATA;
             }
         }
         dst += stride;
     }
-    ff_free_vlc(&vlc);
+    avpriv_free_vlc(&vlc);
     return 0;
 }
 
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 158e6d2..140d8a2 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -364,19 +364,19 @@  static inline void align_get_bits(GetBitContext *s)
                  bits, bits_wrap, bits_size,            \
                  codes, codes_wrap, codes_size,         \
                  flags)                                 \
-        ff_init_vlc_sparse(vlc, nb_bits, nb_codes,         \
-                           bits, bits_wrap, bits_size,     \
-                           codes, codes_wrap, codes_size,  \
-                           NULL, 0, 0, flags)
+        avpriv_init_vlc_sparse(vlc, nb_bits, nb_codes,         \
+                               bits, bits_wrap, bits_size,     \
+                               codes, codes_wrap, codes_size,  \
+                               NULL, 0, 0, flags)
 
-int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
+int avpriv_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
              const void *bits, int bits_wrap, int bits_size,
              const void *codes, int codes_wrap, int codes_size,
              const void *symbols, int symbols_wrap, int symbols_size,
              int flags);
 #define INIT_VLC_LE         2
 #define INIT_VLC_USE_NEW_STATIC 4
-void ff_free_vlc(VLC *vlc);
+void avpriv_free_vlc(VLC *vlc);
 
 #define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size) do {     \
         static VLC_TYPE table[static_size][2];                          \
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 38d5e2e..9082e22 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -66,7 +66,7 @@  static av_cold void h261_decode_init_vlc(H261Context *h){
         INIT_VLC_STATIC(&h261_cbp_vlc, H261_CBP_VLC_BITS, 63,
                  &h261_cbp_tab[0][1], 2, 1,
                  &h261_cbp_tab[0][0], 2, 1, 512);
-        ff_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store);
+        avpriv_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store);
         INIT_VLC_RL(h261_rl_tcoeff, 552);
     }
 }
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 0ae48ca..ba88366 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -240,7 +240,7 @@  void ff_h261_encode_init(MpegEncContext *s){
 
     if (!done) {
         done = 1;
-        ff_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store);
+        avpriv_init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store);
     }
 
     s->min_qcoeff= -127;
diff --git a/libavcodec/huffman.c b/libavcodec/huffman.c
index 9446332..7c52456 100644
--- a/libavcodec/huffman.c
+++ b/libavcodec/huffman.c
@@ -61,7 +61,7 @@  static int build_huff_tree(VLC *vlc, Node *nodes, int head, int flags)
     int pos = 0;
 
     get_tree_codes(bits, lens, xlat, nodes, head, 0, 0, &pos, no_zero_count);
-    return ff_init_vlc_sparse(vlc, 9, pos, lens, 2, 2, bits, 4, 4, xlat, 1, 1, 0);
+    return avpriv_init_vlc_sparse(vlc, 9, pos, lens, 2, 2, bits, 4, 4, xlat, 1, 1, 0);
 }
 
 
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 4f07808..023ebf6 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -294,8 +294,8 @@  static void generate_joint_tables(HYuvContext *s){
                         i++;
                 }
             }
-            ff_free_vlc(&s->vlc[3+p]);
-            ff_init_vlc_sparse(&s->vlc[3+p], VLC_BITS, i, len, 1, 1, bits, 2, 2, symbols, 2, 2, 0);
+            avpriv_free_vlc(&s->vlc[3+p]);
+            avpriv_init_vlc_sparse(&s->vlc[3+p], VLC_BITS, i, len, 1, 1, bits, 2, 2, symbols, 2, 2, 0);
         }
     }else{
         uint8_t (*map)[4] = (uint8_t(*)[4])s->pix_bgr_map;
@@ -335,7 +335,7 @@  static void generate_joint_tables(HYuvContext *s){
                 }
             }
         }
-        ff_free_vlc(&s->vlc[3]);
+        avpriv_free_vlc(&s->vlc[3]);
         init_vlc(&s->vlc[3], VLC_BITS, i, len, 1, 1, bits, 2, 2, 0);
     }
 }
@@ -352,7 +352,7 @@  static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
         if(generate_bits_table(s->bits[i], s->len[i])<0){
             return -1;
         }
-        ff_free_vlc(&s->vlc[i]);
+        avpriv_free_vlc(&s->vlc[i]);
         init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
     }
 
@@ -384,7 +384,7 @@  static int read_old_huffman_tables(HYuvContext *s){
     memcpy(s->len[2] , s->len [1], 256*sizeof(uint8_t));
 
     for(i=0; i<3; i++){
-        ff_free_vlc(&s->vlc[i]);
+        avpriv_free_vlc(&s->vlc[i]);
         init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
     }
 
@@ -1218,7 +1218,7 @@  static av_cold int decode_end(AVCodecContext *avctx)
     av_freep(&s->bitstream_buffer);
 
     for(i=0; i<6; i++){
-        ff_free_vlc(&s->vlc[i]);
+        avpriv_free_vlc(&s->vlc[i]);
     }
 
     return 0;
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index deb76b9..767fadf 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -813,7 +813,7 @@  static av_cold int decode_close(AVCodecContext *avctx)
     ff_ivi_free_buffers(&ctx->planes[0]);
 
     if (ctx->mb_vlc.cust_tab.table)
-        ff_free_vlc(&ctx->mb_vlc.cust_tab);
+        avpriv_free_vlc(&ctx->mb_vlc.cust_tab);
 
     if (ctx->frame.data[0])
         avctx->release_buffer(avctx, &ctx->frame);
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 20c2d7c..c2ee752 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -120,8 +120,8 @@  void ff_h263_decode_init_vlc(MpegEncContext *s)
         INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 33,
                  &ff_mvtab[0][1], 2, 1,
                  &ff_mvtab[0][0], 2, 1, 538);
-        ff_init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]);
-        ff_init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]);
+        avpriv_init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]);
+        avpriv_init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]);
         INIT_VLC_RL(ff_h263_rl_inter, 554);
         INIT_VLC_RL(ff_rl_intra_aic, 554);
         INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15,
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 752b307..2da7237 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -775,8 +775,8 @@  void ff_h263_encode_init(MpegEncContext *s)
     if (!done) {
         done = 1;
 
-        ff_init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]);
-        ff_init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]);
+        avpriv_init_rl(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]);
+        avpriv_init_rl(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]);
 
         init_uni_h263_rl_tab(&ff_rl_intra_aic, NULL, uni_h263_intra_aic_rl_len);
         init_uni_h263_rl_tab(&ff_h263_rl_inter    , NULL, uni_h263_inter_rl_len);
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 670be5e..86b4ea3 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -132,7 +132,7 @@  int ff_ivi_dec_huff_desc(GetBitContext *gb, int desc_coded, int which_tab,
                 ff_ivi_huff_desc_copy(&huff_tab->cust_desc, &new_huff);
 
                 if (huff_tab->cust_tab.table)
-                    ff_free_vlc(&huff_tab->cust_tab);
+                    avpriv_free_vlc(&huff_tab->cust_tab);
                 result = ff_ivi_create_huff_from_desc(&huff_tab->cust_desc,
                         &huff_tab->cust_tab, 0);
                 if (result) {
@@ -237,7 +237,7 @@  void av_cold ff_ivi_free_buffers(IVIPlaneDesc *planes)
             av_freep(&planes[p].bands[b].bufs[2]);
 
             if (planes[p].bands[b].blk_vlc.cust_tab.table)
-                ff_free_vlc(&planes[p].bands[b].blk_vlc.cust_tab);
+                avpriv_free_vlc(&planes[p].bands[b].blk_vlc.cust_tab);
             for (t = 0; t < planes[p].bands[b].num_tiles; t++)
                 av_freep(&planes[p].bands[b].tiles[t].mbs);
             av_freep(&planes[p].bands[b].tiles);
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 11fe7a3..9a1d48f 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -412,7 +412,7 @@  static av_cold int mimic_decode_end(AVCodecContext *avctx)
     for(i = 0; i < 16; i++)
         if(ctx->buf_ptrs[i].data[0])
             ff_thread_release_buffer(avctx, &ctx->buf_ptrs[i]);
-    ff_free_vlc(&ctx->vlc);
+    avpriv_free_vlc(&ctx->vlc);
 
     return 0;
 }
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 27c47e9..a653a24 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -62,8 +62,8 @@  static int build_vlc(VLC *vlc, const uint8_t *bits_table,
     if (is_ac)
         huff_sym[0] = 16 * 256;
 
-    return ff_init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1,
-                              huff_code, 2, 2, huff_sym, 2, 2, use_static);
+    return avpriv_init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1,
+                                  huff_code, 2, 2, huff_sym, 2, 2, use_static);
 }
 
 static void build_basic_mjpeg_vlc(MJpegDecodeContext *s)
@@ -191,7 +191,7 @@  int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
         len -= n;
 
         /* build VLC and flush previous vlc if present */
-        ff_free_vlc(&s->vlcs[class][index]);
+        avpriv_free_vlc(&s->vlcs[class][index]);
         av_log(s->avctx, AV_LOG_DEBUG, "class=%d index=%d nb_codes=%d\n",
                class, index, code_max + 1);
         if (build_vlc(&s->vlcs[class][index], bits_table, val_table,
@@ -199,7 +199,7 @@  int ff_mjpeg_decode_dht(MJpegDecodeContext *s)
             return -1;
 
         if (class > 0) {
-            ff_free_vlc(&s->vlcs[2][index]);
+            avpriv_free_vlc(&s->vlcs[2][index]);
             if (build_vlc(&s->vlcs[2][index], bits_table, val_table,
                           code_max + 1, 0, 0) < 0)
                 return -1;
@@ -1632,7 +1632,7 @@  av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
 
     for (i = 0; i < 3; i++) {
         for (j = 0; j < 4; j++)
-            ff_free_vlc(&s->vlcs[i][j]);
+            avpriv_free_vlc(&s->vlcs[i][j]);
     }
     for (i = 0; i < MAX_COMPONENTS; i++) {
         av_freep(&s->blocks[i]);
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index 37c108f..0ee78ec 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -286,7 +286,7 @@  static int mp_decode_frame(AVCodecContext *avctx,
     if (init_vlc(&mp->vlc, mp->max_codes_bits, mp->codes_count, &mp->codes[0].size, sizeof(HuffCode), 1, &mp->codes[0].code, sizeof(HuffCode), 4, 0))
         goto end;
     mp_decode_frame_helper(mp, &gb);
-    ff_free_vlc(&mp->vlc);
+    avpriv_free_vlc(&mp->vlc);
 
 end:
     *data_size = sizeof(AVFrame);
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 6d4547b..03cfe05 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -182,13 +182,13 @@  static av_cold int mpc8_decode_init(AVCodecContext * avctx)
 
     q3_vlc[0].table = q3_0_table;
     q3_vlc[0].table_allocated = 512;
-    ff_init_vlc_sparse(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE,
+    avpriv_init_vlc_sparse(&q3_vlc[0], MPC8_Q3_BITS, MPC8_Q3_SIZE,
              mpc8_q3_bits,  1, 1,
              mpc8_q3_codes, 1, 1,
              mpc8_q3_syms,  1, 1, INIT_VLC_USE_NEW_STATIC);
     q3_vlc[1].table = q3_1_table;
     q3_vlc[1].table_allocated = 516;
-    ff_init_vlc_sparse(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE,
+    avpriv_init_vlc_sparse(&q3_vlc[1], MPC8_Q4_BITS, MPC8_Q4_SIZE,
              mpc8_q4_bits,  1, 1,
              mpc8_q4_codes, 1, 1,
              mpc8_q4_syms,  1, 1, INIT_VLC_USE_NEW_STATIC);
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 4b526eb..524d7bd 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -693,8 +693,8 @@  av_cold void ff_mpeg12_init_vlcs(void)
         INIT_VLC_STATIC(&mb_btype_vlc, MB_BTYPE_VLC_BITS, 11,
                         &table_mb_btype[0][1], 2, 1,
                         &table_mb_btype[0][0], 2, 1, 64);
-        ff_init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]);
-        ff_init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]);
+        avpriv_init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]);
+        avpriv_init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]);
 
         INIT_2D_VLC_RL(ff_rl_mpeg1, 680);
         INIT_2D_VLC_RL(ff_rl_mpeg2, 674);
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index c53d99b..4dfb7a6 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -715,8 +715,8 @@  void ff_mpeg1_encode_init(MpegEncContext *s)
         int i;
 
         done=1;
-        ff_init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]);
-        ff_init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]);
+        avpriv_init_rl(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]);
+        avpriv_init_rl(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]);
 
         for(i=0; i<64; i++)
         {
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index a3fc034..bdd0ed5 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2205,9 +2205,9 @@  static av_cold int decode_init(AVCodecContext *avctx)
     if (!done) {
         done = 1;
 
-        ff_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
-        ff_init_rl(&ff_rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]);
-        ff_init_rl(&ff_rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]);
+        avpriv_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
+        avpriv_init_rl(&ff_rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]);
+        avpriv_init_rl(&ff_rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]);
         INIT_VLC_RL(ff_mpeg4_rl_intra, 554);
         INIT_VLC_RL(ff_rvlc_rl_inter, 1072);
         INIT_VLC_RL(ff_rvlc_rl_intra, 1072);
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index d512daa..bf412fa 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1230,7 +1230,7 @@  static av_cold int encode_init(AVCodecContext *avctx)
 
         init_uni_dc_tab();
 
-        ff_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
+        avpriv_init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
 
         init_uni_mpeg4_rl_tab(&ff_mpeg4_rl_intra, uni_mpeg4_intra_rl_bits, uni_mpeg4_intra_rl_len);
         init_uni_mpeg4_rl_tab(&ff_h263_rl_inter, uni_mpeg4_inter_rl_bits, uni_mpeg4_inter_rl_len);
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index d894ee4..d942859 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1003,8 +1003,8 @@  void ff_MPV_common_end(MpegEncContext *s)
         avcodec_default_free_buffers(s->avctx);
 }
 
-void ff_init_rl(RLTable *rl,
-                uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3])
+void avpriv_init_rl(RLTable *rl,
+                    uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3])
 {
     int8_t  max_level[MAX_RUN + 1], max_run[MAX_LEVEL + 1];
     uint8_t index_run[MAX_RUN + 1];
@@ -1055,7 +1055,7 @@  void ff_init_rl(RLTable *rl,
     }
 }
 
-void ff_init_vlc_rl(RLTable *rl)
+void avpriv_init_vlc_rl(RLTable *rl)
 {
     int i, q;
 
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 7aeb0be..7d6bd67 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -262,7 +262,7 @@  av_cold void ff_msmpeg4_encode_init(MpegEncContext *s)
         init_mv_table(&ff_mv_tables[0]);
         init_mv_table(&ff_mv_tables[1]);
         for(i=0;i<NB_RL_TABLES;i++)
-            ff_init_rl(&ff_rl_table[i], static_rl_table_store[i]);
+            avpriv_init_rl(&ff_rl_table[i], static_rl_table_store[i]);
 
         for(i=0; i<NB_RL_TABLES; i++){
             int level;
@@ -1271,7 +1271,7 @@  av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
         done = 1;
 
         for(i=0;i<NB_RL_TABLES;i++) {
-            ff_init_rl(&ff_rl_table[i], static_rl_table_store[i]);
+            avpriv_init_rl(&ff_rl_table[i], static_rl_table_store[i]);
         }
         INIT_VLC_RL(ff_rl_table[0], 642);
         INIT_VLC_RL(ff_rl_table[1], 1104);
diff --git a/libavcodec/rl.h b/libavcodec/rl.h
index 367cc98..bef8427 100644
--- a/libavcodec/rl.h
+++ b/libavcodec/rl.h
@@ -53,8 +53,8 @@  typedef struct RLTable {
  * @param static_store static uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3] which will hold
  *                     the level and run tables, if this is NULL av_malloc() will be used
  */
-void ff_init_rl(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
-void ff_init_vlc_rl(RLTable *rl);
+void avpriv_init_rl(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
+void avpriv_init_vlc_rl(RLTable *rl);
 
 #define INIT_VLC_RL(rl, static_size)\
 {\
@@ -68,7 +68,7 @@  void ff_init_vlc_rl(RLTable *rl);
         for(q=0; q<32; q++)\
             rl.rl_vlc[q]= rl_vlc_table[q];\
 \
-        ff_init_vlc_rl(&rl);\
+        avpriv_init_vlc_rl(&rl);\
     }\
 }
 
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index e15affe..8e1a2d8 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -131,10 +131,10 @@  static void rv34_gen_vlc(const uint8_t *bits, int size, VLC *vlc, const uint8_t
 
     vlc->table = &table_data[table_offs[num]];
     vlc->table_allocated = table_offs[num + 1] - table_offs[num];
-    ff_init_vlc_sparse(vlc, FFMIN(maxbits, 9), realsize,
-                       bits2, 1, 1,
-                       cw,    2, 2,
-                       syms,  2, 2, INIT_VLC_USE_NEW_STATIC);
+    avpriv_init_vlc_sparse(vlc, FFMIN(maxbits, 9), realsize,
+                           bits2, 1, 1,
+                           cw,    2, 2,
+                           syms,  2, 2, INIT_VLC_USE_NEW_STATIC);
 }
 
 /**
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c
index 142259f..ef38151 100644
--- a/libavcodec/rv40.c
+++ b/libavcodec/rv40.c
@@ -80,18 +80,18 @@  static av_cold void rv40_init_tables(void)
     for(i = 0; i < NUM_PTYPE_VLCS; i++){
         ptype_vlc[i].table = &ptype_table[i << PTYPE_VLC_BITS];
         ptype_vlc[i].table_allocated = 1 << PTYPE_VLC_BITS;
-        ff_init_vlc_sparse(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE,
-                            ptype_vlc_bits[i],  1, 1,
-                            ptype_vlc_codes[i], 1, 1,
-                            ptype_vlc_syms,     1, 1, INIT_VLC_USE_NEW_STATIC);
+        avpriv_init_vlc_sparse(&ptype_vlc[i], PTYPE_VLC_BITS, PTYPE_VLC_SIZE,
+                                ptype_vlc_bits[i],  1, 1,
+                                ptype_vlc_codes[i], 1, 1,
+                                ptype_vlc_syms,     1, 1, INIT_VLC_USE_NEW_STATIC);
     }
     for(i = 0; i < NUM_BTYPE_VLCS; i++){
         btype_vlc[i].table = &btype_table[i << BTYPE_VLC_BITS];
         btype_vlc[i].table_allocated = 1 << BTYPE_VLC_BITS;
-        ff_init_vlc_sparse(&btype_vlc[i], BTYPE_VLC_BITS, BTYPE_VLC_SIZE,
-                            btype_vlc_bits[i],  1, 1,
-                            btype_vlc_codes[i], 1, 1,
-                            btype_vlc_syms,     1, 1, INIT_VLC_USE_NEW_STATIC);
+        avpriv_init_vlc_sparse(&btype_vlc[i], BTYPE_VLC_BITS, BTYPE_VLC_SIZE,
+                                btype_vlc_bits[i],  1, 1,
+                                btype_vlc_codes[i], 1, 1,
+                                btype_vlc_syms,     1, 1, INIT_VLC_USE_NEW_STATIC);
     }
 }
 
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index c7889af..d441c45 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -267,9 +267,9 @@  static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
     *recodes = huff.values;
 
     if(vlc[0].table)
-        ff_free_vlc(&vlc[0]);
+        avpriv_free_vlc(&vlc[0]);
     if(vlc[1].table)
-        ff_free_vlc(&vlc[1]);
+        avpriv_free_vlc(&vlc[1]);
     av_free(tmp1.bits);
     av_free(tmp1.lengths);
     av_free(tmp1.values);
@@ -718,7 +718,7 @@  static int smka_decode_frame(AVCodecContext *avctx, void *data,
 
     for(i = 0; i < 4; i++) {
         if(vlc[i].table)
-            ff_free_vlc(&vlc[i]);
+            avpriv_free_vlc(&vlc[i]);
         av_free(h[i].bits);
         av_free(h[i].lengths);
         av_free(h[i].values);
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 9e45045..29031c7 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -187,7 +187,7 @@  static void tm2_free_codes(TM2Codes *code)
 {
     av_free(code->recode);
     if(code->vlc.table)
-        ff_free_vlc(&code->vlc);
+        avpriv_free_vlc(&code->vlc);
 }
 
 static inline int tm2_get_token(GetBitContext *gb, TM2Codes *code)
diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c
index 884b16e..40b889a 100644
--- a/libavcodec/utvideo.c
+++ b/libavcodec/utvideo.c
@@ -103,10 +103,10 @@  static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
         code += 0x80000000u >> (he[i].len - 1);
     }
 
-    return ff_init_vlc_sparse(vlc, FFMIN(he[last].len, 9), last + 1,
-                              bits,  sizeof(*bits),  sizeof(*bits),
-                              codes, sizeof(*codes), sizeof(*codes),
-                              syms,  sizeof(*syms),  sizeof(*syms), 0);
+    return avpriv_init_vlc_sparse(vlc, FFMIN(he[last].len, 9), last + 1,
+                                  bits,  sizeof(*bits),  sizeof(*bits),
+                                  codes, sizeof(*codes), sizeof(*codes),
+                                  syms,  sizeof(*syms),  sizeof(*syms), 0);
 }
 
 static int decode_plane(UtvideoContext *c, int plane_no,
@@ -207,11 +207,11 @@  static int decode_plane(UtvideoContext *c, int plane_no,
                    get_bits_left(&gb));
     }
 
-    ff_free_vlc(&vlc);
+    avpriv_free_vlc(&vlc);
 
     return 0;
 fail:
-    ff_free_vlc(&vlc);
+    avpriv_free_vlc(&vlc);
     return AVERROR_INVALIDDATA;
 }
 
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 11d6d76..e418f08 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -203,7 +203,7 @@  static void vorbis_free(vorbis_context *vc)
 
     for (i = 0; i < vc->codebook_count; ++i) {
         av_free(vc->codebooks[i].codevectors);
-        ff_free_vlc(&vc->codebooks[i].vlc);
+        avpriv_free_vlc(&vc->codebooks[i].vlc);
     }
     av_freep(&vc->codebooks);
 
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 42bc63e..de12a4d 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -292,17 +292,17 @@  static av_cold int vp3_decode_end(AVCodecContext *avctx)
         return 0;
 
     for (i = 0; i < 16; i++) {
-        ff_free_vlc(&s->dc_vlc[i]);
-        ff_free_vlc(&s->ac_vlc_1[i]);
-        ff_free_vlc(&s->ac_vlc_2[i]);
-        ff_free_vlc(&s->ac_vlc_3[i]);
-        ff_free_vlc(&s->ac_vlc_4[i]);
+        avpriv_free_vlc(&s->dc_vlc[i]);
+        avpriv_free_vlc(&s->ac_vlc_1[i]);
+        avpriv_free_vlc(&s->ac_vlc_2[i]);
+        avpriv_free_vlc(&s->ac_vlc_3[i]);
+        avpriv_free_vlc(&s->ac_vlc_4[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);
+    avpriv_free_vlc(&s->superblock_run_length_vlc);
+    avpriv_free_vlc(&s->fragment_run_length_vlc);
+    avpriv_free_vlc(&s->mode_code_vlc);
+    avpriv_free_vlc(&s->motion_vector_vlc);
 
     /* release all frames */
     vp3_decode_flush(avctx);
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 75863a9..ceff612 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -233,7 +233,7 @@  static int vp6_build_huff_tree(VP56Context *s, uint8_t coeff_model[],
         nodes[map[2*i+1]].count = b + !b;
     }
 
-    ff_free_vlc(vlc);
+    avpriv_free_vlc(vlc);
     /* then build the huffman tree according to probabilities */
     return ff_huff_build_tree(s->avctx, vlc, size, nodes, vp6_huff_cmp,
                               FF_HUFFMAN_FLAG_HNODE_FIRST);
@@ -611,11 +611,11 @@  static av_cold int vp6_decode_free(AVCodecContext *avctx)
     ff_vp56_free(avctx);
 
     for (pt=0; pt<2; pt++) {
-        ff_free_vlc(&s->dccv_vlc[pt]);
-        ff_free_vlc(&s->runv_vlc[pt]);
+        avpriv_free_vlc(&s->dccv_vlc[pt]);
+        avpriv_free_vlc(&s->runv_vlc[pt]);
         for (ct=0; ct<3; ct++)
             for (cg=0; cg<6; cg++)
-                ff_free_vlc(&s->ract_vlc[pt][ct][cg]);
+                avpriv_free_vlc(&s->ract_vlc[pt][ct][cg]);
     }
     return 0;
 }
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index 371aad5..2c627a1 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -417,13 +417,13 @@  int ff_wma_end(AVCodecContext *avctx)
         ff_mdct_end(&s->mdct_ctx[i]);
 
     if (s->use_exp_vlc) {
-        ff_free_vlc(&s->exp_vlc);
+        avpriv_free_vlc(&s->exp_vlc);
     }
     if (s->use_noise_coding) {
-        ff_free_vlc(&s->hgain_vlc);
+        avpriv_free_vlc(&s->hgain_vlc);
     }
     for (i = 0; i < 2; i++) {
-        ff_free_vlc(&s->coef_vlc[i]);
+        avpriv_free_vlc(&s->coef_vlc[i]);
         av_free(s->run_table[i]);
         av_free(s->level_table[i]);
         av_free(s->int_table[i]);