summaryrefslogtreecommitdiff
path: root/libavcodec/exr.c
Commit message (Collapse)AuthorAge
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/exr: Return correct error code on allocation failureAndreas Rheinhardt2021-04-24
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/exr: increase vlc depthMichael Niedermayer2021-04-17
| | | | | | | | Fixes: shift exponent -4 is negative Fixes: 32265/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-465133454137753 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check oe in huf_decode() before useMichael Niedermayer2021-04-01
| | | | | | | | Fixes: out of array access Fixes: 31386/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5773234709594112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check col/line for integer overflowMichael Niedermayer2021-03-13
| | | | | | | | Fixes: signed integer overflow: -2272 + -2147483360 cannot be represented in type 'int' Fixes: 30009/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5005660322398208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: add lut oriented half to float conversion codePaul B Mahol2021-03-02
|
* avcodec/exr: add DWA decompression supportPaul B Mahol2021-03-02
|
* Remove double ';'Andreas Rheinhardt2021-03-01
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/exr: add fast path for case when powf() isn't neededPaul B Mahol2021-02-28
|
* avcodec/exr: handle case when |im - IM| == 1 for huff compressionPaul B Mahol2021-02-28
|
* avcodec/exr: simplify piz decompressionPaul B Mahol2021-02-24
| | | | | Note that >32 codes are no longer supported, give proper error code if such scenario ever happens.
* avcodec/exr: export any unknown header string variable to metadataPaul B Mahol2021-02-16
| | | | And properly skip preview type in header.
* avcodec/exr: refactor GetByteContext usagePaul B Mahol2021-02-16
|
* avcodec/exr: correctly calculate display windowPaul B Mahol2021-02-16
|
* avcodec/exr: add multipart supportPaul B Mahol2021-02-16
|
* avcodec/exr: unbreak parsing sample aspect ratioPaul B Mahol2021-02-15
|
* avcodec/exr: read fps from metadata tooPaul B Mahol2021-02-15
|
* avcodec/exr: preserve half-float NaN bits and add fate testMark Reid2020-12-09
| | | | | Handles NaNs more like the official implementation handles them, preserving the original bits.
* avcodec/exr: skip bottom clearing loop when its outside the imageMichael Niedermayer2020-11-22
| | | | | | | | Fixes: signed integer overflow: 1633771809 * 32960 cannot be represented in type 'int' Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check ymin vs. hMichael Niedermayer2020-11-22
| | | | | | | | | Fixes: out of array access Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Fixes: 27443/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5631239813595136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: use lookuptable for alpha if there is no trc_funcMark Reid2020-11-20
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/exr: Check limits to avoid overflow in delta computationMichael Niedermayer2020-10-20
| | | | | | | | | Fixes: signed integer overflow: 553590816 - -2145378049 cannot be represented in type 'int' Fixes: 26315/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5938755121446912 Fixes: 26340/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5644316208529408 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Fix overflow with many blocksMichael Niedermayer2020-10-15
| | | | | | | | Fixes: signed integer overflow: 1073741827 * 8 cannot be represented in type 'int' Fixes: 25621/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6304841641754624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check line size for overflowMichael Niedermayer2020-10-11
| | | | | | | | Fixes: signed integer overflow: 570425356 * 6 cannot be represented in type 'int Fixes: 25929/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5099197739827200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check xdelta, ydeltaMichael Niedermayer2020-10-11
| | | | | | | | Fixes: assertion failure Fixes: 25617/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5648746061496320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/exr: fix incorrect translation of denorm mantissaMark Reid2020-09-15
|
* avcodec/exr: initialize axmax and bxmin to 0Paul B Mahol2020-09-12
| | | | They can be used uninitialized.
* avcodec/exr: add support data windows larger or outside display windowMark Reid2020-09-12
|
* avcodec/exr: output float pixels in float pixel formatMark Reid2020-05-20
| | | | | | | | | changes since v1 - default behavior, no longer hidden behind decoder parameter - updated tests to reflect change Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* pthread_frame: merge the functionality for normal decoder init and ↵Anton Khirnov2020-04-10
| | | | | | | | | | | | | | | | init_thread_copy The current design, where - proper init is called for the first per-thread context - first thread's private data is copied into private data for all the other threads - a "fixup" function is called for all the other threads to e.g. allocate dynamically allocated data is very fragile and hard to follow, so it is abandoned. Instead, the same init function is used to init each per-thread context. Where necessary, AVCodecInternal.is_copy can be used to differentiate between the first thread and the other ones (e.g. for decoding the extradata just once).
* avcodec/exr: fix some small cosmetics nitsPaul B Mahol2020-01-22
|
* avcodec/exr.c: make channel name comparisons case insensitiveGonzalo Garramuño2020-01-22
| | | | Allow matching channel names in lowercase, like Diffuse.r in addition to Diffuse.R
* avcodec/exr: Allow duplicate use of channel indexesMichael Niedermayer2019-10-10
| | | | | | | Fixes: Ticket #8203 Reported-by: durandal_1707 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Fix undefined left shifts of negative numbersAndreas Rheinhardt2019-09-26
| | | | | | | | Affected the FATE-tests exr-rgb-scanline-pxr24-half-uint32-13x9 and exr-rgb-scanline-pxr24-uint32. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: cosmeticsLimin Wang2019-09-23
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: set layer_match in all branchesMichael Niedermayer2019-01-12
| | | | | | Otherwise it is left to the value from the previous iteration Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check for duplicate channel indexMichael Niedermayer2019-01-12
| | | | | | | | Fixes: Out of memory Fixes: 11582/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5730204559867904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: fix invalid shift in unpack_14()Michael Niedermayer2018-02-27
| | | | | | | | Fixes: 6154/clusterfuzz-testcase-minimized-5762231061970944 Fixes: runtime error: shift exponent 63 is too large for 32-bit type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr : add support for long name flag and be more explicit about ↵Martin Vignali2018-02-24
| | | | | | | | unsupported flag based-on patch by Carl Eugen Hoyos Fix ticket 6994
* avcodec/exr: Check remaining bits in last get code loopMichael Niedermayer2018-02-17
| | | | | | | | Fixes: runtime error: shift exponent -7 is negative Fixes: 3902/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-6081926122176512 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Fix memleaks in decode_header()Michael Niedermayer2018-02-02
| | | | | | | Fixes: 4793/clusterfuzz-testcase-minimized-5707366629638144 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: Check buf_size more completelyMichael Niedermayer2017-12-30
| | | | | | | | Fixes: Out of heap array read Fixes: 4683/clusterfuzz-testcase-minimized-6152313673613312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/exr: fix undefined shift in pxr24_uncompress()Michael Niedermayer2017-11-05
| | | | | | | | | Fixes: runtime error: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 3787/clusterfuzz-testcase-minimized-5728764920070144 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>
* libavcodec/exr : add x86 SIMD for predictorMartin Vignali2017-10-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/exrdsp: improve the ExrDSPContext->reorder_pixels prototypeJames Almer2017-09-17
| | | | | | Make dst be the first parameter and src const. It's more in line with the rest of the codebase. Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/exr : add X86 SIMD for reorder_pixelsMartin Vignali2017-09-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavcodec/exr : simplify reorder_pixelsMartin Vignali2017-05-14
| | | | | | | | | | reorder_pixels is call by rle_uncompress and zip_uncompress with size == uncompress_size uncompress_size is a multiple of 2 (because exr store data in half, float, or uint32) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/exr : cosmetics variable nameMartin Vignali2017-05-12
| | | | | | rename tile variable to better follow ffmpeg coding style Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/exr : fix piz uncompress on big endianMartin Vignali2017-05-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/exr : fix float to uint16 conversion for negative float valueMartin Vignali2017-04-27
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>