diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-14 02:22:09 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-14 02:22:09 +0100 |
commit | e986a5d10d95b62cd85aaefc7d4da34699fbedeb (patch) | |
tree | 38dddca2b4582111bcf1bcb6be2d1c6193300f2d /libavcodec/cabac.c | |
parent | 36397ea1c7e27ab850149cc61394c2baa26dd532 (diff) | |
parent | 68d6012c723bb520daac5336dcb046c0a5dd3826 (diff) | |
download | ffmpeg-e986a5d10d95b62cd85aaefc7d4da34699fbedeb.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
FATE: add tests for targa
ARM: fix Thumb-mode simple_idct_arm
ARM: 4-byte align start of all asm functions
rgb2rgb: rgb12to15()
swscale-test: fix stack overread.
swscale: fix invalid conversions and memory problems.
cabac: split cabac.h into declarations and function definitions
cabac: Mark ff_h264_mps_state array as static, it is only used within cabac.c.
cabac: Remove ff_h264_lps_state array.
Conflicts:
libswscale/rgb2rgb.h
libswscale/swscale_unscaled.c
tests/fate/image.mak
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cabac.c')
-rw-r--r-- | libavcodec/cabac.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index 6cabfb9e73..34ff40c44b 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -29,6 +29,7 @@ #include "libavutil/common.h" #include "get_bits.h" #include "cabac.h" +#include "cabac_functions.h" static const uint8_t lps_range[64][4]= { {128,176,208,240}, {128,167,197,227}, {128,158,187,216}, {123,150,178,205}, @@ -51,8 +52,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_state[2*64]; -uint8_t ff_h264_mps_state[2*64]; +static uint8_t h264_mps_state[2 * 64]; static const uint8_t mps_state[64]= { 1, 2, 3, 4, 5, 6, 7, 8, @@ -141,9 +141,9 @@ void ff_init_cabac_states(CABACContext *c){ } ff_h264_mlps_state[128+2*i+0]= - ff_h264_mps_state[2*i+0]= 2*mps_state[i]+0; + h264_mps_state[2 * i + 0] = 2 * mps_state[i] + 0; ff_h264_mlps_state[128+2*i+1]= - ff_h264_mps_state[2*i+1]= 2*mps_state[i]+1; + h264_mps_state[2 * i + 1] = 2 * mps_state[i] + 1; if( i ){ ff_h264_lps_state[2*i+0]= @@ -196,11 +196,10 @@ static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ if(bit == ((*state)&1)){ c->range -= RangeLPS; - *state= ff_h264_mps_state[*state]; + *state = h264_mps_state[*state]; }else{ c->low += c->range - RangeLPS; c->range = RangeLPS; - *state= ff_h264_lps_state[*state]; } renorm_cabac_encoder(c); |