summaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1dec.c
Commit message (Collapse)AuthorAgeFilesLines
* avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-271-2/+2
| | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/ffv1dec: Support AV_PIX_FMT_YA8Michael Niedermayer2016-01-011-9/+18
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '4bb1070c154e49d35805fbcdac9c9e92f702ef96'Derek Buitenhuis2015-11-221-7/+9
|\ | | | | | | | | | | | | | | | | | | | | | | * commit '4bb1070c154e49d35805fbcdac9c9e92f702ef96': ffv1: Explicitly name the coder type Conflicts: libavcodec/ffv1.h libavcodec/ffv1dec.c libavcodec/ffv1enc.c Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * ffv1: Explicitly name the coder typeVittorio Giovara2015-11-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FFv1 uses two types of coders, golomb and range with two different tables. This is exposed this in a rather convoluted way, for example mentioning to set coder type 1 while initializing the variable 'ac' to 2, because encoder does not use range coder with default table. Appropriate internal coder type values have been added and used in any check rather than using raw numbers. Initialization of avctx.coder_type in ffv1dec is removed because this field is encoder only. An unneeded validation check in the encoder is dropped too. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/ffv1dec: Clear quant_table_count if its invalidMichael Niedermayer2015-11-141-0/+1
| | | | | | | | | | | | | | | | | | Fixes deallocation of corrupted pointer Fixes: 343dfbe142a38b521ed069dc4ea7c03b/signal_sigsegv_421427_4074_ffb11959610278cd40dbc153464aa254.avi No releases affected Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: Print an error if the quant table count is invalidMichael Niedermayer2015-11-051-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: Free tables on init failureMichael Niedermayer2015-11-051-0/+1
| | | | | | | | | | | | | | | | Fixes memleak Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: Check for 0 quant tablesMichael Niedermayer2015-11-051-1/+1
| | | | | | | | | | | | | | | | Fixes assertion failure Fixes: 07ec1fc3c1cbf2d3edcd7d9b52ca156c/asan_heap-oob_13624c5_491_ecd4720a03e697ba750b235690656c8f.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: update progress in case of broken pointer chainsMichael Niedermayer2015-10-161-0/+1
| | | | | | | | | | | | | | Fixes deadlock Fixes Ticket4932 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header ↵Michael Niedermayer2015-10-161-0/+1
| | | | | | | | | | | | | | | | decoding fails for other reasons Fixes Ticket4931 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: use HAVE_THREADS header guards to silence -Wunused-functionGanesh Ajjanagadde2015-10-041-0/+4
| | | | | | | | | | | | | | | | | | | | When compiled with --disable-pthreads, e.g http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7, a bunch of -Wunused-functions are reported due to missing header guards around threading related functions. This patch should silence such warnings. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/ffv1dec: Fix off by 1 error in quant_table_count checkMichael Niedermayer2015-09-261-1/+1
| | | | | | | | | | | | | | Fixes: invalid_read.nut Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: Explicitly check read_quant_table() return valueMichael Niedermayer2015-09-261-1/+4
| | | | | | | | | | | | Forwards the error code, avoids potential integer overflow Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: Fix >8bps error concealmentMichael Niedermayer2015-09-251-2/+4
| | | | | | | | | | | | | | Fixes: 03_cave_girls_h264_slc24_slicecrc1_fuzzed.avi Found-by: Dinah Handel <dinahrhandel@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/rangecoder: Check eMichael Niedermayer2015-09-251-1/+4
| | | | | | | | | | | | | | Fixes hang.nut Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1: seperate slice_count from max_slice_countMichael Niedermayer2015-09-241-3/+5
| | | | | | | | | | | | | | Fix segfault with too large slice_count Fixes Ticket4879 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Replace all remaining occurances of step/depth_minus1 and offset_plus1Hendrik Leppkes2015-09-081-1/+1
| |
* | avcodec/ffv1dec: Print CRCs at picture debug levelMichael Niedermayer2015-09-021-2/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/ffv1dec: Check that there is enough space for the CRC in the global ↵Michael Niedermayer2015-09-021-1/+1
| | | | | | | | | | | | header Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffv1: Add missing ff_ prefixesTimothy Gu2015-08-221-8/+8
| |
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-271-2/+2
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/ffv1dec: Fix skip_alphaMichael Niedermayer2015-05-281-1/+2
| | | | | | | | | | | | Fixes Ticket4322 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/ffv1dec: Check chroma shift parametersMichael Niedermayer2015-05-041-0/+12
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/ffv1dec: More completely check micro_versionMichael Niedermayer2015-05-041-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/ffv1dec: Check quant table symbols more completelyMichael Niedermayer2015-05-041-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffv1dec: plane_index is 1 in case of version 4 gray+alpha.Jérôme Martinez2015-05-031-1/+1
| | | | | | | | | | | | Since version 4, plane_index for the alpha plane is 1 in the case chroma_planes is 0. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: use av_mod_uintp2() where usefulJames Almer2015-04-211-2/+1
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-201-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-191-3/+3
| |
* | Merge commit 'ca09effb01e126b0ac74ff3de70a475423ddee82'Michael Niedermayer2015-01-061-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'ca09effb01e126b0ac74ff3de70a475423ddee82': ffv1: Drop unnecessary casts and const qualifiers to match function signatures Conflicts: libavcodec/ffv1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffv1: Drop unnecessary casts and const qualifiers to match function signaturesDiego Biurrun2015-01-051-4/+4
| | | | | | | | libavcodec/ffv1dec.c:898:36: warning: cast discards ‘const’ qualifier from pointer target type
* | ffv1dec: Avoid unnecessarily large stack usage and copies.Reimar Döffinger2014-11-221-5/+10
| | | | | | | | | | | | | | | | | | | | Ideally the compiler could figure this out on its own, but it seems it can't. An alternative that would avoid the messy explicit memcpy would be to use a sub-struct for the parts that should be preserved, which can then simply be assigned. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit 'da7d839a0d3ec40423a665dc85e0cfaed3f92eb8'Michael Niedermayer2014-08-121-16/+16
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'da7d839a0d3ec40423a665dc85e0cfaed3f92eb8': ffv1dec: check that global parameters do not change in version 0/1 Conflicts: libavcodec/ffv1dec.c See: b05cd1ea7e45a836f7f6071a716c38bb30326e0f Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffv1dec: check that global parameters do not change in version 0/1Michael Niedermayer2014-08-121-7/+25
| | | | | | | | | | | | | | | | | | Such changes are neither allowed nor supported Found-by: ami_stuff Bug-Id: CVE-2013-7020 CC: libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2'Michael Niedermayer2014-06-201-0/+10
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2': Add av_image_check_sar() and use it to validate SAR Conflicts: libavcodec/dpx.c libavcodec/dvdec.c libavcodec/ffv1dec.c libavcodec/utils.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add av_image_check_sar() and use it to validate SARJustin Ruggles2014-06-201-0/+8
| |
| * avutil: remove timer.h include from internal.hJanne Grunau2014-01-251-0/+1
| | | | | | | | Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
* | avcodec/ffv1dec: use av_malloc_array()Michael Niedermayer2014-05-031-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffv1.4: use 2 coefficients for calculating the Y plane in the RCTMichael Niedermayer2013-12-101-4/+6
| | | | | | | | | | | | 0-0.7% improved compression Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/ffv1: support adjusting the g vs r + b coefficient in the RCTMichael Niedermayer2013-12-091-1/+10
| | | | | | | | | | | | about 1% better compression Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-171-6/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegvideo_enc: use the AVFrame API properly. ffv1: use the AVFrame API properly. jpegls: use the AVFrame API properly. huffyuv: use the AVFrame API properly. Conflicts: libavcodec/ffv1.c libavcodec/ffv1.h libavcodec/ffv1dec.c libavcodec/ffv1enc.c Changes to ffv1 are more redone than merged due to them being based on an ancient codebase and a good part of that having being done already as well. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ffv1: use the AVFrame API properly.Anton Khirnov2013-11-161-7/+22
| |
| * ffv1: Assume bitdepth 0 means 8bitLuca Barbato2013-10-151-0/+1
| | | | | | | | | | CC: libav-stable@libav.org Reported-by: debian/726189
* | Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'Michael Niedermayer2013-10-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2': cosmetics: Group .name and .long_name together in codec/format declarations Conflicts: libavcodec/8svx.c libavcodec/alac.c libavcodec/cljr.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dpxenc.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/ffv1dec.c libavcodec/flacdec.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g726.c libavcodec/gif.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/h263dec.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopencore-amr.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libspeexenc.c libavcodec/libvo-amrwbenc.c libavcodec/libvorbisenc.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/ljpegenc.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpeg4videodec.c libavcodec/msmpeg4dec.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/proresdec_lgpl.c libavcodec/proresenc_kostya.c libavcodec/ra144enc.c libavcodec/rawdec.c libavcodec/rv10.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tta.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/wavpack.c libavcodec/xbmenc.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Group .name and .long_name together in codec/format declarationsDiego Biurrun2013-10-031-1/+1
| |
| * pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*Anton Khirnov2013-05-151-1/+1
| |
| * ffv1: fix calculating slice dimensions for version 2Anton Khirnov2013-03-081-2/+2
| | | | | | | | | | | | It got broken in 0f13cd3187192ba0cc2b043430de6e279e7b97c3. CC:libav-stable@libav.org
* | Make decoding alpha optional for some codecs.Reimar Döffinger2013-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | For codecs where decoding of a whole plane can simply be skipped, we should offer applications to not decode alpha for better performance (ca. 30% less CPU usage and 40% reduced memory bandwidth). It also means applications do not need to implement support (even if it is rather simple) for YUVA formats in order to be able to play these files. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avcodec/ffv1: YUVA(444,422,420) 9, 10 and 16 bit supportPaul B Mahol2013-09-091-0/+20
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
OpenPOWER on IntegriCloud