Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-24avcodec/cri: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAMPaul B Mahol
2022-09-03avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt
It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-27avcodec/internal: Move ff_set_dimensions() to decode.hAndreas Rheinhardt
Decoder-only, as the dimensions are set by the user when encoding. Also fixup the other headers a bit while removing unnecessary internal.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-07-18avcodec: Make init-threadsafety the defaultAndreas Rheinhardt
and remove FF_CODEC_CAP_INIT_THREADSAFE All our native codecs are already init-threadsafe (only wrappers for external libraries and hwaccels are typically not marked as init-threadsafe yet), so it is only natural for this to also be the default state. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-05avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt
This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-05avcodec/codec_internal: Make FFCodec.decode use AVFrame*Andreas Rheinhardt
This increases type-safety by avoiding conversions from/through void*. It also avoids the boilerplate "AVFrame *frame = data;" line for non-subtitle decoders. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt
Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt
Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-09avcodec/thread: Don't use ThreadFrame when unnecessaryAndreas Rheinhardt
The majority of frame-threaded decoders (mainly the intra-only) need exactly one part of ThreadFrame: The AVFrame. They don't need the owners nor the progress, yet they had to use it because ff_thread_(get|release)_buffer() requires it. This commit changes this and makes these functions work with ordinary AVFrames; the decoders that need the extra fields for progress use ff_thread_(get|release)_ext_buffer() which work exactly as ff_thread_(get|release)_buffer() used to do. This also avoids some unnecessary allocations of progress AVBuffers, namely for H.264 and HEVC film grain frames: These frames are not used for synchronization and therefore don't need a ThreadFrame. Also move the ThreadFrame structure as well as ff_thread_ref_frame() to threadframe.h, the header for frame-threaded decoders with inter-frame dependencies. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-27avcodec: Constify AVCodecsAndreas Rheinhardt
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>
2021-03-17avcodec/cri: use av_packet_alloc() to allocate packetsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-22avcodec/cri: Stop the bitreader at the end of uncompressed inputMichael Niedermayer
Fixes: Timeout Fixes: 29983/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6420415838814208 Fixes: 30595/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6559089360502784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-02avcodec/cri: Use ff_set_dimensions()Michael Niedermayer
Fixes: out of memory Fixes: 29985/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-6424425392111616 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>
2021-01-26avcodec/cri: Fix whitespace issue in unpack_10bit()Michael Niedermayer
Found-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-21avcodec/cri: check for available input in unpack_10bit()Michael Niedermayer
Fixes: Timeout (>20sec -> 56ms) Fixes: 26995/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5107217080254464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-04avcodec/cri: Make decoder init-threadsafeAndreas Rheinhardt
The only thing that stands in the way of adding the FF_CODEC_CAP_INIT_THREADSAFE flag to the Cintel RAW decoder is its usage of ff_codec_open2_recursive(): This function requires its caller to hold the lock for the mutex that guards initialization of AVCodecContexts whose codecs have a non-threadsafe init function and only callers whose codec does not have the FF_CODEC_CAP_INIT_THREADSAFE flag set hold said lock (the others don't need to care about said lock). But one can set the flag if one switches to avcodec_open2() at the same time. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-20avcodec/cri: Check for end of image in unpack_10bit()Michael Niedermayer
Fixes: out of array write Fixes: 26242/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CRI_fuzzer-5161495882891264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-07avcodec: add Cintel RAW decoderPaul B Mahol