diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-10 02:50:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-10 03:50:41 +0100 |
commit | dd3ca3ea15392da8636c06764e2da31e6ca700f0 (patch) | |
tree | 97d3fc3bdb9463a99728e14d3cd4a0062aa3af19 /libavcodec/cabac.c | |
parent | 4805a33043e9356fc344aa53c7df747d41ce6b37 (diff) | |
parent | a67b8c86d06eb5b78a0fe4cb9be4e93b29726db1 (diff) | |
download | ffmpeg-dd3ca3ea15392da8636c06764e2da31e6ca700f0.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
fate: Add tests for more AAC features.
aacps: Add missing newline in error message.
fate: Add tests for vc1/wmapro in ism.
aacdec: Add a fate test for 5.1 channel SBR.
aacdec: Turn off PS for multichannel files that use PCE based configs.
cabac: remove put_cabac_u/ueg from cabac-test.
swscale: RGB4444 and BGR444 input
FATE: add test for xWMA demuxer.
FATE: add test for SMJPEG demuxer and associated IMA ADPCM audio decoder.
mpegaudiodec: optimized iMDCT transform
mpegaudiodec: change imdct window arrangment for better pointer alignment
mpegaudiodec: move imdct and windowing function to mpegaudiodsp
mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementations
swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.
FATE: test to exercise WTV demuxer.
mjpegdec: K&R formatting cosmetics
swscale: K&R formatting cosmetics for code examples
swscale: K&R reformatting cosmetics for header files
FATE test: cvid-grayscale; ensures that the grayscale Cinepak variant is exercised.
Conflicts:
libavcodec/cabac.c
libavcodec/mjpegdec.c
libavcodec/mpegaudiodec.c
libavcodec/mpegaudiodsp.c
libavcodec/mpegaudiodsp.h
libavcodec/mpegaudiodsp_template.c
libavcodec/x86/Makefile
libavcodec/x86/imdct36_sse.asm
libavcodec/x86/mpegaudiodec_mmx.c
libswscale/swscale-test.c
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/x86/swscale_template.c
tests/fate/demux.mak
tests/fate/microsoft.mak
tests/fate/video.mak
tests/fate/wma.mak
tests/ref/lavfi/pixfmts_scale
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cabac.c')
-rw-r--r-- | libavcodec/cabac.c | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index 983614581d..6cabfb9e73 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -252,67 +252,6 @@ static int put_cabac_terminate(CABACContext *c, int bit){ return (put_bits_count(&c->pb)+7)>>3; } -/** - * put (truncated) unary binarization. - */ -static void put_cabac_u(CABACContext *c, uint8_t * state, int v, int max, int max_index, int truncated){ - int i; - - assert(v <= max); - - for(i=0; i<v; i++){ - put_cabac(c, state, 1); - if(i < max_index) state++; - } - if(truncated==0 || v<max) - put_cabac(c, state, 0); -} - -/** - * put unary exp golomb k-th order binarization. - */ -static void put_cabac_ueg(CABACContext *c, uint8_t * state, int v, int max, int is_signed, int k, int max_index){ - int i; - - if(v==0) - put_cabac(c, state, 0); - else{ - const int sign= v < 0; - - if(is_signed) v= FFABS(v); - - if(v<max){ - for(i=0; i<v; i++){ - put_cabac(c, state, 1); - if(i < max_index) state++; - } - - put_cabac(c, state, 0); - }else{ - int m= 1<<k; - - for(i=0; i<max; i++){ - put_cabac(c, state, 1); - if(i < max_index) state++; - } - - v -= max; - while(v >= m){ //FIXME optimize - put_cabac_bypass(c, 1); - v-= m; - m+= m; - } - put_cabac_bypass(c, 0); - while(m>>=1){ - put_cabac_bypass(c, v&m); - } - } - - if(is_signed) - put_cabac_bypass(c, sign); - } -} - int main(void){ CABACContext c; uint8_t b[9*SIZE]; @@ -342,19 +281,6 @@ START_TIMER STOP_TIMER("put_cabac") } -#if 0 - for(i=0; i<SIZE; i++){ -START_TIMER - put_cabac_u(&c, state, r[i], 6, 3, i&1); -STOP_TIMER("put_cabac_u") - } - - for(i=0; i<SIZE; i++){ -START_TIMER - put_cabac_ueg(&c, state, r[i], 3, 0, 1, 2); -STOP_TIMER("put_cabac_ueg") - } -#endif put_cabac_terminate(&c, 1); ff_init_cabac_decoder(&c, b, SIZE); |