summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg_er.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/mpegvideo: Split ff_mpv_reconstruct_mb() into de/encoder partAndreas Rheinhardt2022-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | This has the advantage of not having to check for whether a given MpegEncContext is actually a decoder or an encoder context at runtime. To do so, mpv_reconstruct_mb_internal() is moved into a new template file that is included by both mpegvideo_enc.c and mpegvideo_dec.c; the decoder-only code (mainly lowres) are also moved to mpegvideo_dec.c. The is_encoder checks are changed to #if IS_ENCODER in order to avoid having to include headers for decoder-only functions in mpegvideo_enc.c. This approach also has the advantage that it is easy to adapt mpv_reconstruct_mb_internal() to using different structures for decoders and encoders (e.g. the check for whether a macroblock should be processed for the encoder or not uses MpegEncContext elements that make no sense for decoders and should not be part of their context). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Inline values in ff_update_block_index()Andreas Rheinhardt2022-07-311-1/+2
| | | | | | | | | This is possible for most of the callers, because e.g. only the MPEG-4 decoder can have bits_per_raw_sample > 8. Also most mpegvideo-based codecs are 420 only. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg_er: fix clearing chroma blocks for 422 and 444Marton Balint2018-11-191-0/+2
| | | | | | Fixes ticket #7494. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/mpeg_er: Clear mcsel in mpeg_er_decode_mb()Michael Niedermayer2017-10-101-0/+1
| | | | | | | | Fixes out of array read Should fix: 3516/clusterfuzz-testcase-minimized-4608518562775040 (not reprodoceable) Found-by: Insu Yun, Georgia Tech. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: Rename ff_mpv_decode_mb() to ff_mpv_reconstruct_mbMichael Niedermayer2017-06-191-1/+1
| | | | | | The new name more accuratly describes what the function does Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/error_resilience: Optimize motion recovery code by using blcok listsMichael Niedermayer2017-01-221-1/+1
| | | | | | | | | | | | 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>
* Merge commit '8b5007a31b8d1ddbe3661bf45a732336450b7d25'Michael Niedermayer2015-06-121-0/+71
|\ | | | | | | | | | | | | | | | | | | * commit '8b5007a31b8d1ddbe3661bf45a732336450b7d25': mpegvideo: Move ER functions to a separate file Conflicts: libavcodec/mpegvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: Move ER functions to a separate fileVittorio Giovara2015-06-121-0/+71
| |
* | Merge commit '7b9ef8d701c319c26f7d0664fe977e176764c74e'Michael Niedermayer2014-06-231-4/+5
|/ | | | | | | | | | | | * commit '7b9ef8d701c319c26f7d0664fe977e176764c74e': mpeg: Split error resilience bits off into a separate file Conflicts: configure libavcodec/Makefile libavcodec/mpegvideo.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* mpeg: Split error resilience bits off into a separate fileDiego Biurrun2014-06-221-0/+59