changeset 4929:67975429cb40 libavcodec

Add prefix to some variables for consistency
author kostya
date Sun, 06 May 2007 11:40:42 +0000
parents 7ec5c2e20271
children 655d25351bfc
files vc1.c vc1data.c vc1data.h
diffstat 3 files changed, 28 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/vc1.c	Sun May 06 11:23:12 2007 +0000
+++ b/vc1.c	Sun May 06 11:40:42 2007 +0000
@@ -1012,8 +1012,8 @@
                 nr = get_bits(gb, 8);
                 dr = get_bits(gb, 4);
                 if(nr && nr < 8 && dr && dr < 3){
-                    v->s.avctx->time_base.num = fps_dr[dr - 1];
-                    v->s.avctx->time_base.den = fps_nr[nr - 1] * 1000;
+                    v->s.avctx->time_base.num = vc1_fps_dr[dr - 1];
+                    v->s.avctx->time_base.den = vc1_fps_nr[nr - 1] * 1000;
                 }
             }
         }
@@ -1124,9 +1124,9 @@
     /* Quantizer stuff */
     pqindex = get_bits(gb, 5);
     if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
-        v->pq = pquant_table[0][pqindex];
+        v->pq = vc1_pquant_table[0][pqindex];
     else
-        v->pq = pquant_table[1][pqindex];
+        v->pq = vc1_pquant_table[1][pqindex];
 
     v->pquantizer = 1;
     if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
@@ -1166,11 +1166,11 @@
         else v->tt_index = 2;
 
         lowquant = (v->pq > 12) ? 0 : 1;
