You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
decrease ff_h264_norm_shift[] size
Originally committed as revision 6596 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -72,23 +72,15 @@ const uint8_t ff_h264_lps_state[64]= {
|
|||||||
36,36,37,37,37,38,38,63,
|
36,36,37,37,37,38,38,63,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t ff_h264_norm_shift[256]= {
|
const uint8_t ff_h264_norm_shift[128]= {
|
||||||
9,8,7,7,6,6,6,6,5,5,5,5,5,5,5,5,
|
7,6,5,5,4,4,4,4,3,3,3,3,3,3,3,3,
|
||||||
4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,
|
|
||||||
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
|
||||||
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
|
||||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
||||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
||||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
|
||||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
||||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -51,7 +51,7 @@ typedef struct CABACContext{
|
|||||||
extern const uint8_t ff_h264_lps_range[64][4];
|
extern const uint8_t ff_h264_lps_range[64][4];
|
||||||
extern const uint8_t ff_h264_mps_state[64];
|
extern const uint8_t ff_h264_mps_state[64];
|
||||||
extern const uint8_t ff_h264_lps_state[64];
|
extern const uint8_t ff_h264_lps_state[64];
|
||||||
extern const uint8_t ff_h264_norm_shift[256];
|
extern const uint8_t ff_h264_norm_shift[128];
|
||||||
|
|
||||||
|
|
||||||
void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size);
|
void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size);
|
||||||
@@ -270,7 +270,7 @@ static void refill2(CABACContext *c){
|
|||||||
int i, x;
|
int i, x;
|
||||||
|
|
||||||
x= c->low ^ (c->low-1);
|
x= c->low ^ (c->low-1);
|
||||||
i= 9 - ff_h264_norm_shift[x>>(CABAC_BITS+1)];
|
i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS+1)];
|
||||||
|
|
||||||
x= -CABAC_MASK;
|
x= -CABAC_MASK;
|
||||||
|
|
||||||
@@ -393,7 +393,7 @@ asm(
|
|||||||
#endif
|
#endif
|
||||||
renorm_cabac_decoder_once(c);
|
renorm_cabac_decoder_once(c);
|
||||||
}else{
|
}else{
|
||||||
bit= ff_h264_norm_shift[RangeLPS>>17];
|
bit= ff_h264_norm_shift[RangeLPS>>19];
|
||||||
c->low -= c->range;
|
c->low -= c->range;
|
||||||
*state= c->lps_state[s];
|
*state= c->lps_state[s];
|
||||||
c->range = RangeLPS<<bit;
|
c->range = RangeLPS<<bit;
|
||||||
|
Reference in New Issue
Block a user