summaryrefslogtreecommitdiff
path: root/libavcodec/rangecoder.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove/replace some unnecessary avcodec.h inclusionsAndreas Rheinhardt2021-07-221-1/+1
| | | | | | | Also remove other unnecessary headers and include headers directly while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rangecoder: Move ff_rac_check_termination to tests/rangecoder.cAndreas Rheinhardt2021-02-241-19/+0
| | | | | | It is only used there. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/rangecoder: Add and test ff_rac_check_termination()Michael Niedermayer2018-12-311-0/+19
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rangecoder: factorize termination version codeMichael Niedermayer2018-12-311-1/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rangecoder: Do not increase the pointer beyond the bufferMichael Niedermayer2017-08-181-0/+1
| | | | | | Fixes: undefined behavior Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rangecoder: Fix range coder corner case handlingMichael Niedermayer2017-05-131-1/+1
| | | | | | | Fixes: 1511/clusterfuzz-testcase-minimized-5906663800307712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rangecoder: Test for invalid corner caseMichael Niedermayer2017-05-081-0/+4
| | | | | | | | Fixes runtime error: left shift of 1912602815 by 8 places cannot be represented in type 'int' Fixes: 1403/clusterfuzz-testcase-minimized-4724820484816896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'Derek Buitenhuis2016-05-111-45/+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>
| * build: Split test programs off into separate filesDiego Biurrun2016-04-071-44/+0
| | | | | | | | | | This avoids spurious library rebuilds when only the test program code is changed and simplifies the build system.
* | Merge commit '3b08d9d932eef09403074d5af31e10d8011e840b'Derek Buitenhuis2016-04-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '3b08d9d932eef09403074d5af31e10d8011e840b': testprogs: K&R formatting cosmetics Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * testprogs: K&R formatting cosmeticsDiego Biurrun2016-03-241-1/+1
| |
* | 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
| |
* | Merge commit 'abe9adfb31566c415fd830a8d4977c79512d4385'Hendrik Leppkes2015-10-051-2/+4
|\ \ | |/ | | | | | | | | | | * commit 'abe9adfb31566c415fd830a8d4977c79512d4385': rangecoder: Use AV_RB16 instead of bytestream_get_be16 Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * rangecoder: Use AV_RB16 instead of bytestream_get_be16Vittorio Giovara2015-10-041-2/+4
| | | | | | | | | | | | | | | | Silence an incompatible-pointer-types-discards-qualifiers warning from clang. rangecoder.c:58:34: warning: passing 'uint8_t **' (aka 'unsigned char **') to parameter of type 'const uint8_t **' (aka 'const unsigned char **') discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
* | avcodec/rangecoder: avoid float operationMichael Niedermayer2015-06-011-1/+1
| | | | | | | | | | | | Use integers, avoid potential rounding issues Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | rangecoder-test: Allow running with small stack size.Reimar Döffinger2014-09-021-2/+3
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'Michael Niedermayer2013-05-051-2/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487': avcodec: Add av_cold attributes to init functions missing them Conflicts: libavcodec/aacpsy.c libavcodec/atrac3.c libavcodec/dvdsubdec.c libavcodec/ffv1.c libavcodec/ffv1enc.c libavcodec/h261enc.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/h264pred.c libavcodec/libschroedingerenc.c libavcodec/libxvid_rc.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/proresdsp.c libavcodec/rangecoder.c libavcodec/videodsp.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-2/+4
| |
* | Merge commit '3dc06b6972cf389269e9c36ff0a4373f80f7149b'Michael Niedermayer2012-10-161-8/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '3dc06b6972cf389269e9c36ff0a4373f80f7149b': tiny_psnr: check for specified sample size less than 1 fate: improve md5sum utility selection rangecoder-test: Drop timer output that clutters stderr Conflicts: tests/tiny_psnr.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rangecoder-test: Drop timer output that clutters stderrDiego Biurrun2012-10-151-8/+2
| |
* | Merge commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d'Michael Niedermayer2012-10-161-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit 'c1fcfdec75468009dc7de29a5d1c6adf3b2ef77d': rangecoder-test: Return in case of an error build: simplify enabling of compat objects Conflicts: configure libavutil/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rangecoder-test: Return in case of an errorDiego Biurrun2012-10-151-1/+3
| |
* | Merge commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723'Michael Niedermayer2012-10-131-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723': rtpdec_xiph: fix function return type smjpeg: fix type of 'ret' variable in smjpeg_read_packet() mpegvideo: remove write-only variable Use proper return values in case of missing features fate: add avstring test rangecoder-test: Set error message log level to error, instead of debug Conflicts: libavcodec/aacdec.c libavcodec/amrnbdec.c libavcodec/mpegvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rangecoder-test: Set error message log level to error, instead of debugDiego Biurrun2012-10-121-1/+2
| |
* | Merge commit '90558e848a29ef1e85ecb1832ad9a26eebe958e0'Michael Niedermayer2012-10-131-54/+56
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '90558e848a29ef1e85ecb1832ad9a26eebe958e0': rangecoder: K&R formatting cosmetics Conflicts: libavcodec/rangecoder.c libavcodec/rangecoder.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rangecoder: K&R formatting cosmeticsDiego Biurrun2012-10-121-55/+57
| |
* | rangecoder: fix "incompatible pointer type" warningMichael Niedermayer2012-10-081-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | rangecoder: use av_assertMichael Niedermayer2012-06-101-2/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | range coder test code: decoding errors are av_log_error not debug.Michael Niedermayer2012-05-311-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-291-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asf: only set index_read if the index contained entries. cabac: add overread protection to BRANCHLESS_GET_CABAC(). cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). h264: add overread protection to get_cabac_bypass_sign_x86(). h264: reindent get_cabac_bypass_sign_x86(). h264: use struct offsets in get_cabac_bypass_sign_x86(). h264: fix overreads in cabac reader. wmall: fix seeking. lagarith: fix buffer overreads. dvdec: drop unnecessary dv_tablegen.h #include build: fix doc generation errors in parallel builds Replace memset(0) by zero initializations. faandct: Remove FAAN_POSTSCALE define and related code. dvenc: print allowed profiles if the video doesn't conform to any of them. avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size. FATE: add a test for vp8 with changing frame size. fate: add kgv1 fate test. oggdec: calculate correct timestamps in Ogg/FLAC Conflicts: libavcodec/4xm.c libavcodec/cook.c libavcodec/dvdata.c libavcodec/dvdsubdec.c libavcodec/lagarith.c libavcodec/lagarithrac.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace memset(0) by zero initializations.Diego Biurrun2012-03-281-1/+1
| | | | | | | | Also remove one pointless zero initialization in rangecoder.c.
| * 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
* cosmetics: Rename prn variable to prng (Pseudo Random Number Generator).Diego Biurrun2009-04-101-3/+3
| | | | Originally committed as revision 18422 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace random() usage in test programs by av_lfg_*().Diego Biurrun2009-03-201-2/+7
| | | | Originally committed as revision 18070 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 #undef random and call the right function to fix test program compilation.Diego Biurrun2008-01-231-1/+2
| | | | Originally committed as revision 11600 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Consistently use TEST as the preprocessor condition to enable test code.Diego Biurrun2008-01-201-2/+2
| | | | Originally committed as revision 11581 to svn://svn.ffmpeg.org/ffmpeg/trunk
* main() --> main(void)Diego Biurrun2007-11-231-1/+1
| | | | Originally committed as revision 11079 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
* Use AV_xx throughout libavcodecRamiro Polla2007-06-021-2/+2
| | | | Originally committed as revision 9169 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove redundant #inclusion of common.h, avcodec.h already #includes it.Diego Biurrun2007-05-101-1/+0
| | | | Originally committed as revision 8967 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics / remove #if 0 codeMichael Niedermayer2007-01-261-29/+1
| | | | Originally committed as revision 7715 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
* fixing out of array access (only cosmetic, this should never have had a end ↵Michael Niedermayer2006-03-101-1/+1
| | | | | | user vissible effect) Originally committed as revision 5139 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: Remove all trailing whitespace.Diego Biurrun2005-12-171-15/+15
| | | | Originally committed as revision 4749 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Kill some compiler warnings. Compiled code verified identical after changes.Måns Rullgård2005-09-061-1/+2
| | | | Originally committed as revision 4567 to svn://svn.ffmpeg.org/ffmpeg/trunk
* kill warnings patch by (Måns Rullgård <mru inprovide com>)Måns Rullgård2005-02-241-1/+1
| | | | Originally committed as revision 3977 to svn://svn.ffmpeg.org/ffmpeg/trunk