summaryrefslogtreecommitdiff
path: root/libavcodec/vp8.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/vp5/6/8: use vpX_rac_is_end()Michael Niedermayer2020-01-061-3/+3
| | | | | | | Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit ab56e62e8f7e02760cfc883956511cab32393315) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp8: Check bitstream input in vp7_fade_frame() before time consuming ↵Michael Niedermayer2018-09-121-0/+3
| | | | | | operation Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/vp8: Do not compute line pointers per pixel in fade()Michael Niedermayer2018-07-071-2/+4
| | | | | | | 72->60 seconds Testcase: 8680/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5861504418054144 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vp8: Check for bitstream end before vp7_fade_frame()Michael Niedermayer2018-02-171-0/+2
| | | | | | | | Fixes: Timeout Fixes: 5653/clusterfuzz-testcase-5497680018014208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/vp8: Support resolution changes in the VP8 decoder hwaccelJun Zhao2017-12-151-12/+24
| | | | | | | | | | | | | Use the following command to reproduce this issue: make fate-vp8-size-change HWACCEL="vaapi -vaapi_device \ /dev/dri/renderD128 -hwaccel_output_format yuv420p" SAMPLES=../fate-suite/. At the same time, reconstruct the public logic as a function. Signed-off-by: Yun Zhou <yunx.z.zhou@intel.com> Signed-off-by: Jun Zhao <jun.zhao@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* avcodec/nvdec: Implement vp8 hwaccelPhilip Langdale2017-11-261-0/+6
|
* vaapi: Add VP8 decode hwaccelMark Thompson2017-11-261-0/+6
|
* vp8: Add hwaccel hooksMark Thompson2017-11-261-68/+138
| | | | | | | | | | Also adds some extra fields to the main context structure that may be needed by a hwaccel decoder. The current behaviour of the WebP decoder is maintained by adding an additional field to the VP8 decoder private context to indicate that it is actually being used as WebP (no hwaccel is supported for that case).
* Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'James Almer2017-09-261-4/+4
|\ | | | | | | | | | | | | * commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3': Mark some arrays that never change as const. Merged-by: James Almer <jamrial@gmail.com>
| * Mark some arrays that never change as const.Anton Khirnov2017-02-011-4/+4
| |
| * lavc/vaapi: Add VP8 decode hwaccelMark Thompson2016-09-081-0/+3
| |
| * vp8: Add hwaccel hooksMark Thompson2016-09-081-60/+125
| | | | | | | | | | Also adds some extra fields to the main context structure that may be needed by a hwaccel decoder.
* | avcodec/webp: Always set pix_fmtMichael Niedermayer2017-05-101-0/+2
| | | | | | | | | | | | | | | | | | | | Fixes: out of array access Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632 Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | vp8: make mv_min/max thread-local if using partition threading.Ronald S. Bultje2017-04-061-25/+28
| | | | | | | | | | | | | | | | | | | | | | Fixes tsan warnings like this in fate-vp8-test-vector-007: WARNING: ThreadSanitizer: data race (pid=65909) Write of size 4 at 0x7d8c0000e088 by thread T1: #0 vp8_decode_mb_row_sliced vp8.c:2519 (ffmpeg:x86_64+0x100995ede) [..] Previous write of size 4 at 0x7d8c0000e088 by thread T2: #0 vp8_decode_mb_row_sliced vp8.c:2519 (ffmpeg:x86_64+0x100995ede)
* | vp8: make wait/thread_mb_pos atomic.Ronald S. Bultje2017-04-061-15/+14
| | | | | | | | | | | | | | | | | | | | | | Fixes tsan warnings like this in fate-vp8-test-vector-007: WARNING: ThreadSanitizer: data race (pid=3590) Write of size 4 at 0x7d8c0000e07c by thread T2: #0 decode_mb_row_no_filter src/libavcodec/vp8.c:2330 (ffmpeg+0x000000ffb59e) [..] Previous write of size 4 at 0x7d8c0000e07c by thread T1: #0 decode_mb_row_no_filter src/libavcodec/vp8.c:2330 (ffmpeg+0x000000ffb59e)
* | Merge commit '87c6c78604e4dd16f1f45862b27ca006da010527'James Almer2017-03-191-9/+10
|\ \ | |/ | | | | | | | | | | * commit '87c6c78604e4dd16f1f45862b27ca006da010527': vp8: Change type of stride parameters to ptrdiff_t Merged-by: James Almer <jamrial@gmail.com>
| * vp8: Change type of stride parameters to ptrdiff_tDiego Biurrun2016-08-261-8/+9
| | | | | | | | ptrdiff_t is the correct type for array strides and similar.
* | avcodec/vp8: Fix hang with slice threadsThomas Guilbert2017-03-101-1/+3
| | | | | | | | | | | | | | Fixes: 447860.webm Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp8: Check for the bitstream end per MB in decode_mb_row_no_filter()Michael Niedermayer2017-03-071-0/+2
| | | | | | | | | | | | | | | | Fixes: timeout in 730/clusterfuzz-testcase-5265113739165696 (part 2 of 2) Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: BBB Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp568: Check that there is enough data for ff_vp56_init_range_decoder()Michael Niedermayer2017-03-071-7/+14
| | | | | | | | | | | | | | | | Fixes: timeout in 730/clusterfuzz-testcase-5265113739165696 (part 1 of 2) Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: BBB Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp8: remove redundant checkMichael Niedermayer2017-03-071-2/+0
| | | | | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp8: Check for bitsteam end in decode_mb_row_no_filter()Michael Niedermayer2017-03-011-6/+14
| | | | | | | | | | | | | | | | | | | | | | Fixes timeout with 686/clusterfuzz-testcase-5853946876788736 this shortcuts (i.e. speeds up) the error and return-to-user when decoding a truncated frame Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Previous version reviewed by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '5afb94c817abffad030c6b94d7003dca8aace3d5'Clément Bœsch2016-06-211-4/+4
|\ \ | |/ | | | | | | | | | | * commit '5afb94c817abffad030c6b94d7003dca8aace3d5': Mark read-only tables as static Merged-by: Clément Bœsch <u@pkh.me>
| * Mark read-only tables as staticDiego Biurrun2016-05-051-4/+4
| |
* | Merge commit 'f4d581cda3897f66c1dda7586b93f86a591dbbef'Derek Buitenhuis2016-04-241-5/+6
|\ \ | |/ | | | | | | | | | | * commit 'f4d581cda3897f66c1dda7586b93f86a591dbbef': lavc: Deduplicate zigzag_scan table Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: Deduplicate zigzag_scan tableDiego Biurrun2016-03-251-5/+6
| |
* | avcodec: use HAVE_THREADS header guards to silence -Wunused-functionGanesh Ajjanagadde2015-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | 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/vp8: Do not use num_coeff_partitions in thread/buffer setupMichael Niedermayer2015-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | The variable is not a constant and can lead to race conditions Fixes: repro.webm (not reproducable with FFmpeg alone) Found-by: Dale Curtis <dalecurtis@google.com> Tested-by: Dale Curtis <dalecurtis@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b'Hendrik Leppkes2015-08-181-0/+4
|\ \ | |/ | | | | | | | | | | | | | | * commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b': vp7: bound checking in vp7_decode_frame_header Only partially merged, see 46f72ea507afee6adb0d2324848159063d0e7afc Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * vp7: bound checking in vp7_decode_frame_headerFederico Tomassetti2015-08-161-0/+8
| | | | | | | | CC: libav-stable@libav.org
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+3
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/vp8: Check buffer size in vp8_decode_frame_header()Michael Niedermayer2015-07-181-0/+5
| | | | | | | | | | | | | | | | avoids null pointer dereference Fixes: signal_sigsegv_d5de40_964_vp80-00-comprehensive-010.ivf with memlimit of 1048576 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/vp8: Fix null pointer dereference in ff_vp8_decode_free()Michael Niedermayer2015-07-181-0/+3
| | | | | | | | | | | | | | Fixes: signal_sigsegv_d5de23_967_vp80_00_comprehensive_010.ivf with memlimit 524288 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | vp8: change mv_{min,max}.{x,y} type to intAndreas Cadhalpun2015-06-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one of the dimensions is larger than 8176, s->mb_width or s->mb_height is larger than 511, leading to an int16_t overflow of s->mv_max.{x,y}. This then causes av_clip to be called with amin > amax. Changing the type to int avoids the overflow and has no negative effect, because s->mv_max is only used in clamp_mv for clipping. Since mv_max.{x,y} is positive and mv_min.{x,y} negative, av_clip can't increase the absolute value. The input to av_clip is an int16_t, and thus the output fits into int16_t as well. For additional safety, s->mv_{min,max}.{x,y} are clipped to int16_t range before use. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec/vp8: Suppress empty body warningsMichael Niedermayer2015-05-061-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNEDChristophe Gisquet2015-03-141-1/+1
| | | | | | | | | | | | The later may yield incorrect code for on-stack variables. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vp8: Fix undefined shifts in vp8_mc_luma()Michael Niedermayer2015-03-111-2/+2
| | | | | | | | | | | | Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/vp8: remove double ;;Clément Bœsch2015-01-181-2/+2
| |
* | Merge commit '014b6b416fec89777cb9cff61bcf7896eaf7cf39'Michael Niedermayer2015-01-151-4/+10
|\ \ | |/ | | | | | | | | | | * commit '014b6b416fec89777cb9cff61bcf7896eaf7cf39': vp8: improve memory allocation checks Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vp8: improve memory allocation checksVittorio Giovara2015-01-151-4/+10
| | | | | | | | | | | | | | Check memory earlier, check one more allocation and clean up on error. CC: libav-stable@libav.org Bug-Id: CID 1257773
* | Merge commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa'Michael Niedermayer2014-11-181-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '85dc006b1a829726dd5e3a9b0fcc6a1dbfe6dffa': lavc: fix bitshifts amount bigger than the type Conflicts: libavcodec/internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: fix bitshifts amount bigger than the typeVittorio Giovara2014-11-181-2/+2
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
| * vp7: fix checking vp7_feature_value_size()Michael Niedermayer2014-11-131-1/+1
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1197061
* | Merge commit '65875a8b3b079752da25a61ec188d2e3d90a569f'Michael Niedermayer2014-10-091-2/+10
|\ \ | |/ | | | | | | | | | | * commit '65875a8b3b079752da25a61ec188d2e3d90a569f': vp8: initialize color space and range properties Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vp8: initialize color space and range propertiesVittorio Giovara2014-10-081-2/+10
| |
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-151-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-151-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '79793f833784121d574454af4871866576c0749d'Michael Niedermayer2014-07-011-1/+1
|\ \ | |/ | | | | | | | | | | * commit '79793f833784121d574454af4871866576c0749d': Update Fiona's name in copyright statements. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Update Fiona's name in copyright statements.Diego Biurrun2014-07-011-1/+1
| |