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-10-04avcodec/wmalosslessdec: Simplify flushing, avoid NULL + 0Andreas Rheinhardt
Return immediately if not enough leftover bits are available when flushing. This is simpler and also avoids an init_get_bits(gb, NULL, 0) (which currently leads to NULL + 0, which is UB; this affects the lossless-wma(|-1|-2|-rawtile) FATE tests). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
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_get_buffer() to decode.hAndreas Rheinhardt
Only used by decoders (encoders have ff_encode_alloc_frame()). Also clean up the other headers a bit while removing now redundant internal.h inclusions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-08-24avcodec/wmalosslessdec: Remove unnecessary emms_c()Andreas Rheinhardt
Possible since 6feea076e98512d78c8d735509ab6b5e9a71ca1c. 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-06-09avcodec/wmalosslessdec: Check channels after setting themMichael Niedermayer
Fixes: 46194/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-580292873827123 Fixes: stack-buffer-overflow on address 0x7ffc0ce69b30 at pc 0x00000062fb03 bp 0x7ffc0ce69af0 sp 0x7ffc0ce69ae8 Fixes: 46205/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5354894996930560 Fixes: 47861/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4817404984688640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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-29avcodec/wmalosslessdec: ensure channel count in the private context and ↵James Almer
decoder context are consistent Fixes: Out of array write Fixes: 45613/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4539073606320128 Fixes: 46008/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4681245747970048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.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-03-15wma: convert to new channel layout APIAnton Khirnov
Signed-off-by: James Almer <jamrial@gmail.com>
2021-05-06avcodec/wmalosslessdec: Mark decoder as init-threadsafeAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.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-01-01lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov
They are not properly namespaced and not intended for public use.
2020-10-28put_bits: make avpriv_copy_bits() lavc-localAnton Khirnov
It is not used outside of lavc anymore. Keep the avpriv exported symbol around until the next bump to preserve ABI compatibility.
2020-09-17avcodec/wmalosslessdec: Check remaining space before padding and channel residueMichael Niedermayer
Fixes: Timeout (1101sec -> 0.4sec) Fixes: 24491/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5725337036783616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-30avcodec/wmalosslessdec: fix overflow with pred in revert_cdlmsMichael Niedermayer
Fixes: signed integer overflow: 2048 + 2147483646 cannot be represented in type 'int' Fixes: 23538/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5227567073460224 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-13avcodec/wmalosslessdec: Check block_align maximumMichael Niedermayer
Fixes: Assertion failure Fixes: 22737/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5958388889681920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-05avcodec/wmalosslessdec: Fix integer overflow in mclms_predict()Michael Niedermayer
Fixes: signed integer overflow: 2147483636 + 2048 cannot be represented in type 'int' Fixes: 22016/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5109395618004992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-21avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr()Michael Niedermayer
Fixes: signed integer overflow: -717241856 + -1434459904 cannot be represented in type 'int' Fixes: 21405/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5677143666458624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-02libavcodec/wmalosslessdec: prevent sum of positive numbers from becoming ↵Michael Niedermayer
negative Fixes: left shift of negative value -8321365 Fixes: 20506/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-4798062906310656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-10avcodec/wmalosslessdec: Fix integer overflow with sliding in padding bitsMichael Niedermayer
Fixes: signed integer overflow: -53716100 * 256 cannot be represented in type 'int' Fixes: 20143/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5716604000403456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-10avcodec/wmalosslessdec: Fix loop in revert_acfilter()Michael Niedermayer
Fixes: out of array read Fixes: 20059/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5691776237305856 No testcase except the fuzzed one. Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-30avcodec/wmalosslessdec: Fix multiple integer overflowsMichael Niedermayer
Fixes: left shift of 3329 by 20 places cannot be represented in type 'int' Fixes: signed integer overflow: -199378355 + -1948950833 cannot be represented in type 'int' Fixes: 19837/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5752565837070336 Fixes: 19839/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5767483265122304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-15avcodec/wmalosslessdec: Use AV_STRINGIFY()Michael Niedermayer
Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-15avcodec/wmalosslessdec: Replace negative channel check by assertMichael Niedermayer
It is already checked by common code in git/master Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-15avcodec/wmalosslessdec: move channel check upMichael Niedermayer
Fixes: out of array access Fixes: 2nd part of 18429/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-6210814364614656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-31avcodec/wmalosslessdec: Fixes undefined overflow in dequantization in ↵Michael Niedermayer
decode_subframe() Fixes: signed integer overflow: 47875596 * 45 cannot be represented in type 'int' Fixes: 19082/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5687766512041984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-15avcodec/wmalosslessdec: Fix 2 overflows in mclmsMichael Niedermayer
Fixes: signed integer overflow: 2038337026 + 109343477 cannot be represented in type 'int' Fixes: 18886/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5673660505653248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-15avcodec/wmalosslessdec: Fix several integer issuesMichael Niedermayer
Fixes: shift exponent -1 is negative (and others) Fixes: 18852/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5660855295541248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-15avcodec/wmalosslessdec: Check that padding bits is not more than sample bitsMichael Niedermayer
Fixes: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 18817/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5713317180211200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-10avcodec/wmalosslessdec: Set FF_CODEC_CAP_INIT_CLEANUPMichael Niedermayer
Fixes: memleaks Fixes: 18429/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-6210814364614656 Fixes: 18722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5680535690543104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-29avcodec/wmalosslessdec: Fix some integer anomaliesMichael Niedermayer
Fixes: left shift of negative value -341180 Fixes: 18401/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5686380134400000 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>
2019-10-20avcodec/wmalosslessdec: Check block_alignMichael Niedermayer
Fixes: NULL pointer dereference Fixes: 18331/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5652847445671936 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>
2018-03-29avcodec/wmalosslessdec: Fix null pointer dereference in decode_frame()Michael Niedermayer
Fixes: 2018_03_23_poc.wav Found-by: GwanYeong Kim <gy741.kim@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-03-12avcodec/wmalosslessdec: Reset num_saved_bits on error pathMichael Niedermayer
Fixes: NULL pointer dereference Fixes: poc-201803.wav Found-by: GwanYeong Kim <gy741.kim@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01avcodec/wmalosslessdec: remove warning message as bug is fixedPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-08-21libavcodec/wmalosslessdec: Check the remaining bitsMichael Niedermayer
Fixes assertion failure Fixes: 24ebfda03228b5cc1ef792608cfba458/signal_sigabrt_7ffff6ae7c37_6473_3fa8a111dbc752b1a7c411c5ab79aaa4.wma Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-21Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
2016-06-06avcodec/wmalosslessdec: Use unsigned operations for overflowing casesMichael Niedermayer
Fixes undefined behavior in fate-lossless-wma24-2 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-04cosmetics: Fix spelling mistakesVittorio Giovara
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-03wmalossless: allow calling madd_int16Christophe Gisquet
This is done by actually handling the "prev_values" in the cascaded LMS data as if it were int16_t, thus requiring switching at various locations the computations.
2016-05-01avcodec/wmalosslessdec: Fix memset sizeofMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01avcodec/wmalosslessdec: silence a sample requestChristophe Gisquet
16bits samples with CDLMS orders of 8 are currently unsupported, but have never been encountered before. However, 8 seems to be the most frequent, if not the only order used for 24bits. In that case, the dsp functions are fine with handling order that are multiples of 8, so silence the warning. Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-05-01avcodec/wmalosslessdec: fix type for coeffs and lms_updates in cdlms structPaul B Mahol
They should really be int16_t. Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-30avcodec/wmalosslessdec: fix decoding of raw pcm tilesPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-13avcodec/wmalosslessdec: improve 24bit supportPaul B Mahol
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-13avcodec/wmalosslessdec: improve >2 channel supportPaul B Mahol
Before it worked for stereo files only. Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-10avcodec/wmalosslessdec: do not discard last frameJakub Stachowski
Signed-off-by: Paul B Mahol <onemda@gmail.com>