summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1dec_template.c
Commit message (Collapse)AuthorAge
* avcodec/ffv1: Move ffv1_template.c inclusion to dec/enc templatesAndreas Rheinhardt2022-10-20
| | | | | | | | | | | | | | | | | | | Both the FFV1 decoder and encoder use a template of their own to generate code multiple times. They also use a common template, used by both decoder and encoder templates which is currently instantiated in ffv1.h (and therefore also in ffv1.c, which doesn't need it at all). All these templates have the prerequisite that two macros are defined, namely RENAME() and TYPE. The codec-specific templates call the functions generated via the common template via the RENAME() macro and therefore the macros used for the common template must coincide with the macros used for the codec-specific templates. But then it is better to not instantiate the common template in ffv1.h, but in the codec specific templates. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ffv1dec_template: fix indentionMichael Niedermayer2022-07-12
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: Optimize common case in run modeMichael Niedermayer2019-05-27
| | | | | | | | | | | | | | | | Fixes: Timeout (14sec -> 9sec) Fixes: 13398/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5664106709778432 decode_line() becomes 1% faster for fate/vsynth2-ffv1.avi for another fate sample there is a 0.5% speedup the effect should be bigger for files with "flat" colored areas the new faster branch is used in 97-100% of the cases in fate samples compared to the older more complex (which i tested) vsynth3-ffv1-v3-bgr0.avi had the lowest percentual useage of about 97% Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: Optimize golomb run modeMichael Niedermayer2019-03-17
| | | | | | | | Fixes: Timeout (34sec -> 12sec) Fixes: 13398/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5664106709778432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: Check for the end of input after 1024 pixelsMichael Niedermayer2018-10-12
| | | | | | | | Fixes: Timeout Fixes: 10385/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5689206987292672 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: do not ignore the return code of decode_line()Michael Niedermayer2018-09-03
| | | | | | | | Fixes: Timeout Fixes: 9710/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-4918894635515904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1: Support for GBRAP10 and GBRAP12Jérôme Martinez2018-02-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1: Support for RGBA64 and GBRAP16Jérôme Martinez2018-02-06
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Check for bitstream end in decode_line()Michael Niedermayer2017-08-18
| | | | | | | | Fixes: timeout Fixes: 2971/clusterfuzz-testcase-6130678276030464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: Fix undefined shiftMichael Niedermayer2017-08-11
| | | | | | | | Fixes: runtime error: left shift of negative value -127 Fixes: 2834/clusterfuzz-testcase-minimized-5988039123795968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: Fix signed integer overflowMichael Niedermayer2017-07-16
| | | | | | | | Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 2634/clusterfuzz-testcase-minimized-4540890636877824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: Fix runtime error: signed integer overflow: 202 + ↵Michael Niedermayer2017-05-23
| | | | | | | | | 2147483615 cannot be represented in type 'int' Fixes: 1748/clusterfuzz-testcase-minimized-6690208340770816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1: Fix rgb plane ordering in experimental planar RGBMichael Niedermayer2016-08-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1: template functions to allow data types different from int16_tMichael Niedermayer2016-08-08
This is required for >= 16bit RGB support I tried it without templates but its too much duplicated code Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>