summaryrefslogtreecommitdiff
path: root/libavcodec/get_bits.h
Commit message (Collapse)AuthorAge
* get_bits: Drop some TRACE-level debug codeDiego Biurrun2016-05-22
| | | | It will not be provided by the new bit reader anyway.
* Move VLC and RL_VLC_ELEM structure definitions to a separate headerAlexandra Hájková2016-05-17
| | | | | | | Use the newly created vlc.h directly instead of including get_bits when needed. The VLC and RL_VLC_ELEM structures are independent from the bitreader. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Move check_marker() from get_bits to mpeg4videodecAlexandra Hájková2016-05-16
| | | | | | MPEG-4 is the only decoder which uses check_marker(). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavc: Add get_bitsz()Andreas Cadhalpun2016-01-11
| | | | | | get_bit variant supporting 0-bits reads. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNALKieran Kunhya2016-01-11
|
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
|
* get_bits: remove unused assignmentVittorio Giovara2014-11-03
| | | | Bug-Id: CID 1238816
* get_bits: Add OPEN_READER macro variant w/o size_plus8Diego Biurrun2014-09-05
| | | | This avoids a trillion warnings from MSVC.
* get_bits: Rename HAVE_BITS_REMAINING --> BITS_AVAILABLEDiego Biurrun2014-09-02
| | | | The HAVE_ prefix is reserved for macros set by configure.
* get_bits: Return pointer to buffer that is the result of the alignmentRonald S. Bultje2013-02-19
| | | | | | | This allows more transparent mixing of get_bits and whole-byte access without having to touch get_bits internals. Signed-off-by: Martin Storsjö <martin@martin.st>
* get_bits/put_bits: K&R formatting cosmeticsDiego Biurrun2013-01-21
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* get_bits: change the failure condition in init_get_bitsLuca Barbato2013-01-20
| | | | | | | Too much code relies in having init_get_bits fed with a valid buffer and set its dimension to 0. Check for NULL buffer instead.
* lavc: introduce the convenience function init_get_bits8Luca Barbato2013-01-14
| | | | | Accept the buffer size in bytes and check for overflow before passing the value in bits to init_get_bits.
* lavc: check for overflow in init_get_bitsLuca Barbato2013-01-14
| | | | | | | Fix an undefined behaviour and make the function return a proper error in case of overflow. CC: libav-stable@libav.org
* bitstream: add get_bits64() to support reading more than 32 bits at onceMichael Niedermayer2012-12-07
| | | | | | | Also remove a duplicate function in the MPEG-TS demuxer. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* get_bits: const correctness for get_bits_trace()/get_xbits_trace() argumentsDiego Biurrun2012-09-27
|
* get_bits: add HAVE_BITS_REMAINING macro.Ronald S. Bultje2012-02-24
|
* vlc/rl: Add ff_ prefix to the nonstatic symbolsMartin Storsjö2012-02-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Drop ALT_ prefix from BITSTREAM_READER_LE name.Diego Biurrun2011-12-22
| | | | | The prefix is a historic remnant that probably meant "alternative". Now that the A32 bitstream reader has been dropped it makes no sense anymore.
* get_bits: remove LAST_SKIP_CACHE macroMans Rullgard2011-12-17
| | | | | | This macro is empty since the removal of the A32 bitstream reader. Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: remove strange/obsolete commentsMans Rullgard2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: whitespace (mostly) cosmeticsMans Rullgard2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: remove unnecessary #includesMans Rullgard2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: introduce safe bitreading to prevent overreads.Ronald S. Bultje2011-12-17
| | | | | | | | | | | | | | | When turned on, H264/CAVLC gets ~15% (CVPCMNL1_SVA_C.264) slower for ultra-high-bitrate files, or ~2.5% (CVFI1_SVA_C.264) for lower-bitrate files. Other codecs are affected to a lesser extent because they are less optimized; e.g., VC-1 slows down by less than 1% (all on x86). The patch generated 3 extra instructions (cmp, cmovae and mov) per call to get_bits(). The performance penalty on ARM is within the error margin for most files, up to 4% in extreme cases such as CVPCMNL1_SVA_C.264. Based on work (for GCI) by Aneesh Dogra <lionaneesh@gmail.com>, and inspired by patch in Chromium by Chris Evans <cevans@chromium.org>.
* get_bits: remove A32 variantMans Rullgard2011-12-16
| | | | | | | | | | | | | | | | | The A32 bitstream reader variant is only used on ARMv5 and for Prores due to the larger bit cache this decoder requires. In benchmarks on ARMv5 (Marvell Sheeva) with gcc 4.6, the only statistically significant difference between ALT and A32 is a 4% advantage for ALT in FLAC decoding. There is thus no (longer) any reason to keep the A32 reader from this point of view. This patch adds an option to the ALT reader increasing the bit cache to 32 bits as required by the Prores decoder. Benchmarking shows no significant change in speed on Intel i7. Again, the A32 reader fails to justify its existence. Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: remove useless pointer castsMans Rullgard2011-12-16
| | | | | | These pointers are already of the correct type. Signed-off-by: Mans Rullgard <mans@mansr.com>
* doxygen: misc consistency, spelling and wording fixesDiego Biurrun2011-12-12
|
* get_bits: remove x86 inline asm in A32 bitstream readerMans Rullgard2011-07-01
| | | | | | | x86 does not use this variant so having inline asm there is pointless. Signed-off-by: Mans Rullgard <mans@mansr.com>
* cosmetics: fix some then/than typosDiego Biurrun2011-06-30
|
* get_bits: add av_unused tag to cache variableMans Rullgard2011-05-28
| | | | | | | This silences numerous compiler warnings from skip_bits(), where the cache variable is not used. Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: make cache unsigned to eliminate undefined signed overflow.Alex Converse2011-05-03
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: move tracing macros to end of fileMans Rullgard2011-01-23
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Sanitise get_bits macros, part 2Mans Rullgard2011-01-23
| | | | | | | These whitespace changes improve the readability of the get_bits macros. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Sanitise get_bits macros, part 1Mans Rullgard2011-01-23
| | | | | | | | | Some of the macros in get_bits.h include a final semicolon, some do not. This removes these or adds do {} while(0) around the macros as appropriate and adds semicolons where needed in calling code. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove "libmpeg2" bitstream readerMans Rullgard2011-01-23
| | | | | | | | | | Using the libmpeg2 reader causes errors in a multitude of places, including MPEG and H264 codecs. As the advantage of this reader is questionable, removing it seems the sensible course of action, especially considering the simplifications this allows elsewhere with the bit cache size increasing from 17 to 25 bits as minimum. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add av_ prefix to bswap macrosMåns Rullgård2010-07-10
| | | | Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
* bswap: change ME to NE in macro namesMåns Rullgård2010-07-10
| | | | | | | Other parts of FFmpeg use NE (native endian) rather than ME (machine). This makes it consistent. Originally committed as revision 24169 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-20
| | | | | | | | Passing an explicit filename to this command is only necessary if the documentation in the @file block refers to a file different from the one the block resides in. Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
* get/show_bits() can read up to MIN_CACHE_BITS bitsMåns Rullgård2010-02-21
| | | | | | | The limit for get/show_bits_long() to use get/show_bits() directly should be MIN_CACHE_BITS, not 17. Originally committed as revision 21951 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Deobfuscate LE SHOW_[SU]BITS; these are simple sign/zero-extendMåns Rullgård2010-02-21
| | | | Originally committed as revision 21948 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move NEG_[US]SR32 macros to mathops.hMåns Rullgård2010-02-17
| | | | Originally committed as revision 21873 to svn://svn.ffmpeg.org/ffmpeg/trunk
* get_bits: Fix spelling and grammar in GET_VLC() comment.Alex Converse2010-02-17
| | | | Originally committed as revision 21868 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Mark index as unsigend so gcc knows it doesnt need a sign extension on x86_64.Michael Niedermayer2010-01-24
| | | | | | | | Any tips on how i can convince gcc that it doesnt need a mov %eax, %eax in every get_bits() ? Originally committed as revision 21433 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Added missing const to get_bits_count().Laurent Aimar2010-01-24
| | | | Originally committed as revision 21419 to svn://svn.ffmpeg.org/ffmpeg/trunk
* ARM: use ALT_BITSTREAM_READER on cores with fast unaligned accessMåns Rullgård2009-12-22
| | | | Originally committed as revision 20911 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make get_bits_left() available for use in libavcodec (was previously heldRonald S. Bultje2009-11-09
| | | | | | private in dv.c for some reason). See "[PATCH] get_bits_left()" thread. Originally committed as revision 20490 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move ff_reverse in libavcodec to av_reverse in libavutil.Francesco Lavra2009-11-09
| | | | | | Patch by Francesco Lavra, francescolavra interfree it Originally committed as revision 20484 to svn://svn.ffmpeg.org/ffmpeg/trunk