avcodec/gdv: Optimize and factorize scaling loops
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 4 Jan 2019 18:51:04 +0000 (19:51 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 21 Jan 2019 06:53:26 +0000 (07:53 +0100)
commit792df36f42ab2f5c61281f428bb3a2af2cfef70b
treedf9b03dc09333acf42bc3dc7eef1ea898e935e9d
parentc694273feb813263122f121eae7c3c881cbf13ba
avcodec/gdv: Optimize and factorize scaling loops

Fixes: Timeout
Fixes: 11067/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5686623711264768

Before change: Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5686623711264768 in 34386 ms
After  change: Executed clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5686623711264768 in 24327 ms

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 6e23736aefa83859fdb6faae4fd14c169f1a41ab)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/gdv.c