diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-02-19 18:41:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-24 10:39:03 +0100 |
commit | 8a598030e2d0d1034ac0ed18623dc690e1d59b86 (patch) | |
tree | 5bb3322a5c736bf25d6df376a5494b8fe2ad2ab8 | |
parent | e9dbc7b3098005ac73c28aeeb99d17c3e6e62ff9 (diff) | |
download | ffmpeg-8a598030e2d0d1034ac0ed18623dc690e1d59b86.tar.gz |
avcodec/error_resilience: Use a symmetric check for skipping MV estimation
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>
(cherry picked from commit e4289cb253e29e4d62dc46759eb1a45d8f6d82df)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/error_resilience.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 131d52ac0b..57b5a8fd14 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -419,7 +419,7 @@ static void guess_mv(ERContext *s) } if ((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) || - num_avail <= mb_width / 2) { + num_avail <= FFMAX(mb_width, mb_height) / 2) { for (mb_y = 0; mb_y < mb_height; mb_y++) { for (mb_x = 0; mb_x < s->mb_width; mb_x++) { const int mb_xy = mb_x + mb_y * s->mb_stride; |