summaryrefslogtreecommitdiff
path: root/libavcodec/lossless_audiodsp.c
Commit message (Collapse)AuthorAge
* all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt2022-06-15
| | | | | | | | | | | | | | | | | | This is more spec-compliant because it does not rely on dead-code elimination by the compiler. Especially MSVC has problems with this, as can be seen in https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html or https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html This commit does not eliminate every instance where we rely on dead code elimination: It only tackles branching to the initialization of arch-specific dsp code, not e.g. all uses of CONFIG_ and HAVE_ checks. But maybe it is already enough to compile FFmpeg with MSVC with whole-programm-optimizations enabled (if one does not disable too many components). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove/replace some unnecessary avcodec.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | Also remove other unnecessary headers and include headers directly while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/lossless_audiodsp: Fix undefined overflows in ↵Michael Niedermayer2020-06-14
| | | | | | | | | | scalarproduct_and_madd_int16_c() Fixes: signed integer overflow: 2142077091 + 6881070 cannot be represented in type 'int' 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>
* avcodec/wmalosslessdec: Use unsigned operations for overflowing casesMichael Niedermayer2016-06-06
| | | | | | Fixes undefined behavior in fate-lossless-wma24-2 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lossless audio dsp: unrollChristophe Gisquet2016-05-11
| | | | | | | | | The loops are guaranteed to be at least multiples of 8, so this unrolling is safe but allows exploiting execution ports. For int32 version: 68 -> 58c. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmalosslessdec: fix type for coeffs and lms_updates in cdlms structPaul B Mahol2016-05-01
| | | | | | They should really be int16_t. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/wmalosslessdec: improve 24bit supportPaul B Mahol2016-04-13
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* apedsp: move to llauddspChristophe Gisquet2014-06-05
APE is not the sole codec using scalarproduct_and_madd_int16. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>