summaryrefslogtreecommitdiff
path: root/libavcodec/cabac.c
Commit message (Collapse)AuthorAge
* avcodec/cabac: Move encoder related stuff to libavcodec/tests/cabac.cAndreas Rheinhardt2021-02-02
| | | | | | | (This is actually the second time the encoder stuff is removed; the first was in 8b4119187b62d6932e07aded11d33d3b24e1b42f.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov2021-01-01
| | | | They are not properly namespaced and not intended for public use.
* libavcodec, libpostproc: Remove outcommented START/STOP_TIMERAndreas Rheinhardt2020-03-14
| | | | | | | as well as includes of libavutil/timer.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Fix missing used attribute for inline assembly variablesThomas Köppe2017-11-13
| | | | | | | | | | | | | Variables used in inline assembly need to be marked with attribute((used)). Static constants already were, via the define of DECLARE_ASM_CONST. But DECLARE_ALIGNED does not add this attribute, and some of the variables defined with it are const only used in inline assembly, and therefore appeared dead. This change adds a macro DECLARE_ASM_ALIGNED that marks variables as used. This change makes FFMPEG work with Clang's ThinLTO. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc: fix spelling errorsAndreas Cadhalpun2016-10-21
| | | | | | | | 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-21
|\ | | | | | | | | | | | | * 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-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'Derek Buitenhuis2016-05-11
|\| | | | | | | | | | | | | | | * 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-24
|\| | | | | | | | | | | | | * commit '29c2d06d67724e994980045afa055c6c34611b30': cosmetics: Drop empty comment lines Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
| |
| * cabac: Make CABAC states hardcodedAnton Khirnov2015-10-08
| | | | | | | | | | | | | | 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-23
| | | | | | | | | | | | Fixes valgrind warning Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | cabac: Ensure 2-byte cabac loads are on 2-byte boundryJohn Cox2016-01-22
| | | | | | | | | | | | | | 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-27
| | | | | | | | | | | | | | | | | | 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-10
| | | | | | | | | | | | 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-10
| | | | | | | | | | | | | | | | 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-18
| | | | | | | | | | 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-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac: Allow hardcoding CABAC table.Reimar Döffinger2014-09-06
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | cabac: initialize all of ff_h264_cabac_tables programmatically.Reimar Döffinger2014-09-06
| | | | | | | | | | | | 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-26
|\| | | | | | | | | | | | | | | | | | | | | * 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-14
| | | | | | | | | | | | 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-05
| | | | | | | | | | | | | | | | | | | | 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-25
| | | | | | | | | | | | | | 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-25
|\| | | | | | | | | | | | | | | * 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-24
| |
* | Merge commit 'e880418660c80e2f12a123e131975cdb6b12cd13'Michael Niedermayer2013-09-25
|\| | | | | | | | | | | | | | | | | | | * 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-24
| |
* | avcodec: fix duplicate includesMichael Niedermayer2013-09-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-03-13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-13
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Drop broken and unused CABAC test program.Diego Biurrun2012-11-14
| |
| * h264: use one table instead of several for cabac functionsRoland Scheidegger2012-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cabac: use av_assertMichael Niedermayer2012-07-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: use one table instead of several for cabac functionsRoland Scheidegger2012-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-28
| | | | | | | | | | | | | | 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-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-12
| | | | | | | | | | | | | | | | | | | | | | 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-12
| |
| * cabac: Remove ff_h264_lps_state array.Diego Biurrun2012-01-12
| | | | | | | | It was only ever used in the cabac test program, but never initialized.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-09
| | | | | | | | | | 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-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-07
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-04
| |
| * cabac: drop unused STRICT_LIMITS code branchDiego Biurrun2012-01-04
| |
* | cabac test: Change input to test, so a wider range of states is tested.Michael Niedermayer2011-09-10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>