summaryrefslogtreecommitdiff
path: root/libavcodec/cabac.c
Commit message (Collapse)AuthorAgeFilesLines
* doc: fix spelling errorsAndreas Cadhalpun2016-10-211-1/+1
| | | | | | | | Thanks to Mathieu Malaterre <malat@debian.org> for reporting the Que/Queue typo. (https://bugs.debian.org/839542) Reviewed-by: Lou Logan <lou@lrcd.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Merge commit '5c31eaa9998b2185e0aa04d11adff128498dc14a'Clément Bœsch2016-06-211-1/+1
|\ | | | | | | | | | | | | * commit '5c31eaa9998b2185e0aa04d11adff128498dc14a': Remove unnecessary get_bits.h #includes and add missing headers where needed. Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Remove unnecessary get_bits.h #includes and add missing headers where needed.Alexandra Hájková2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'Derek Buitenhuis2016-05-111-147/+0
|\ \ | |/ | | | | | | | | | | | | * commit 'd12b5b2f135aade4099f4b26b0fe678656158c13': build: Split test programs off into separate files Some conversions done by: James Almer <jamrial@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '29c2d06d67724e994980045afa055c6c34611b30'Derek Buitenhuis2016-02-241-1/+0
|\ \ | |/ | | | | | | | | | | * commit '29c2d06d67724e994980045afa055c6c34611b30': cosmetics: Drop empty comment lines Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * cosmetics: Drop empty comment linesDiego Biurrun2016-02-181-1/+0
| |
| * cabac: Make CABAC states hardcodedAnton Khirnov2015-10-081-101/+124
| | | | | | | | | | | | | | There is not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derekb@vimeo.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | fate/cabac: replace uninitialized bytes by random bytesMichael Niedermayer2016-01-231-1/+3
| | | | | | | | | | | | Fixes valgrind warning Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | cabac: Ensure 2-byte cabac loads are on 2-byte boundryJohn Cox2016-01-221-1/+10
| | | | | | | | | | | | | | Ensure that cabac init sets the bitstream pointer to an even value. It is often faster to load from an aligned boundry Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/cabac: Check initial cabac decoder stateMichael Niedermayer2015-11-271-1/+4
| | | | | | | | | | | | | | | | | | Fixes integer overflows Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Found-by: xiedingbao (Ticket4727) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | cabac: Make cabac starts hardcodedAnton Khirnov2015-10-101-83/+124
| | | | | | | | | | | | There's not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Revert "cabac: Allow hardcoding CABAC table."Derek Buitenhuis2015-10-101-2/+72
| | | | | | | | | | | | | | | | This becomes unuseful in the following commit. This reverts commit 092d1977cc7146f20c8db2155e7d648afb300de7. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avcodec/cabac: remove START/STOP_TIMER debug/benchmark codeMichael Niedermayer2015-04-181-8/+0
| | | | | | | | | | Found-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac-test: Return 1 if there are any errorsTimothy Gu2015-04-101-5/+11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac: Allow hardcoding CABAC table.Reimar Döffinger2014-09-061-72/+2
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | cabac: initialize all of ff_h264_cabac_tables programmatically.Reimar Döffinger2014-09-061-22/+4
| | | | | | | | | | | | Moves it from .data to .bss, slightly reducing binary size. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec'Michael Niedermayer2014-01-261-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'fb0c9d41d685abb58575c5482ca33b8cd457c5ec': avutil: remove timer.h include from internal.h Conflicts: libavcodec/ffv1dec.c libavutil/internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cabac: remove leftovers from the cabac encoderJanne Grunau2014-01-141-13/+0
| | | | | | | | | | | | The cabac encoder was only used by the removed cabac test. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | avcodec/cabac: force get_cabac to be not inlinedMichael Niedermayer2013-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | works around bug in gccs inline asm register assignment Fixes Ticket3177 gcc from 4.4 to 4.6 is affected at least, no non affected gccs known clang seems not affected Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/cabac: remove h264_lps_stateMichael Niedermayer2013-09-251-7/+1
| | | | | | | | | | | | | | The only use case of it was the selftest code, and there the slightly more complex indexing that is needed after its removial doesnt matter. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cab8c5f8e140c96ba3725ab709d823abfd1e31a5'Michael Niedermayer2013-09-251-0/+6
|\ \ | |/ | | | | | | | | | | | | * commit 'cab8c5f8e140c96ba3725ab709d823abfd1e31a5': h264: do not reinitialize the global cabac tables at each slice header See: 1e2e2c8095de2d9ea3259305cfeff28f40e4ca12 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: do not reinitialize the global cabac tables at each slice headerAnton Khirnov2013-09-241-0/+6
| |
* | Merge commit 'e880418660c80e2f12a123e131975cdb6b12cd13'Michael Niedermayer2013-09-251-7/+3
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'e880418660c80e2f12a123e131975cdb6b12cd13': cabac: remove write-only h264_mps_state[] Conflicts: libavcodec/cabac.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cabac: remove write-only h264_mps_state[]Anton Khirnov2013-09-241-6/+2
| |
* | avcodec: fix duplicate includesMichael Niedermayer2013-09-211-1/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-03-131-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: hqdn3d: Fix out of array read in LOWPASS cabac: remove unused argument of ff_init_cabac_states() rawdec: fix a typo -- || instead of | Conflicts: libavcodec/cabac.c libavcodec/h264.c libavfilter/vf_hqdn3d.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cabac: remove unused argument of ff_init_cabac_states()Michael Niedermayer2013-03-131-1/+2
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Drop broken and unused CABAC test program.Diego Biurrun2012-11-141-147/+0
| |
| * h264: use one table instead of several for cabac functionsRoland Scheidegger2012-04-281-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | The reason is this is easier for PIC code (in particular on darwin...). Keep the old names as pointers (static in cabac_functions.h so gcc knows these are just immediate offsets) so the c code can nicely stay the same (alternatively could use offsets directly in the functions needing the tables). This should produce the same code as before with non-pic and better code (confirmed) with pic. The assembly uses the new table but still won't work for PIC case. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | h264: ff_init_cabac_states doesnt use its argument thus remove itMichael Niedermayer2012-08-261-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac: use av_assertMichael Niedermayer2012-07-071-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: use one table instead of several for cabac functionsRoland Scheidegger2012-04-281-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | The reason is this is easier for PIC code (in particular on darwin...). Keep the old names as pointers (static in cabac_functions.h so gcc knows these are just immediate offsets) so the c code can nicely stay the same (alternatively could use offsets directly in the functions needing the tables). This should produce the same code as before with non-pic and better code (confirmed) with pic. The assembly uses the new table but still won't work for PIC case. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: (trivial) make ff_h264_lps_state staticRoland Scheidegger2012-04-281-7/+7
| | | | | | | | | | | | | | not used outside the cabac test functions (which probably means it's a bad test if it doesn't use the same tables as the real functions?) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 1000l commit forgotten cabac fixMichael Niedermayer2012-01-141-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-141-6/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * cabac: split cabac.h into declarations and function definitionsDiego Biurrun2012-01-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | This fixes standalone compilation of some decoders with --disable-optimizations. cabac.h defines some inline functions that use symbols from cabac.c. Without optimizations these inline functions are not eliminated and linking fails with references to non-existing symbols. Splitting the inline functions off into their own header and only #including it in the places where the inline functions are used allows #including cabac.h from anywhere without ill effects.
| * cabac: Mark ff_h264_mps_state array as static, it is only used within cabac.c.Diego Biurrun2012-01-121-4/+4
| |
| * cabac: Remove ff_h264_lps_state array.Diego Biurrun2012-01-121-2/+0
| | | | | | | | It was only ever used in the cabac test program, but never initialized.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-101-74/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * cabac: remove put_cabac_u/ueg from cabac-test.Diego Biurrun2012-01-091-73/+0
| | | | | | | | | | The functions are not used in any part of Libav, therefore testing them in the cabac-test is unnecessary. Since this makes them unused, remove the functions.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-081-0/+25
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) cabac: Move code only used within the CABAC test program into the test program. vp56: Drop unnecessary cabac.h #include. h264-test: Initialize AVCodecContext.av_class. build: Skip compiling network.h and rtsp.h if networking is not enabled. cosmetics: drop some pointless parentheses Disable annoying warning without changing behavior faq: Solutions for common problems with sample paths when running FATE. avcodec: attempt to clarify the CODEC_CAP_DELAY documentation avcodec: fix avcodec_encode_audio() documentation. FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside. vqf: recognize more metadata chunks FATE test: BMV demuxer and associated video and audio decoders. FATE: indeo4 video decoder test. FATE: update xxan-wc4 test to a sample with more code coverage. Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream. g722enc: validate AVCodecContext.trellis g722enc: set frame_size, and also handle an odd number of input samples g722enc: split encoding into separate functions for trellis vs. no trellis mpegaudiodec: Use clearer pointer math tta: Fix returned error code at EOF ... Conflicts: libavcodec/h264.c libavcodec/indeo3.c libavcodec/interplayvideo.c libavcodec/ivi_common.c libavcodec/libxvidff.c libavcodec/mpegvideo.c libavcodec/ppc/mpegvideo_altivec.c libavcodec/tta.c libavcodec/utils.c libavfilter/vsrc_buffer.c libavformat/Makefile tests/fate/indeo.mak tests/ref/acodec/g722 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cabac: Move code only used within the CABAC test program into the test program.Diego Biurrun2012-01-071-0/+25
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-051-31/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (46 commits) mtv: Make sure audio_subsegments is not 0 v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined avconv: add symbolic names for -vsync parameters flvdec: Fix compiler warning for uninitialized variables rtsp: Fix compiler warning for uninitialized variable ulti: convert to new bytestream API. swscale: Use standard multiple inclusion guards in ppc/ header files. Place some START_TIMER invocations in separate blocks. v4l2: list available formats v4l2: set the proper codec_tag v4l2: refactor device_open v4l2: simplify away io_method v4l2: cosmetics v4l2: uniform and format options v4l2: do not force interlaced mode avio: exit early in fill_buffer without read_packet vc1dec: fix invalid memory access for small video dimensions rv34: fix invalid memory access for small video dimensions rv34: joint coefficient decoding and dequantization avplay: Don't call avio_set_interrupt_cb(NULL) ... Conflicts: Changelog avconv.c doc/APIchanges doc/indevs.texi libavcodec/adxenc.c libavcodec/dnxhdenc.c libavcodec/h264.c libavdevice/v4l2.c libavformat/flvdec.c libavformat/mtv.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cabac: drop unused and disabled get_cabac_u() / get_cabac_ueg() functionsDiego Biurrun2012-01-041-15/+0
| |
| * cabac: drop unused STRICT_LIMITS code branchDiego Biurrun2012-01-041-16/+0
| |
* | cabac test: Change input to test, so a wider range of states is tested.Michael Niedermayer2011-09-101-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac test: match encode and decode sideMichael Niedermayer2011-09-101-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac: fix cabac encoderMichael Niedermayer2011-09-101-0/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-07-171-0/+134
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffmpeg: fix some indentation ffmpeg: fix operation with --disable-avfilter simple_idct: remove disabled code motion_est: remove disabled code vc1: remove disabled code fate: separate lavf-mxf_d10 test from lavf-mxf cabac: Move code only used in the cabac test program to cabac.c. ffplay: warn that -pix_fmt is no longer working, suggest alternative ffplay: warn that -s is no longer working, suggest alternative lavf: rename enc variable in utils.c:has_codec_parameters() lavf: use designated initialisers for all (de)muxers. wav: remove a use of deprecated AV_METADATA_ macro rmdec: remove useless ap parameter from rm_read_header_old() dct-test: remove write-only variable des: fix #if conditional around P_shuffle Use LOCAL_ALIGNED in ff_check_alignment() Conflicts: ffmpeg.c libavformat/avidec.c libavformat/matroskaenc.c libavformat/mp3enc.c libavformat/oggenc.c libavformat/utils.c tests/ref/lavf/mxf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cabac: Move code only used in the cabac test program to cabac.c.Diego Biurrun2011-07-171-0/+134
| |