[FFmpeg-cvslog] r21097 - in trunk/libavcodec: mpeg4data.h mpeg4video.h mpeg4videodec.c mpeg4videoenc.c msmpeg4data.c

michael subversion
Fri Jan 8 18:41:14 CET 2010


Author: michael
Date: Fri Jan  8 18:41:14 2010
New Revision: 21097

Log:
Rename mpeg4 intra vlc tables so they contain "mpeg4", this improves readability
of msmpeg4 code (one now knows where that table comes from).

Modified:
   trunk/libavcodec/mpeg4data.h
   trunk/libavcodec/mpeg4video.h
   trunk/libavcodec/mpeg4videodec.c
   trunk/libavcodec/mpeg4videoenc.c
   trunk/libavcodec/msmpeg4data.c

Modified: trunk/libavcodec/mpeg4data.h
==============================================================================
--- trunk/libavcodec/mpeg4data.h	Fri Jan  8 18:28:43 2010	(r21096)
+++ trunk/libavcodec/mpeg4data.h	Fri Jan  8 18:41:14 2010	(r21097)
@@ -44,7 +44,7 @@ const uint8_t ff_mpeg4_DCtab_chrom[13][2
     {1,9}, {1,10}, {1,11}, {1,12},
 };
 
-const uint16_t intra_vlc[103][2] = {
+const uint16_t ff_mpeg4_intra_vlc[103][2] = {
 { 0x2, 2 },
 { 0x6, 3 },{ 0xf, 4 },{ 0xd, 5 },{ 0xc, 5 },
 { 0x15, 6 },{ 0x13, 6 },{ 0x12, 6 },{ 0x17, 7 },
@@ -74,7 +74,7 @@ const uint16_t intra_vlc[103][2] = {
 { 0x5f, 12 },{ 0x3, 7 },
 };
 
-const int8_t intra_level[102] = {
+const int8_t ff_mpeg4_intra_level[102] = {
   1,  2,  3,  4,  5,  6,  7,  8,
   9, 10, 11, 12, 13, 14, 15, 16,
  17, 18, 19, 20, 21, 22, 23, 24,
@@ -90,7 +90,7 @@ const int8_t intra_level[102] = {
   1,  1,  1,  1,  1,  1,
 };
 
-const int8_t intra_run[102] = {
+const int8_t ff_mpeg4_intra_run[102] = {
   0,  0,  0,  0,  0,  0,  0,  0,
   0,  0,  0,  0,  0,  0,  0,  0,
   0,  0,  0,  0,  0,  0,  0,  0,
@@ -106,12 +106,12 @@ const int8_t intra_run[102] = {
  15, 16, 17, 18, 19, 20,
 };
 
-RLTable rl_intra = {
+RLTable ff_mpeg4_rl_intra = {
     102,
     67,
-    intra_vlc,
-    intra_run,
-    intra_level,
+    ff_mpeg4_intra_vlc,
+    ff_mpeg4_intra_run,
+    ff_mpeg4_intra_level,
 };
 
 /* Note this is identical to the intra rvlc except that it is reordered. */

Modified: trunk/libavcodec/mpeg4video.h
==============================================================================
--- trunk/libavcodec/mpeg4video.h	Fri Jan  8 18:28:43 2010	(r21096)
+++ trunk/libavcodec/mpeg4video.h	Fri Jan  8 18:41:14 2010	(r21097)
@@ -57,10 +57,10 @@
 extern const uint8_t ff_mpeg4_DCtab_lum[13][2];
 extern const uint8_t ff_mpeg4_DCtab_chrom[13][2];
 
-extern const uint16_t intra_vlc[103][2];
-extern const int8_t intra_level[102];
-extern const int8_t intra_run[102];
-extern RLTable rl_intra;
+extern const uint16_t ff_mpeg4_intra_vlc[103][2];
+extern const int8_t ff_mpeg4_intra_level[102];
+extern const int8_t ff_mpeg4_intra_run[102];
+extern RLTable ff_mpeg4_rl_intra;
 
 /* Note this is identical to the intra rvlc except that it is reordered. */
 extern const uint16_t inter_rvlc[170][2];

Modified: trunk/libavcodec/mpeg4videodec.c
==============================================================================
--- trunk/libavcodec/mpeg4videodec.c	Fri Jan  8 18:28:43 2010	(r21096)
+++ trunk/libavcodec/mpeg4videodec.c	Fri Jan  8 18:41:14 2010	(r21097)
@@ -872,8 +872,8 @@ static inline int mpeg4_decode_block(Mpe
           rl = &rvlc_rl_intra;
           rl_vlc = rvlc_rl_intra.rl_vlc[0];
       }else{
-          rl = &rl_intra;
-          rl_vlc = rl_intra.rl_vlc[0];
+          rl = &ff_mpeg4_rl_intra;
+          rl_vlc = ff_mpeg4_rl_intra.rl_vlc[0];
       }
       if (s->ac_pred) {
           if (dc_pred_dir == 0)
@@ -2200,10 +2200,10 @@ static av_cold int decode_init(AVCodecCo
     if (!done) {
         done = 1;
 
-        init_rl(&rl_intra, ff_mpeg4_static_rl_table_store[0]);
+        init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
         init_rl(&rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]);
         init_rl(&rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]);
-        INIT_VLC_RL(rl_intra, 554);
+        INIT_VLC_RL(ff_mpeg4_rl_intra, 554);
         INIT_VLC_RL(rvlc_rl_inter, 1072);
         INIT_VLC_RL(rvlc_rl_intra, 1072);
         INIT_VLC_STATIC(&dc_lum, DC_VLC_BITS, 10 /* 13 */,

Modified: trunk/libavcodec/mpeg4videoenc.c
==============================================================================
--- trunk/libavcodec/mpeg4videoenc.c	Fri Jan  8 18:28:43 2010	(r21096)
+++ trunk/libavcodec/mpeg4videoenc.c	Fri Jan  8 18:41:14 2010	(r21097)
@@ -309,7 +309,7 @@ static inline void mpeg4_encode_block(Mp
         mpeg4_encode_dc(dc_pb, intra_dc, n);
         if(last_index<1) return;
         i = 1;
-        rl = &rl_intra;
+        rl = &ff_mpeg4_rl_intra;
         bits_tab= uni_mpeg4_intra_rl_bits;
         len_tab = uni_mpeg4_intra_rl_len;
     } else {
@@ -1252,9 +1252,9 @@ static av_cold int encode_init(AVCodecCo
 
         init_uni_dc_tab();
 
-        init_rl(&rl_intra, ff_mpeg4_static_rl_table_store[0]);
+        init_rl(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
 
-        init_uni_mpeg4_rl_tab(&rl_intra, uni_mpeg4_intra_rl_bits, uni_mpeg4_intra_rl_len);
+        init_uni_mpeg4_rl_tab(&ff_mpeg4_rl_intra, uni_mpeg4_intra_rl_bits, uni_mpeg4_intra_rl_len);
         init_uni_mpeg4_rl_tab(&rl_inter, uni_mpeg4_inter_rl_bits, uni_mpeg4_inter_rl_len);
     }
 

Modified: trunk/libavcodec/msmpeg4data.c
==============================================================================
--- trunk/libavcodec/msmpeg4data.c	Fri Jan  8 18:28:43 2010	(r21096)
+++ trunk/libavcodec/msmpeg4data.c	Fri Jan  8 18:41:14 2010	(r21097)
@@ -596,9 +596,9 @@ extern const uint16_t inter_vlc[103][2];
 extern const int8_t inter_level[102];
 extern const int8_t inter_run[102];
 
-extern const uint16_t intra_vlc[103][2];
-extern const int8_t intra_level[102];
-extern const int8_t intra_run[102];
+extern const uint16_t ff_mpeg4_intra_vlc[103][2];
+extern const int8_t ff_mpeg4_intra_level[102];
+extern const int8_t ff_mpeg4_intra_run[102];
 
 RLTable rl_table[NB_RL_TABLES] = {
     /* intra luminance tables */
@@ -622,9 +622,9 @@ RLTable rl_table[NB_RL_TABLES] = {
     {
         102,
         67,
-        intra_vlc,
-        intra_run,
-        intra_level,
+        ff_mpeg4_intra_vlc,
+        ff_mpeg4_intra_run,
+        ff_mpeg4_intra_level,
     },
     /* intra chrominance / non intra tables */
     /* low motion inter */



More information about the ffmpeg-cvslog mailing list