summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/amrnbdec: move channel_size bellow to avoid array overreadsPaul B Mahol2021-10-03
|
* avcodec/mlpdec: skip decoding substreams if their channels are not to be usedPaul B Mahol2021-10-03
|
* avcodec/mlpdec: update matrix encoding only if it changedPaul B Mahol2021-10-03
|
* avcodec/amr*dec: reindentPaul B Mahol2021-10-03
|
* avcodec/amr*dec: add multichannel supportPaul B Mahol2021-10-03
|
* avcodec: add amr parserPaul B Mahol2021-10-02
|
* avcodec/vc1_pred: Remove unused function parameterAndreas Rheinhardt2021-10-02
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegaudiodec_template: Remove unused variableAndreas Rheinhardt2021-10-02
| | | | | | | Unused since 9ab0874ea8b6774c6f5470dba2b5b4615a610d0d. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/bmpenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dnxhdenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/dpxenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/magicyuvenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/proresenc_anatoliy: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/snowenc: Remove redundant pixel format checkAndreas Rheinhardt2021-10-02
| | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/magicyuvenc: Use immediate when knownAndreas Rheinhardt2021-10-02
| | | | | | It allows the compiler to optimize the bytestream2 checks away. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/siren: Improve the bits left threshold in decode_envelope()Michael Niedermayer2021-09-29
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/siren: Check available bits in decode_envelope()Michael Niedermayer2021-09-29
| | | | | | | | | Fixes: Timeout Fixes: 39089/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSNSIREN_fuzzer-6677219854909440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Suggested-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/zmbvenc: Remove redundant pixel format checkAndreas Rheinhardt2021-09-29
| | | | | | | | ff_encode_preinit() already checked the pixel format via AVCodec.pix_fmts. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libsvtav1: properly enforce CQP mode when set in wrapperLimin Wang2021-09-29
| | | | | | | SVT-AV1 seems to have switched their default from CQP to CRF in February, so enforce the controlling option accordingly. Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec: remove the unused low_delayLimin Wang2021-09-29
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/siren: add checksum calculationPeter Ross2021-09-28
| | | | | Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/siren: don't reduce getbitcontext size by checksum_bits at ↵Peter Ross2021-09-28
| | | | | | | | initialisation this allows the checksum calculation routine to also use getbitcontext Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/siren: prevent getbitcontext overreadPeter Ross2021-09-28
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Peter Ross <pross@xvid.org>
* avcodec/encoders: Remove redundant setting of AV_PKT_FLAG_KEYAndreas Rheinhardt2021-09-28
| | | | | | | It is now set generically for all those encoders whose corresponding AVCodecDescriptor has the AV_CODEC_PROP_INTRA_ONLY. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/encode: Set AV_PKT_FLAG_KEY based upon AV_CODEC_PROP_INTRA_ONLYAndreas Rheinhardt2021-09-28
| | | | | | | | | | | Currently, the AV_PKT_FLAG_KEY is automatically set for audio encoders; yet this is wrong, as both MLP and TrueHD have non-keyframes. So set it based upon AV_CODEC_PROP_INTRA_ONLY (from the corresponding AVCodecDescriptor) instead. This also sets it for some video codecs, which is intended. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_desc: Mark MLP as not being intra-onlyAndreas Rheinhardt2021-09-28
| | | | | | It has sync frames. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mlpenc: Set AV_PKT_FLAG_KEY manuallyAndreas Rheinhardt2021-09-28
| | | | | | | | | | TrueHD/MLP is one of the audio formats with keyframes. Currently, the generic encoding code just sets the keyframe flag for all returned packets, yet this is wrong for these encoders and will be changed in a future commit. So set the flag here for those packets that ought to have it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/videotoolboxenc: Fixes non-B-Frame encodingNoHalfBits2021-09-27
| | | | | | | | | | | | Sets vtctx->has_b_frames to 0 if the VideoToolbox compression session will not emit B-frames (and, in consequence, no valid DTSs). Required for the handling of invalid DTSs in 'vtenc_cm_to_avpacket' (line 2018ff) to work correctly and not abort encoding with "DTS is invalid." when no B-frames are generated. Signed-off-by: NoHalfBits <ffmpeg-devel@fluthaus.com> Signed-off-by: Rick Kern <kernrj@gmail.com>
* avcodec/apedec: Fix integer overflow in filter_fast_3320()Michael Niedermayer2021-09-26
| | | | | | | | Fixes: signed integer overflow: 2145649668 + 3956526 cannot be represented in type 'int' Fixes: 38351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-4647077926273024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mxpegdec: Check for AVDISCARD_ALLMichael Niedermayer2021-09-26
| | | | | | | | | | | Fixes: Fixes NULL pointer dereference Fixes: 36610/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6052641783283712 Fixes: 37907/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-4725170850365440 Fixes: 37904/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-6367889262247936 Fixes: 38085/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MXPEG_fuzzer-5175270823297024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h274: fix bad left shiftsMichael Niedermayer2021-09-26
| | | | | | | | Fixes: left shift of negative value -3 Fixes: 37788/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-6024714540154880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/flicvideo: Check remaining bytes in FLI*COPYMichael Niedermayer2021-09-26
| | | | | | | | Fixes: Timeout Fixes: 37795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-4846536543043584 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/utils: ARGO writes 4x4 blocks without regard to the image dimensionsMichael Niedermayer2021-09-26
| | | | | | | | Fixes: out of array access Fixes: 37197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5877046382297088 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/internal: Update AVCodecInternal.is_copy documentationAndreas Rheinhardt2021-09-26
| | | | | | Forgotten in 1f4cf92cfbd3accbae582ac63126ed5570ddfd37. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Simplify check for flushing of bsfAndreas Rheinhardt2021-09-26
| | | | | | | Just check for the existence of the bsf. This is equivalent to the old criterion of the AVCodecContext being a decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Remove redundant assertAndreas Rheinhardt2021-09-26
| | | | | | | | It is now checked by FATE that no encoder capable of flushing uses frame threads, so this now redundant runtime check can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Check codec caps for consistencyAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Make sanity check stricterAndreas Rheinhardt2021-09-26
| | | | | | | | | | | | | If an AVCodec has a private class, its priv_data_size must be > 0 and at the end of a successful call to avcodec_open2() the AVCodecContext's priv_data must exist and its first element must be a pointer to said AVClass. This should not be conditional on priv_data_size being > 0 (which is tested by FATE) or on the private context having been successfully allocated (which has to have happened at that point). So remove these preconditions to make the test stricter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Sanity check AVCodec.priv_data_sizeAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/j2kenc: Fix AV_OPT_TYPE_CONST offsetsAndreas Rheinhardt2021-09-26
| | | | | | They are supposed to be zero. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Check consistency of function pointersAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Test AVCodec and AVCodecDescriptor consistencyAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/avcodec: Add basic sanity checks for AVCodec propertiesAndreas Rheinhardt2021-09-26
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/tests/utils: Rename to avcodecAndreas Rheinhardt2021-09-26
| | | | | | | The current name comes from a time in which libavcodec/utils.c contained the whole core of libavcodec. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* webp: fix transforms after a palette with pixel packing.Maryla2021-09-25
| | | | | | | | | | | | | | | When a color indexing transform with 16 or fewer colors is used, WebP uses "pixel packing", i.e. storing several pixels in one byte, which virtually reduces the width of the image (see WebPContext's reduced_width field). This reduced_width should always be used when reading and applying subsequent transforms. Updated patch with added fate test. The source image dual_transform.webp can be downloaded by cloning https://chromium.googlesource.com/webm/libwebp-test-data/ Fixes: 9368 Signed-off-by: James Zern <jzern@google.com>
* avcodec/qsvenc: Remove dead code for user-provided buffersAndreas Rheinhardt2021-09-25
| | | | | | | Dead since commit 93016f5d1d280f9cb7856883af287fa66affc04c which ensured that the packets received by encoders are always blank. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qsvenc: Fix memleaks upon allocation errorsAndreas Rheinhardt2021-09-25
| | | | | | | Fixes leaks in case the allocation of the H.264-specific stuff fails. Fixes Coverity issues #1442911 and #1442914. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/aarch64: fix relocation out of range errorZhao Zhili2021-09-25
| | | | | | Use a temporary label instead of global function symbol for b.gt. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/libsvtav1: Fix value range for rc modeLimin Wang2021-09-25
| | | | | Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/libsvtav1: make coded GOP type configurableLimin Wang2021-09-25
| | | | | Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>