Originally committed as revision 6726 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -51,7 +51,7 @@ static const uint8_t lps_range[64][4]= {
|
| 51 | 51 |
}; |
| 52 | 52 |
|
| 53 | 53 |
uint8_t ff_h264_mlps_state[4*64]; |
| 54 |
-uint8_t ff_h264_lps_range[4][2*64]; |
|
| 54 |
+uint8_t ff_h264_lps_range[4*2*64]; |
|
| 55 | 55 |
uint8_t ff_h264_lps_state[2*64]; |
| 56 | 56 |
uint8_t ff_h264_mps_state[2*64]; |
| 57 | 57 |
|
| ... | ... |
@@ -152,8 +152,8 @@ void ff_init_cabac_states(CABACContext *c){
|
| 152 | 152 |
|
| 153 | 153 |
for(i=0; i<64; i++){
|
| 154 | 154 |
for(j=0; j<4; j++){ //FIXME check if this is worth the 1 shift we save
|
| 155 |
- ff_h264_lps_range[j][2*i+0]= |
|
| 156 |
- ff_h264_lps_range[j][2*i+1]= lps_range[i][j]; |
|
| 155 |
+ ff_h264_lps_range[j*2*64+2*i+0]= |
|
| 156 |
+ ff_h264_lps_range[j*2*64+2*i+1]= lps_range[i][j]; |
|
| 157 | 157 |
} |
| 158 | 158 |
|
| 159 | 159 |
ff_h264_mlps_state[128+2*i+0]= |
| ... | ... |
@@ -33,6 +33,7 @@ |
| 33 | 33 |
#define CABAC_MASK ((1<<CABAC_BITS)-1) |
| 34 | 34 |
#define BRANCHLESS_CABAC_DECODER 1 |
| 35 | 35 |
#define CMOV_IS_FAST 1 |
| 36 |
+//#define ARCH_X86_DISABLED 1 |
|
| 36 | 37 |
|
| 37 | 38 |
typedef struct CABACContext{
|
| 38 | 39 |
int low; |
| ... | ... |
@@ -48,7 +49,7 @@ typedef struct CABACContext{
|
| 48 | 48 |
}CABACContext; |
| 49 | 49 |
|
| 50 | 50 |
extern uint8_t ff_h264_mlps_state[4*64]; |
| 51 |
-extern uint8_t ff_h264_lps_range[4][2*64]; ///< rangeTabLPS |
|
| 51 |
+extern uint8_t ff_h264_lps_range[4*2*64]; ///< rangeTabLPS |
|
| 52 | 52 |
extern uint8_t ff_h264_mps_state[2*64]; ///< transIdxMPS |
| 53 | 53 |
extern uint8_t ff_h264_lps_state[2*64]; ///< transIdxLPS |
| 54 | 54 |
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 | 524 |
#endif /* BRANCHLESS_CABAC_DECODER */ |
| 525 | 525 |
#else /* defined(ARCH_X86) && !(defined(PIC) && defined(__GNUC__)) */ |
| 526 | 526 |
int s = *state; |
| 527 |
- int RangeLPS= ff_h264_lps_range[0][2*(c->range&0xC0) + s]; |
|
| 527 |
+ int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + s]; |
|
| 528 | 528 |
int bit, lps_mask attribute_unused; |
| 529 | 529 |
|
| 530 | 530 |
c->range -= RangeLPS; |