summaryrefslogtreecommitdiffstats
path: root/libavcodec/gdv.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/gdv: Replace assert() checking bitstream by if()Michael Niedermayer2019-09-161-1/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Check remaining output after decode 5/6/8/Michael Niedermayer2019-05-311-1/+6
| | | | | | | | Improves: Timeout (355sec -> 97sec) Improves: 14709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5704215281795072 Reviewed-by: Paul B Mahol <onemda@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
* avcodec/gdv: Check input palette size before rescale()Michael Niedermayer2019-04-261-2/+2
| | | | | | | | | Fixes: Timeout (22sec -> 11sec) Fixes: 13576/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5681024577568768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Check for truncated tags in decompress_5()Michael Niedermayer2019-03-031-0/+2
| | | | | | | Testcase: 13169/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5666354038833152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Optimize and factorize scaling loopsMichael Niedermayer2019-01-141-23/+64
| | | | | | | | | | | 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>
* avcodec/gdv: Optimize unscaled loopMichael Niedermayer2019-01-051-4/+2
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Remove unused variableMichael Niedermayer2018-09-301-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Error out if we had insufficent input for the output frame in ↵Michael Niedermayer2018-09-281-0/+6
| | | | | | | | | | decompress_2() Fixes: Timeout (with the previous commits to gdv.c) Fixes: 9422/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5143490001371136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Optimize 2x scaling loop a little in gdv_decode_frame()Michael Niedermayer2018-09-281-2/+6
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()Michael Niedermayer2018-09-281-3/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Eliminate 50% of the reads in the first inner loop in rescale()Michael Niedermayer2018-09-281-1/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Simplify first inner loop in rescale()Michael Niedermayer2018-09-281-2/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Combine first and 3rd case in rescale()Michael Niedermayer2018-09-281-12/+2
| | | | | | Simplifies code Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Factor terms out of inner loops in rescale()Michael Niedermayer2018-09-281-10/+17
| | | | | | This also replaces some loops by memcpy() Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Replace divisions by shifts in rescale()Michael Niedermayer2018-09-281-8/+8
| | | | | | | Divisions tend to be slower than shifts unless the compiler optimizes them out. And some of these are in inner loops. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Check compression before allocating frameMichael Niedermayer2017-11-031-6/+9
| | | | | | | | | | | | Fixes: 2926/clusterfuzz-testcase-4987110014582784 This reduces decoding time from 7 to 4 seconds The timeout should have been fixed in 0561bd2fc2bff0dbe651d5998e9f129c43d25eb3 but ossfuzz did not close this issue Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Check available space before reading paletteMichael Niedermayer2017-08-111-0/+2
| | | | | | | | Fixes: Timeout Fixes: 2926/clusterfuzz-testcase-498711001458278 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: add decompression for 2 and 5 methodPaul B Mahol2017-06-291-0/+107
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/gdv: Fix undefined shiftMichael Niedermayer2017-06-161-1/+1
| | | | | | | | Fixes: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 2249/clusterfuzz-testcase-minimized-5388542379294720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: fix compiler warningsPaul B Mahol2017-06-111-8/+10
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec: add Gremlin Digital Video decoderPaul B Mahol2017-06-111-0/+404
Signed-off-by: Paul B Mahol <onemda@gmail.com>
OpenPOWER on IntegriCloud