summaryrefslogtreecommitdiffstats
path: root/libavcodec/golomb.h
Commit message (Collapse)AuthorAgeFilesLines
* get_se_golomb: fix decoding of very large valuesMichael Niedermayer2013-02-091-1/+5
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* golomb: check log validity before shiftingMichael Niedermayer2013-01-181-2/+6
| | | | | | Fixes invalid right shift in fate-cavs Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-12-081-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: golomb: use unsigned arithmetics in svq3_get_ue_golomb() x86: float_dsp: fix loading of the len parameter on x86-32 takdec: fix initialisation of LOCAL_ALIGNED array takdec: fix initialisation of LOCAL_ALIGNED array Conflicts: libavcodec/rv30.c libavcodec/svq3.c libavcodec/takdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * golomb: use unsigned arithmetics in svq3_get_ue_golomb()Janne Grunau2012-12-081-2/+3
| | | | | | | | | | | | | | | | | | | | This prevents undefined behaviour of signed left shift if the coded value is larger than 2^31. Large values are most likely invalid and caused errors or by feeding random. Validate every use of svq3_get_ue_golomb() and changed the place there the return value was compared with negative numbers. dirac.c was clean, fixed rv30 and svq3.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-011-2/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avcodec: Convert some commented-out printf/av_log instances to av_dlog avcodec: Drop silly and/or broken printf debug output avcodec: Drop some silly commented-out av_log() invocations avformat: Convert some commented-out printf/av_log instances to av_dlog avformat: Remove non-compiling and/or silly commented-out printf/av_log statements Remove some silly disabled code. ac3dec: ensure get_buffer() gets a buffer for the correct number of channels Conflicts: libavcodec/dnxhddec.c libavcodec/ffv1.c libavcodec/h264.c libavcodec/h264_parser.c libavcodec/mjpegdec.c libavcodec/motion_est_template.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo_enc.c libavcodec/put_bits.h libavcodec/ratecontrol.c libavcodec/wmaenc.c libavdevice/timefilter.c libavformat/asfdec.c libavformat/avidec.c libavformat/avienc.c libavformat/flvenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Drop some silly commented-out av_log() invocationsDiego Biurrun2012-10-011-2/+0
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-281-2/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libopus: Remap channels using libopus' internal remapping. Opus decoder using libopus avcodec: document the use of AVCodecContext.delay for audio decoding vc1dec: add flush function for WMV9 and VC-1 decoders http: Increase buffer sizes to cope with longer URIs nutenc: const correctness for ff_put_v_trace/put_s_trace function arguments h264_refs: Fix debug tprintf argument types golomb: const correctness for get_ue()/get_se() function arguments get_bits: const correctness for get_bits_trace()/get_xbits_trace() arguments Conflicts: Changelog libavcodec/Makefile libavcodec/version.h libavformat/http.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * golomb: const correctness for get_ue()/get_se() function argumentsDiego Biurrun2012-09-271-2/+6
| |
| * golomb: check remaining bits during unary decoding in get_ur_golomb_jpegls()Justin Ruggles2012-06-121-1/+1
| | | | | | | | | | | | | | | | | | Fixes infinite loop in FLAC decoding in case of a truncated bitstream due to the safe bitstream reader returning 0's at the end. Fixes Bug 310. CC:libav-stable@libav.org
* | golomb: use av_assertMichael Niedermayer2012-06-061-7/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-251-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: docs: use -bsf:[vas] instead of -[vas]bsf. mpegaudiodec: Prevent premature clipping of mp3 input buffer. lavf: move the packet keyframe setting code. oggenc: free comment header for all codecs lcl: error out if uncompressed input buffer is smaller than framesize. mjpeg: abort decoding if packet is too large. golomb: use HAVE_BITS_REMAINING() macro to prevent infloop on EOF. get_bits: add HAVE_BITS_REMAINING macro. lavf/output-example: use new audio encoding API correctly. lavf/output-example: more proper usage of the new API. tiff: Prevent overreads in the type_sizes array. tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned. apetag: do not leak memory if avio_read() fails apetag: propagate errors. SBR DSP x86: implement SSE sbr_hf_g_filt SBR DSP x86: implement SSE sbr_sum_square_sse SBR DSP: use intptr_t for the ixh parameter. Conflicts: doc/bitstream_filters.texi doc/examples/muxing.c doc/ffmpeg.texi libavcodec/golomb.h libavcodec/x86/Makefile libavformat/oggenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * golomb: use HAVE_BITS_REMAINING() macro to prevent infloop on EOF.Ronald S. Bultje2012-02-241-1/+1
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-181-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) als: prevent infinite loop in zero_remaining(). cook: prevent div-by-zero if channels is zero. pamenc: switch to encode2(). svq1enc: switch to encode2(). dvenc: switch to encode2(). dpxenc: switch to encode2(). pngenc: switch to encode2(). v210enc: switch to encode2(). xwdenc: switch to encode2(). ttadec: use branchless unsigned-to-signed unfolding avcodec: add a Sun Rasterfile encoder sunrast: Move common defines to a new header file. cdxl: fix video decoding for some files cdxl: fix audio for some samples apetag: add proper support for binary tags ttadec: remove dead code swscale: make access to filter data conditional on filter type. swscale: update context offsets after removal of AlpMmxFilter. prores: initialise encoder and decoder parts only when needed swscale: make monowhite/black RGB-independent. ... Conflicts: Changelog libavcodec/alsdec.c libavcodec/dpxenc.c libavcodec/golomb.h libavcodec/pamenc.c libavcodec/pngenc.c libavformat/img2.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * flac: fix infinite loops on all-zero input or end-of-stream.Ronald S. Bultje2012-02-161-1/+1
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
| * golomb: avoid infinite loop on all-zero input (or end of buffer).Ronald S. Bultje2012-02-161-2/+2
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | golomb: Fix infinite loop in svq3_get_ue_golomb()Michael Niedermayer2011-12-251-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | golomb: fix end of bitstream checkMichael Niedermayer2011-12-211-1/+1
| | | | | | | | | | | | | | Fixes Ticket806 Bug found by Oana Stratulat Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | golomb: Fix overread in get_ur_golomb_jpegls()Nir Ben David2011-11-101-0/+2
| | | | | | | | | | | | Fixes Ticket600 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-121-0/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (23 commits) fix AC3ENC_OPT_MODE_ON/OFF h264: fix HRD parameters parsing prores: implement multithreading. prores: idct sse2/sse4 optimizations. swscale: use aligned move for storage into temporary buffer. prores: extract idct into its own dspcontext and merge with put_pixels. h264: fix invalid shifts in init_cavlc_level_tab() intfloat_readwrite: fix signed addition overflows mov: do not misreport empty stts mov: cosmetics, fix for and if spacing id3v2: fix NULL pointer dereference mov: read album_artist atom mov: fix disc/track numbers and totals doc: fix references to obsolete presets directories for avconv/ffmpeg flashsv: return more meaningful error value flashsv: fix typo in av_log() message smacker: validate channels and sample format. smacker: check buffer size before reading output size smacker: validate number of channels smacker: Separate audio flags from sample rates in smacker demuxer. ... Conflicts: cmdutils.h doc/ffmpeg.texi libavcodec/Makefile libavcodec/motion_est_template.c libavformat/id3v2.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: fix HRD parameters parsingMans Rullgard2011-10-111-0/+14
| | | | | | | | | | | | | | | | | | | | The bit_rate_value_minus1 and cpb_size_value_minus1 elements allow a wider range than get_ue_golomb() supports. This adds a get_ue_golomb_long() function supporting up to 31 leading zeros, which is the maximum for these syntax elements, and uses it in decode_hrd_parameters(). Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
|/ | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-201-1/+1
| | | | | | | | 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
* Make get_ur_golomb capable of reading 16 bit values.Lars Täuber2009-09-111-2/+6
| | | | | | Patch by Lars Täuber: firstname taeuber gmx net Originally committed as revision 19821 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Rename bitstream.h to get_bits.h.Stefano Sabatini2009-04-131-1/+1
| | | | Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split bitstream.h, put the bitstream writer stuff in the new fileStefano Sabatini2009-04-121-0/+1
| | | | | | put_bits.h. Originally committed as revision 18461 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix get_ur_golomb_jpegls() with A32_BITSTREAM_READERMåns Rullgård2009-02-241-1/+1
| | | | | | | | If k==0, log==0 can indicate that the coded value uses more than MIN_CACHE_BITS bits. With MIN_CACHE_BITS==32, the fast branch is incorrectly taken in this case unless explicitly forbidden. Originally committed as revision 17550 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Clarify get_ue_golomb_31() behavior with >31.Michael Niedermayer2009-02-181-1/+2
| | | | Originally committed as revision 17429 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use full internal pathname in doxygen @file directives.Diego Biurrun2009-02-011-1/+1
| | | | | | | Otherwise doxygen complains about ambiguous filenames when files exist under the same name in different subdirectories. Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add get_ue_golomb_31()Michael Niedermayer2008-12-231-0/+17
| | | | Originally committed as revision 16298 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix regression test failure caused by golomb limit not being consideredMichael Niedermayer2008-09-161-1/+1
| | | | | | in r15334. Originally committed as revision 15338 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Correct the threshold of get_ur_golomb_jpegls() at which the optimizedMichael Niedermayer2008-09-151-1/+1
| | | | | | | case is used. Fix issue245. Originally committed as revision 15334 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Globally rename the header inclusion guard names.Stefano Sabatini2008-08-311-3/+3
| | | | | | | | | Consistently apply this rule: the guard name is obtained from the filename by stripping the leading "lib", converting '/' and '.' to '_' and uppercasing the resulting name. Guard names in the root directory have to be prefixed by "FFMPEG_". Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
* bitstream: move put_sbits() from flacenc.c to bitstream.h and use itRamiro Polla2008-07-131-1/+1
| | | | | | throughout libavcodec. Originally committed as revision 14204 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add FFMPEG_ prefix to all multiple inclusion guards.Diego Biurrun2007-10-171-3/+3
| | | | Originally committed as revision 10765 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make the Golomb decoder work for DiracMarco Gerards2007-08-151-11/+32
| | | | Originally committed as revision 10119 to svn://svn.ffmpeg.org/ffmpeg/trunk
* license header consistency cosmeticsDiego Biurrun2007-07-051-1/+0
| | | | Originally committed as revision 9484 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add a comment to indicate which #endif belong to which #defineGuillaume Poirier2007-06-171-1/+1
| | | | Originally committed as revision 9356 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add multiple inclusion guards to headersMåns Rullgård2007-06-171-0/+5
| | | | Originally committed as revision 9345 to svn://svn.ffmpeg.org/ffmpeg/trunk
* include all prerequisites in header filesMåns Rullgård2007-06-161-0/+3
| | | | Originally committed as revision 9344 to svn://svn.ffmpeg.org/ffmpeg/trunk
* handle limit>32 for set_ur_golomb_jpegls()Kostya Shishkov2006-10-221-0/+4
| | | | Originally committed as revision 6754 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change license headers to say 'FFmpeg' instead of 'this program/this library'Diego Biurrun2006-10-071-4/+6
| | | | | | and fix GPL/LGPL version mismatches. Originally committed as revision 6577 to svn://svn.ffmpeg.org/ffmpeg/trunk
* first rudimentary version of (Justin Ruggles jruggle earthlink net) flac ↵Michael Niedermayer2006-06-241-0/+4
| | | | | | encoder Originally committed as revision 5514 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Update licensing information: The FSF changed postal address.Diego Biurrun2006-01-121-1/+1
| | | | Originally committed as revision 4842 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: tabs --> spaces, some prettyprintingDiego Biurrun2005-12-221-2/+2
| | | | Originally committed as revision 4764 to svn://svn.ffmpeg.org/ffmpeg/trunk
* COSMETICS: Remove all trailing whitespace.Diego Biurrun2005-12-171-42/+42
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* set_se_golomb can only write 16bits, add a note about this (ok, maybe it's ↵Alex Beregszaszi2005-10-121-1/+3
| | | | | | brain dead using it with more than 16bits, but..) Originally committed as revision 4635 to svn://svn.ffmpeg.org/ffmpeg/trunk
* shorten decoder by (Jeff Muizelaar <jrmuizel gmail com>)Michael Niedermayer2005-02-261-0/+21
| | | | Originally committed as revision 3984 to svn://svn.ffmpeg.org/ffmpeg/trunk
* svq3_get_se_golomb() fixMichael Niedermayer2005-01-191-2/+5
| | | | Originally committed as revision 3849 to svn://svn.ffmpeg.org/ffmpeg/trunk
* compile with TRACE define patch by (Loic <lll+ffmpeg m4x org>)Loïc Le Loarer2005-01-191-3/+3
| | | | Originally committed as revision 3848 to svn://svn.ffmpeg.org/ffmpeg/trunk
* get/set_sr_golomb() cleanupMichael Niedermayer2004-09-101-26/+3
| | | | Originally committed as revision 3451 to svn://svn.ffmpeg.org/ffmpeg/trunk
OpenPOWER on IntegriCloud