Commit d5cc14d4 authored by gpoirier's avatar gpoirier

Kill a warning with MSVC

Patch by Jindrich Makovicka makovick A gmail P com
Original thread:
Date: 08:21 AM
Subject Re: [Ffmpeg-devel] Weird line in cabac.h


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6726 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 06e9aa9f
...@@ -51,7 +51,7 @@ static const uint8_t lps_range[64][4]= { ...@@ -51,7 +51,7 @@ static const uint8_t lps_range[64][4]= {
}; };
uint8_t ff_h264_mlps_state[4*64]; uint8_t ff_h264_mlps_state[4*64];
uint8_t ff_h264_lps_range[4][2*64]; uint8_t ff_h264_lps_range[4*2*64];
uint8_t ff_h264_lps_state[2*64]; uint8_t ff_h264_lps_state[2*64];
uint8_t ff_h264_mps_state[2*64]; uint8_t ff_h264_mps_state[2*64];
...@@ -152,8 +152,8 @@ void ff_init_cabac_states(CABACContext *c){ ...@@ -152,8 +152,8 @@ void ff_init_cabac_states(CABACContext *c){
for(i=0; i<64; i++){ for(i=0; i<64; i++){
for(j=0; j<4; j++){ //FIXME check if this is worth the 1 shift we save for(j=0; j<4; j++){ //FIXME check if this is worth the 1 shift we save
ff_h264_lps_range[j][2*i+0]= ff_h264_lps_range[j*2*64+2*i+0]=
ff_h264_lps_range[j][2*i+1]= lps_range[i][j]; ff_h264_lps_range[j*2*64+2*i+1]= lps_range[i][j];
} }
ff_h264_mlps_state[128+2*i+0]= ff_h264_mlps_state[128+2*i+0]=
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#define CABAC_MASK ((1<<CABAC_BITS)-1) #define CABAC_MASK ((1<<CABAC_BITS)-1)
#define BRANCHLESS_CABAC_DECODER 1 #define BRANCHLESS_CABAC_DECODER 1
#define CMOV_IS_FAST 1 #define CMOV_IS_FAST 1
//#define ARCH_X86_DISABLED 1
typedef struct CABACContext{ typedef struct CABACContext{
int low; int low;
...@@ -48,7 +49,7 @@ typedef struct CABACContext{ ...@@ -48,7 +49,7 @@ typedef struct CABACContext{
}CABACContext; }CABACContext;
extern uint8_t ff_h264_mlps_state[4*64]; extern uint8_t ff_h264_mlps_state[4*64];
extern uint8_t ff_h264_lps_range[4][2*64]; ///< rangeTabLPS extern uint8_t ff_h264_lps_range[4*2*64]; ///< rangeTabLPS
extern uint8_t ff_h264_mps_state[2*64]; ///< transIdxMPS extern uint8_t ff_h264_mps_state[2*64]; ///< transIdxMPS
extern uint8_t ff_h264_lps_state[2*64]; ///< transIdxLPS extern uint8_t ff_h264_lps_state[2*64]; ///< transIdxLPS
extern const uint8_t ff_h264_norm_shift[512]; extern const uint8_t ff_h264_norm_shift[512];
...@@ -524,7 +525,7 @@ static int always_inline get_cabac_inline(CABACContext *c, uint8_t * const state ...@@ -524,7 +525,7 @@ static int always_inline get_cabac_inline(CABACContext *c, uint8_t * const state
#endif /* BRANCHLESS_CABAC_DECODER */ #endif /* BRANCHLESS_CABAC_DECODER */
#else /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */ #else /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */
int s = *state; int s = *state;
int RangeLPS= ff_h264_lps_range[0][2*(c->range&0xC0) + s]; int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s];
int bit, lps_mask attribute_unused; int bit, lps_mask attribute_unused;
c->range -= RangeLPS; c->range -= RangeLPS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment