diff options
author | Jindřich Makovička <makovick@gmail.com> | 2006-10-18 09:37:25 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2006-10-18 09:37:25 +0000 |
commit | a0f2c6ba38b2159f5f23edfffa204e11533b0b41 (patch) | |
tree | 9a89359b84be855e17b6a7437165db7466fbc6cf /libavcodec | |
parent | 30865e2aa1f643486e5df4ab0689fb5261c3eba1 (diff) | |
download | ffmpeg-a0f2c6ba38b2159f5f23edfffa204e11533b0b41.tar.gz |
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
Originally committed as revision 6726 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cabac.c | 6 | ||||
-rw-r--r-- | libavcodec/cabac.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index 91db6c33ea..c6da6292a2 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -51,7 +51,7 @@ static const uint8_t lps_range[64][4]= { }; 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_mps_state[2*64]; @@ -152,8 +152,8 @@ void ff_init_cabac_states(CABACContext *c){ for(i=0; i<64; i++){ 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*i+1]= lps_range[i][j]; + ff_h264_lps_range[j*2*64+2*i+0]= + ff_h264_lps_range[j*2*64+2*i+1]= lps_range[i][j]; } ff_h264_mlps_state[128+2*i+0]= diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h index d50c181010..8059ba65d6 100644 --- a/libavcodec/cabac.h +++ b/libavcodec/cabac.h @@ -33,6 +33,7 @@ #define CABAC_MASK ((1<<CABAC_BITS)-1) #define BRANCHLESS_CABAC_DECODER 1 #define CMOV_IS_FAST 1 +//#define ARCH_X86_DISABLED 1 typedef struct CABACContext{ int low; @@ -48,7 +49,7 @@ typedef struct CABACContext{ }CABACContext; 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_lps_state[2*64]; ///< transIdxLPS 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 #endif /* BRANCHLESS_CABAC_DECODER */ #else /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */ 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; c->range -= RangeLPS; |