-        v->mv_mode = mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
+        v->mv_mode = vc1_mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
         if (v->mv_mode == MV_PMODE_INTENSITY_COMP)
         {
             int scale, shift, i;
-            v->mv_mode2 = mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
+            v->mv_mode2 = vc1_mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
             v->lumscale = get_bits(gb, 6);
             v->lumshift = get_bits(gb, 6);
             v->use_ic = 1;
@@ -1236,7 +1236,7 @@
             v->ttmbf = get_bits(gb, 1);
             if (v->ttmbf)
             {
-                v->ttfrm = ttfrm_to_tt[get_bits(gb, 2)];
+                v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
             }
         } else {
             v->ttmbf = 1;
@@ -1277,7 +1277,7 @@
             v->ttmbf = get_bits(gb, 1);
             if (v->ttmbf)
             {
-                v->ttfrm = ttfrm_to_tt[get_bits(gb, 2)];
+                v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
             }
         } else {
             v->ttmbf = 1;
@@ -1358,9 +1358,9 @@
     pqindex = get_bits(gb, 5);
     v->pqindex = pqindex;
     if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
-        v->pq = pquant_table[0][pqindex];
+        v->pq = vc1_pquant_table[0][pqindex];
     else
-        v->pq = pquant_table[1][pqindex];
+        v->pq = vc1_pquant_table[1][pqindex];
 
     v->pquantizer = 1;
     if (v->quantizer_mode == QUANT_FRAME_IMPLICIT)
@@ -1408,11 +1408,11 @@
         else v->tt_index = 2;
 
         lowquant = (v->pq > 12) ? 0 : 1;
-        v->mv_mode = mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
+        v->mv_mode = vc1_mv_pmode_table[lowquant][get_prefix(gb, 1, 4)];
         if (v->mv_mode == MV_PMODE_INTENSITY_COMP)
         {
             int scale, shift, i;
-            v->mv_mode2 = mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
+            v->mv_mode2 = vc1_mv_pmode_table2[lowquant][get_prefix(gb, 1, 3)];
             v->lumscale = get_bits(gb, 6);
             v->lumshift = get_bits(gb, 6);
             /* fill lookup tables for intensity compensation */
@@ -1477,7 +1477,7 @@
             v->ttmbf = get_bits(gb, 1);
             if (v->ttmbf)
             {
-                v->ttfrm = ttfrm_to_tt[get_bits(gb, 2)];
+                v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
             }
         } else {
             v->ttmbf = 1;
@@ -1527,7 +1527,7 @@
             v->ttmbf = get_bits(gb, 1);
             if (v->ttmbf)
             {
-                v->ttfrm = ttfrm_to_tt[get_bits(gb, 2)];
+                v->ttfrm = vc1_ttfrm_to_tt[get_bits(gb, 2)];
             }
         } else {
             v->ttmbf = 1;
@@ -2951,7 +2951,7 @@
     int ttblk = ttmb & 7;
 
     if(ttmb == -1) {
-        ttblk = ttblk_to_tt[v->tt_index][get_vlc2(gb, vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)];
+        ttblk = vc1_ttblk_to_tt[v->tt_index][get_vlc2(gb, vc1_ttblk_vlc[v->tt_index].table, VC1_TTBLK_VLC_BITS, 1)];
     }
     if(ttblk == TT_4X4) {
         subblkpat = ~(get_vlc2(gb, vc1_subblkpat_vlc[v->tt_index].table, VC1_SUBBLKPAT_VLC_BITS, 1) + 1);
--- a/vc1data.c	Sun May 06 11:23:12 2007 +0000
+++ b/vc1data.c	Sun May 06 11:40:42 2007 +0000
@@ -30,27 +30,27 @@
 #include "vc1data.h"
 
 /** Table for conversion between TTBLK and TTMB */
-const int ttblk_to_tt[3][8] = {
+const int vc1_ttblk_to_tt[3][8] = {
   { TT_8X4, TT_4X8, TT_8X8, TT_4X4, TT_8X4_TOP, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT },
   { TT_8X8, TT_4X8_RIGHT, TT_4X8_LEFT, TT_4X4, TT_8X4, TT_4X8, TT_8X4_BOTTOM, TT_8X4_TOP },
   { TT_8X8, TT_4X8, TT_4X4, TT_8X4_BOTTOM, TT_4X8_RIGHT, TT_4X8_LEFT, TT_8X4, TT_8X4_TOP }
 };
 
-const int ttfrm_to_tt[4] = { TT_8X8, TT_8X4, TT_4X8, TT_4X4 };
+const int vc1_ttfrm_to_tt[4] = { TT_8X8, TT_8X4, TT_4X8, TT_4X4 };
 
 /** MV P mode - the 5th element is only used for mode 1 */
-const uint8_t mv_pmode_table[2][5] = {
+const uint8_t vc1_mv_pmode_table[2][5] = {
   { MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_MIXED_MV },
   { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_INTENSITY_COMP, MV_PMODE_1MV_HPEL_BILIN }
 };
-const uint8_t mv_pmode_table2[2][4] = {
+const uint8_t vc1_mv_pmode_table2[2][4] = {
   { MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_MIXED_MV },
   { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_1MV_HPEL_BILIN }
 };
 
-const int fps_nr[5] = { 24, 25, 30, 50, 60 },
-  fps_dr[2] = { 1000, 1001 };
-const uint8_t pquant_table[3][32] = {
+const int vc1_fps_nr[5] = { 24, 25, 30, 50, 60 },
+  vc1_fps_dr[2] = { 1000, 1001 };
+const uint8_t vc1_pquant_table[3][32] = {
   {  /* Implicit quantizer */
      0,  1,  2,  3,  4,  5,  6,  7,  8,  6,  7,  8,  9, 10, 11, 12,
     13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 31
--- a/vc1data.h	Sun May 06 11:23:12 2007 +0000
+++ b/vc1data.h	Sun May 06 11:40:42 2007 +0000
@@ -29,16 +29,16 @@
 #define VC1DATA_H
 
 /** Table for conversion between TTBLK and TTMB */
-extern const int ttblk_to_tt[3][8];
+extern const int vc1_ttblk_to_tt[3][8];
 
-extern const int ttfrm_to_tt[4];
+extern const int vc1_ttfrm_to_tt[4];
 
 /** MV P mode - the 5th element is only used for mode 1 */
-extern const uint8_t mv_pmode_table[2][5];
-extern const uint8_t mv_pmode_table2[2][4];
+extern const uint8_t vc1_mv_pmode_table[2][5];
+extern const uint8_t vc1_mv_pmode_table2[2][4];
 
-extern const int fps_nr[5], fps_dr[2];
-extern const uint8_t pquant_table[3][32];
+extern const int vc1_fps_nr[5], vc1_fps_dr[2];
+extern const uint8_t vc1_pquant_table[3][32];
 
 /** @name VC-1 VLC tables and defines
  *  @todo TODO move this into the context