summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/cfhdenc: use pts instead of frame numberPaul B Mahol2021-02-19
| | | | Makes encodes bitexact with different number of threads.
* avcodec/indeo3: add support for more dimensionsPaul B Mahol2021-02-19
| | | | Fixes #6581
* lavc/aarch64: add HEVC sao_band NEONJosh Dekker2021-02-18
| | | | | | Only works for 8x8. Signed-off-by: Josh Dekker <josh@itanimul.li>
* lavc/aarch64: add HEVC idct_dc NEONJosh Dekker2021-02-18
| | | | Signed-off-by: Josh Dekker <josh@itanimul.li>
* lavc/aarch64: port HEVC add_residual NEONReimar Döffinger2021-02-18
| | | | | | Speedup is fairly small, around 1.5%, but these are fairly simple. Signed-off-by: Josh Dekker <josh@itanimul.li>
* lavc/aarch64: port HEVC SIMD idct NEONReimar Döffinger2021-02-18
| | | | | | | | | | | | Makes SIMD-optimized 8x8 and 16x16 idcts for 8 and 10 bit depth available on aarch64. For a UHD HDR (10 bit) sample video these were consuming the most time and this optimization reduced overall decode time from 19.4s to 16.4s, approximately 15% speedup. Test sample was the first 300 frames of "LG 4K HDR Demo - New York.ts", running on Apple M1. Signed-off-by: Josh Dekker <josh@itanimul.li>
* avcodec: add initial exr image encoderPaul B Mahol2021-02-18
|
* lavc/aacdec_template: Fix 7.1 decoding with default strictness.KM2021-02-16
| | | | | Broken in 4d9b9c5e Fixes ticket #9057.
* avcodec/frame_thread_encoder: Use more natural typesAndreas Rheinhardt2021-02-16
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Reduce amount of code guarded by mutexAndreas Rheinhardt2021-02-16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid FIFOAndreas Rheinhardt2021-02-16
| | | | | | It can be replaced by a simple counter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid allocations of AVFramesAndreas Rheinhardt2021-02-16
| | | | | | | | | | | | | | | | Up until now, when using frame threaded encoding, an AVFrame would be allocated for every frame to be encoded. These AVFrames would reach the worker threads via a FIFO of tasks, a structure which contained the AVFrame as well as an index into an array which gives the place where the worker thread shall put the returned packet; in addition to that, said structure also contained several unused fields. This commit changes this: The AVFrames are now allocated during init in the array that is up until now only used to return the packets. The contents to be encoded are put into the AVFrame in the same array element that is also used to return the packets. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid creating reference to frameAndreas Rheinhardt2021-02-16
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Avoid allocations of AVPackets, fix deadlockAndreas Rheinhardt2021-02-16
| | | | | | | | | | | | | | | | | | | | | Up until now, when doing frame thread encoding, each worker thread tried to allocate an AVPacket for every AVFrame to be encoded; said packets would then be handed back to the main thread, where the content of said packet is copied into the packet actually destined for output; the temporary AVPacket is then freed. Besides being wasteful this also has another problem: There is a risk of deadlock, namely if no AVPacket can be allocated at all. The user doesn't get an error at all in this case and the worker threads will simply try to allocate a packet again and again. If the user has supplied enough frames, the user's thread will block until a task has been completed, which just doesn't happen if no packet can ever be allocated. This patch instead modifies the code to allocate the packets during init; they are then reused again and again. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Fix segfault on allocation errorAndreas Rheinhardt2021-02-16
| | | | | | | | | | | Fixes a segfault from av_fifo_size(NULL) that happens in ff_frame_thread_encoder_free if the fifo couldn't be allocted; furthermore the mutexes and conditions that are destroyed in ff_frame_thread_encoder_free are not even initialized at this point, so don't call said function. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/frame_thread_encoder: Improve type safetyAndreas Rheinhardt2021-02-16
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/vp8: Move end check into MB loop in vp78_decode_mv_mb_modes()Michael Niedermayer2021-02-16
| | | | | | | | | Fixes: Timeout (long -> 5sec) Fixes: 30269/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5430325004075008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* 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/setts_bsf: add sample rate for expressionsPaul B Mahol2021-02-15
|
* avcodec/exr: unbreak parsing sample aspect ratioPaul B Mahol2021-02-15
|
* avcodec/exr: read fps from metadata tooPaul B Mahol2021-02-15
|
* lavc/pnm: Allow decoding gray float pfm images.Carl Eugen Hoyos2021-02-15
|
* avcodec/fmvc: avoid copying uninitialized dataMichael Niedermayer2021-02-14
| | | | | | | | Fixes: Timeout Fixes: 30049/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FMVC_fuzzer-5986909455253504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/fits: Check gcount and pcount being non negativeMichael Niedermayer2021-02-14
| | | | | | | | Fixes: signed integer overflow: 9223372036854775807 - -30069403896 cannot be represented in type 'long' Fixes: 30046/clusterfuzz-testcase-minimized-ffmpeg_dem_FITS_fuzzer-5807144773484544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: export bits_per_raw_samplePaul B Mahol2021-02-14
| | | | Fixes #4717
* avcodec/pngenc: remove monowhite from apng formatsPaul B Mahol2021-02-14
| | | | | | | Monowhite pixel format is not supported, and it does not make sense to add support for it. Fixes #7989
* avcodec/mediacodecdec: do not abort when H264/HEVC extradata extraction failssfan52021-02-14
| | | | | | | Although rare, extradata can be present but empty and extraction will fail. However Android also supports passing codec-specific data inline and will likely play such a stream anyway. So there's no reason to abort initialization before we know for sure.
* avcodec/pngdec: fix possible race condition with APNG decodingPaul B Mahol2021-02-13
| | | | Fixes #9017
* avcodec/pnm_parser: Check av_image_get_buffer_size() for failureMichael Niedermayer2021-02-12
| | | | | | | | | | Fixes: out of array access Fixes: 30135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-4997145650397184 Fixes: 30208/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5605891665690624.fuzz 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/dpx: add support for other single component 8bit filesPaul B Mahol2021-02-12
|
* avcodec/dpx: add float support for single components and rgb(a)Paul B Mahol2021-02-12
|
* avcodec: add setts bitstream filterPaul B Mahol2021-02-12
|
* avcodec/hevcdec: fix a return error valueJames Almer2021-02-12
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevcdec: add some missing allocation checksJames Almer2021-02-11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevcdec: check that the local context list was allocated before ↵James Almer2021-02-11
| | | | | | | | | | | | | | | | | | | dereferencing it Since the decoder is not flagged as init cleanup capable, hevc_decode_free() is being called manually if the hevc_decode_extradata() call fails at the end of hevc_decode_init(). In a frame threading scenario, however, if AVCodec->init() returns an error, ff_frame_thread_free() will be called regardless of the above flag being set or not, resulting in hevc_decode_free() being called a second time for the same context. Workaround this by ensuring pointers are not dereferenced if they are NULL, and set the decoder as init cleanup capable while at it. Fixes ticket #9099. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mpegvideo_motion: Remove unnecessary headersAndreas Rheinhardt2021-02-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegvideo_motion: ReindentationAndreas Rheinhardt2021-02-11
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/mpegvideo_motion: Improve check to remove dead codeAndreas Rheinhardt2021-02-11
| | | | | | | | Several compile-time checks can be improved because mcsel is not used for MPEG-1/2 (it is only used for MPEG-4) and because MPEG-1/2 is the only user of ff_mpv_motion that uses MV_TYPE_16X8 and MV_TYPE_DMV. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/jpeg2000dec: Check atom_size in jp2_find_codestream()Michael Niedermayer2021-02-10
| | | | | | | | Fixes: Infinite loop Fixes: 29722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6412228041506816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mobiclip: Bound planar prediction valueMichael Niedermayer2021-02-10
| | | | | | | | | Fixes: signed integer overflow: 2 * 1073741952 cannot be represented in type 'int' Fixes: 26765/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-6594926936326144 Fixes: 29663/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5169789012148224 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeglsdec: Fix k=16 in ls_get_code_regular()Michael Niedermayer2021-02-10
| | | | | | | | | | Fixes: Timeout Fixes: left shift of 33046 by 16 places cannot be represented in type 'int' Fixes: 29258/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-4889231489105920 Fixes: 29515/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-6161940391002112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_sei: Check payload size in decode_nal_sei_message()Michael Niedermayer2021-02-10
| | | | | | | | Fixes: out of array access Fixes: 29392/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-4821602850177024.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libaomenc: add support for setting arbitrary libaom optionsBohan Li2021-02-10
| | | | | | | | | A new key & value API lets us gain access to newly added parameters without adding explicit support for them in our wrapper. Add an option utilizing this functionality in a similar manner to other encoder libraries' wrappers. Signed-off-by: Bohan Li <bohanli@google.com>
* avcodec/fitsdec: properly initialize header->data_maxPaul B Mahol2021-02-10
|
* avcodec: add cri parserPaul B Mahol2021-02-09
|
* avcodec/argo: fix linesize for RLE? in PAL8 modePaul B Mahol2021-02-09
|
* avcodec/g722enc: Validate parameters before using themAndreas Rheinhardt2021-02-08
| | | | | | | | In case trellis is outside of 0..23, an invalid shift and/or a signed integer overflow happens; furthermore, it can lead to the request to allocate nonsense amounts of memory. So validate first. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>