summaryrefslogtreecommitdiff
path: root/libavcodec/error_resilience.c
Commit message (Collapse)AuthorAge
* avcodec/error_resilience: Only keep what is needed from MECmpContextAndreas Rheinhardt2022-05-19
| | | | | | | | | ERContext currently has an embedded MECmpContext, despite only needing exactly one function from it. This is wasteful because MECmpContext is pretty large (135 pointers, 1080 B for eight byte pointers). So keep only what is needed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/error_resilience: Remove unused labelAndreas Rheinhardt2022-02-15
| | | | | | | Forgotten in be95df12bb06b183c8d2aea3b0831fdf05466cf3. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/mpeg*: drop the XvMC hwaccel codeAnton Khirnov2022-02-15
| | | | | XvMC was last relevant over 10 years ago, if ever. There is no reason to use it today.
* avcodec/thread: Move ff_thread_(await|report)_progress to new headerAndreas Rheinhardt2022-02-09
| | | | | | | | | | This is in preparation for further commits that will stop using ThreadFrame for frame-threaded codecs that don't use ff_thread_(await|report)_progress(); the API for those codecs having inter-frame depdendencies will live in threadframe.h. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Remove unused-but-set variablesAndreas Rheinhardt2021-12-03
| | | | | | Newer versions of Clang detect this and emit warnings for it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove obsolete version.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | These have mostly been added because of FF_API_*; yet when these were removed, removing the header has been forgotten. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/error_resilience: cleanup mpeg2 handlingMichael Niedermayer2021-05-27
| | | | | | After this, the loop for the mpeg2 case is only executed when needed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/error_resilience: set AVFrame decode_error_flags in case of decoding ↵Amir Pauker2019-07-07
| | | | | | | error Signed-off-by: Amir Pauker <amir@livelyvideo.tv> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/error_resilience: Use a symmetric check for skipping MV estimationMichael Niedermayer2019-02-25
| | | | | | | | | | This speeds up the testcase by a factor of 4 Fixes: Timeout Fixes: 13100/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5767533905313792 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: Remove use of FF_PROFILE_MPEG4_SIMPLE_STUDIO as ↵Michael Niedermayer2018-07-04
| | | | | | | | | | | | | | | indicator of studio profile The profile field is changed by code inside and outside the decoder, its not a reliable indicator of the internal codec state. Maintaining it consistency with studio_profile is messy. Its easier to just avoid it and use only studio_profile Fixes: assertion failure Fixes: ffmpeg_crash_9.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/error_resilience: Fix integer overflow in filter181()Michael Niedermayer2018-04-25
| | | | | | | | Fixes: runtime error: signed integer overflow: 197710 * 10923 cannot be represented in type 'int' Fixes: 7010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5667127596941312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mpeg4video: Add support for MPEG-4 Simple Studio Profile.Kieran Kunhya2018-04-02
| | | | This is a profile supporting > 8-bit video and has a higher quality DCT
* avcodec/error_resilience: remove unused headerJames Almer2018-01-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* error_resilience: remove avpriv_atomic usageRostislav Pehlivanov2017-11-26
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* Merge commit '7b917041184874e7d7cba4450813de7e0bb28a33'James Almer2017-10-21
|\ | | | | | | | | | | | | * commit '7b917041184874e7d7cba4450813de7e0bb28a33': lavc: Drop deprecated VDPAU codec capability Merged-by: James Almer <jamrial@gmail.com>
* | Merge commit '6b52762951fa138eef59e2628dabb389e0500e40'Clément Bœsch2017-03-20
|\| | | | | | | | | | | | | * commit '6b52762951fa138eef59e2628dabb389e0500e40': error_resilience: Change type of array stride parameters to ptrdiff_t Merged-by: Clément Bœsch <u@pkh.me>
| * error_resilience: Change type of array stride parameters to ptrdiff_tDiego Biurrun2016-09-07
| | | | | | | | ptrdiff_t is the correct type for array strides and similar.
| * Add some more deprecation guardsDiego Biurrun2016-05-11
| | | | | | | | Avoids unused function/label/variable warnings after the next version bump.
* | avcodec/error_resilience: Fix "assignment from incompatible pointer type" ↵Michael Niedermayer2017-02-16
| | | | | | | | | | | | warning Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/error_resilience: Remove two unused variables.Carl Eugen Hoyos2017-02-01
| |
* | avcodec/error_resilience: update indention after last commitMichael Niedermayer2017-01-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/error_resilience: Optimize motion recovery code by using blcok listsMichael Niedermayer2017-01-22
| | | | | | | | | | | | | | | | | | | | | | | | This makes the code 7 times faster with the testcase from libfuzzer and should reduce the amount of timeouts we hit in automated fuzzing. (for example 438/fuzz-2-ffmpeg_VIDEO_AV_CODEC_ID_RV40_fuzzer) The code is also faster with more realistic input though the difference is small here as that is far from the worst cases the fuzzers pick out Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/error_resilience: Move variable initialization down, remove unneeded ↵Michael Niedermayer2016-12-25
| | | | | | | | | | | | | | | | inits This makes the code faster and easier to read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/error_resilience: Merge surrounding status checksMichael Niedermayer2016-12-25
| | | | | | | | | | | | Simplifies code and is also faster Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/error_resilience: Factor block parity check outMichael Niedermayer2016-12-25
| | | | | | | | | | | | This makes the code noticably faster when there are lots of blocks Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/error_resilience: remove unused skip_last_mv labelClément Bœsch2016-06-22
| | | | | | | | Unused since a7b8a6e704d3bea4a2bf724b6b6a3b1de1b08886
* | 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>
* | avcodec/error_resilience: Improve missing slice handling for mpeg2Michael Niedermayer2016-05-03
| | | | | | | | | | | | Fixes: m702_2.avi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/error_resilience: remove unneeded and disabled codeMichael Niedermayer2016-03-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/error_resilience: wait for previous frame to be availableMichael Niedermayer2016-03-18
| | | | | | | | | | | | This is possibly redundant but its more correct Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/error_resilience: avoid accessing previous or next frames tables ↵Michael Niedermayer2015-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | beyond height The height of tables can be rounded up for MBAFF but this does not imply that is also true for the previous frames Fixes out of array reads Fixes: c106b36fa36db8ff8f3ed0c82be7bea2/asan_heap-oob_32699f0_6321_467b9a1d7e03d7cfd310b7e65dc53bcc.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU.Ronald S. Bultje2015-08-18
| |
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | avcodec/error_resilience: support grayscaleMichael Niedermayer2015-05-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/error_resilience: Avoid race with updating the error_countMichael Niedermayer2015-04-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/error_resilience: Fix mbskip_table==NULL codepathMichael Niedermayer2015-03-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5bc69f38c1af71fbcbfb4b5efa77d0aeb5424c04'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | * commit '5bc69f38c1af71fbcbfb4b5efa77d0aeb5424c04': error_resilience: do not require mbintra/skip tables Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * error_resilience: do not require mbintra/skip tablesAnton Khirnov2015-03-21
| | | | | | | | h264dec does not use them at all and only allocates them for ER.
* | Merge commit 'cf1e0786ed64e69614760bfb4ecd7adbde8e6094'Michael Niedermayer2015-01-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'cf1e0786ed64e69614760bfb4ecd7adbde8e6094': error_resilience: move the MECmpContext initialization into ER code Conflicts: libavcodec/error_resilience.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * error_resilience: move the MECmpContext initialization into ER codeAnton Khirnov2015-01-27
| | | | | | | | | | | | | | Currently, it needs to be initialized by the ER caller (which is currently either a mpegvideo decoder or h264dec). However, since none of those decoders use MECmpContext for anything except ER, it makes more sense to handle it purely inside ER.
* | avcodec/error_resilience: Remove special case for H.264 from ↵Michael Niedermayer2015-01-11
| | | | | | | | | | | | | | | | is_intra_more_likely This should not be needed Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c442190a6bfd8036f6c32b78e1e96ff3b830f8f0'Michael Niedermayer2014-11-04
|\| | | | | | | | | | | | | | | | | | | * commit 'c442190a6bfd8036f6c32b78e1e96ff3b830f8f0': error_resilience: initialize prev_* variables Note, these variables are not used without initialization prior to the change Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * error_resilience: initialize prev_* variablesVittorio Giovara2014-11-03
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 732293 / CID 732294
| * error_resilience: Drop asserts from guess_mv()Diego Biurrun2014-08-21
| | | | | | | | | | The asserts check struct members that are not referenced in guess_mv() and one of them fails to compile.
* | avcodec/error_resilience: avoid pointer arithmetic with NULLMichael Niedermayer2014-10-12
| | | | | | | | | | | | | | | | move the code after the existing NULL check Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/error_resilience: make error an local variable where possibleMichael Niedermayer2014-08-02
| | | | | | | | | | | | | | This makes the code easier to understand as the scope of the variable is smaller. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/error_resilience: comment out unused assignmentMichael Niedermayer2014-08-02
| | | | | | | | | | | | | | Its not removed as the code which uses this is out-commented too. Found-by: CSA Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2d60444331fca1910510038dd3817bea885c2367'Michael Niedermayer2014-07-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2d60444331fca1910510038dd3817bea885c2367': dsputil: Split motion estimation compare bits off into their own context Conflicts: configure libavcodec/Makefile libavcodec/arm/Makefile libavcodec/dvenc.c libavcodec/error_resilience.c libavcodec/h264.h libavcodec/h264_slice.c libavcodec/me_cmp.c libavcodec/me_cmp.h libavcodec/motion_est.c libavcodec/motion_est_template.c libavcodec/mpeg4videoenc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/x86/Makefile libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split motion estimation compare bits off into their own contextDiego Biurrun2014-07-17
| |