summaryrefslogtreecommitdiff
path: root/libavcodec/get_bits.h
Commit message (Collapse)AuthorAge
* lavc/get_bits: add a compat wrapper for the cached bitstream readerAnton Khirnov2023-01-06
| | | | Use that instead of the merged version.
* libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCMMartijn van Beurden2022-12-26
| | | | Add decoding of FLAC files coding for 32 bit-per-sample PCM to libavcodec.
* get_bits: move check_marker() to mpegvideodec.hAnton Khirnov2022-07-04
| | | | | It is only used by mpegvideo-based decoders - specifically mpeg12, intelh263, ituh263, mpeg4video.
* avcodec/vlc: Use structure instead of VLC_TYPE array as VLC elementAndreas Rheinhardt2022-06-17
| | | | | | | | | | | | | | | | | | In C, qualifiers for arrays are broken: const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE elements and unfortunately this is not compatible with a pointer to a const array of two VLC_TYPE, because the latter does not exist as array types are never qualified (the qualifier applies to the base type instead). This is the reason why get_vlc2() doesn't accept a const VLC table despite not modifying the table at all, as there is no automatic conversion from VLC_TYPE (*)[2] to const VLC_TYPE (*)[2]. Fix this by using a structure VLCElem for the VLC table. This also has the advantage of making it clear which element is which. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/get_bits: avoid avcodec.h dependencyAnton Khirnov2021-06-10
| | | | Include only defs.h, needed for AV_INPUT_BUFFER_PADDING_SIZE.
* avcodec/get_bits: cosmeticsRamiro Polla2020-03-22
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/get_bits: unbreak get_bits_le() with cached readerPaul B Mahol2019-04-19
|
* avcodec/get_bits: add assertion to limit ouptut value of get_bitsMarton Balint2019-03-01
| | | | | | | | | | | | | | | Should fix the following Coverity false positives: Coverity CID #1415651. Coverity CID #1420392. Coverity CID #1420473. Coverity CID #1433770. Coverity CID #1435320. Coverity CID #1439573. Coverity CID #1439580. Coverity CID #1439588. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/get_bits: use unsigned integers in show_bits and get_bitsMarton Balint2019-03-01
| | | | | | The return value is also unsigned. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/get_bits: actually make cached reader correctly disabledJames Almer2018-08-30
|
* avcodec/get_bits: add cached bitstream readerPaul B Mahol2018-08-30
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/get_bits: Document skip_bits_long()Michael Niedermayer2018-04-07
| | | | | Found-by: Kieran Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/get_bits: Make sure the input bitstream with padding can be addressedMichael Niedermayer2018-03-26
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/get_bits: Document the return code of get_vlc2()Michael Niedermayer2018-01-29
| | | | | | Found-by: kierank Reviewed-by: Kieran Kunhya <kieran618@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: add Newtek SpeedHQ decoderSteinar H. Gunderson2017-01-11
| | | | | | | | | | | | | | This decoder can decode all existing SpeedHQ formats (SHQ0–5, 7, and 9), including correct decoding of the alpha channel. 1080p is decoded in 142 fps on one core of my i7-4600U (2.1 GHz Haswell), about evenly split between bitstream reader and IDCT. There is currently no attempt at slice or frame threading, even though the format trivially supports both. NewTek very helpfully provided a full set of SHQ samples, as well as source code for an SHQ2 encoder (not included) and assistance with understanding some details of the format.
* avcodec/get_bits: add av_assert2 to get_bits_long()Paul B Mahol2016-12-18
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/get_bits: Fix get_sbits_long(0)Michael Niedermayer2016-12-03
| | | | | | | | Fixes undefined behavior Fixes: 640889-media Found-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '52567e8198669a1e7493c75771613f87a90466c3'Hendrik Leppkes2016-06-26
|\ | | | | | | | | | | | | * commit '52567e8198669a1e7493c75771613f87a90466c3': get_bits: Drop some TRACE-level debug code Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * get_bits: Drop some TRACE-level debug codeDiego Biurrun2016-05-22
| | | | | | | | It will not be provided by the new bit reader anyway.
* | Merge commit 'ffa190d0479d2370dd89c95692f822cbff2cc24c'Clément Bœsch2016-06-23
|\| | | | | | | | | | | | | * commit 'ffa190d0479d2370dd89c95692f822cbff2cc24c': Move VLC and RL_VLC_ELEM structure definitions to a separate header Merged-by: Clément Bœsch <u@pkh.me>
| * 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>
* | lavc/get_bits: add a logging context to check_marker()Clément Bœsch2016-06-22
| | | | | | | | Based on d338abb664febbc2c7266af7818aab1f12dbc161
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * 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
| |
* | get_bits: add get_bitsz for reading 0-25 bitsAndreas Cadhalpun2016-01-03
| | | | | | | | | | | | | | This can be used to simplify code in a couple of places. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNALKieran Kunhya2015-12-13
| |
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
| |
| * get_bits: remove unused assignmentVittorio Giovara2014-11-03
| | | | | | | | Bug-Id: CID 1238816
* | avcodec/get_bits: print details of the location of the missing bit in ↵Michael Niedermayer2015-04-14
| | | | | | | | | | | | check_marker() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b574e1e97ea7067a5fcd3876e30a67df0e4e6611'Michael Niedermayer2014-09-05
|\| | | | | | | | | | | | | | | | | | | * commit 'b574e1e97ea7067a5fcd3876e30a67df0e4e6611': get_bits: Add OPEN_READER macro variant w/o size_plus8 Conflicts: libavcodec/get_bits.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * get_bits: Add OPEN_READER macro variant w/o size_plus8Diego Biurrun2014-09-05
| | | | | | | | This avoids a trillion warnings from MSVC.
* | Merge commit '91d305790ea0f6fe0f54b48236da42181c39c18b'Michael Niedermayer2014-09-02
|\| | | | | | | | | | | | | | | | | | | * commit '91d305790ea0f6fe0f54b48236da42181c39c18b': get_bits: Rename HAVE_BITS_REMAINING --> BITS_AVAILABLE Conflicts: libavcodec/golomb.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | avcodec/get_bits: add BITS_LEFT() for finding the bits left with an opened ↵Michael Niedermayer2014-08-11
| | | | | | | | | | | | reader Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | get_bits: remove unused assignmentTimothy Gu2014-07-16
| | | | | | | | | | Signed-off-by: Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/bitstream: try to make vlc init code inherently thread safeMichael Niedermayer2014-06-16
| | | | | | | | | | | | also remove spinlock, it doesnt work on AIX Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: better level/index printingMatthew Lindner2014-05-09
| |
* | avcodec: include GET_RL_VLC() in trace outputMichael Niedermayer2014-05-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Various small spelling fixes.Reimar Döffinger2014-04-22
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avcodec/get_bits: add skip_1stop_8data_bitsMichael Niedermayer2013-10-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | skip_bits: dont call UPDATE_CACHEMichael Niedermayer2013-09-30
| | | | | | | | | | | | UPDATE_CACHE isnt needed and can cause segfaults Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/get_bits: place volatile at the right spotMichael Niedermayer2013-07-30
| | | | | | | | | | | | Should fix Ticket2825 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/get_bits: init_state is used for thread sync, make it volatileMichael Niedermayer2013-07-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>