]> git.sesse.net Git - x264/blobdiff - common/bs.h
Faster chroma CBP handling
[x264] / common / bs.h
index e288603d5d70397411154100f53563a6eeaa8c73..a090988b11eddb8c36632efe2d03fd33bda7fa86 100644 (file)
@@ -58,7 +58,7 @@ typedef struct
 } x264_run_level_t;
 
 extern const vlc_t x264_coeff0_token[5];
-extern const vlc_t x264_coeff_token[5][16*4];
+extern const vlc_t x264_coeff_token[5][16][4];
 extern const vlc_t x264_total_zeros[15][16];
 extern const vlc_t x264_total_zeros_dc[3][4];
 extern const vlc_t x264_run_before[7][16];
@@ -257,12 +257,12 @@ static inline void bs_rbsp_trailing( bs_t *s )
     bs_write( s, s->i_left&7, 0  );
 }
 
-static inline int bs_size_ue( unsigned int val )
+static ALWAYS_INLINE int bs_size_ue( unsigned int val )
 {
     return x264_ue_size_tab[val+1];
 }
 
-static inline int bs_size_ue_big( unsigned int val )
+static ALWAYS_INLINE int bs_size_ue_big( unsigned int val )
 {
     if( val < 255 )
         return x264_ue_size_tab[val+1];
@@ -270,7 +270,7 @@ static inline int bs_size_ue_big( unsigned int val )
         return x264_ue_size_tab[(val+1)>>8] + 16;
 }
 
-static inline int bs_size_se( int val )
+static ALWAYS_INLINE int bs_size_se( int val )
 {
     int tmp = 1 - val*2;
     if( tmp < 0 ) tmp = val*2;
@@ -280,7 +280,7 @@ static inline int bs_size_se( int val )
         return x264_ue_size_tab[tmp>>8]+16;
 }
 
-static inline int bs_size_te( int x, int val )
+static ALWAYS_INLINE int bs_size_te( int x, int val )
 {
     if( x == 1 )
         return 1;