summaryrefslogtreecommitdiff
path: root/libavcodec/aacpsdsp_template.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc/aacpsdsp: RISC-V V add_squaresRémi Denis-Courmont2022-09-271-0/+2
|
* lavc/aacpsdsp: precompute constant factorsRémi Denis-Courmont2022-09-221-11/+14
| | | | | | | | | | | | | | The input complex factors are constant for each iterations. This substitudes 4 loads, 2 additions and 2 subtractions per iteration of the inner-loop with another 4 loads. Thus effectively 4 arithmetic operations per iteration of the inner loop are avoided, i.e. 24 operations per iteration of the outer loop, or 24 * (n - 1) operations in total. If the inner loop is not unrolled by the compiler, this also might also save some pointer arithmetic as most instruction sets do not have addressing modes with negated register offsets (12 - j). Unless the compiler is optimising for code size, this is unlikely though.
* all: Replace if (ARCH_FOO) checks by #if ARCH_FOOAndreas Rheinhardt2022-06-151-8/+9
| | | | | | | | | | | | | | | | | | 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>
* avcodec/aacpsdsp_template: Fix integer overflow in ps_hybrid_analysis_c()Michael Niedermayer2019-06-251-4/+4
| | | | | | | | Fixes: signed integer overflow: -1539565182 + -798086761 cannot be represented in type 'int' Fixes: 14807/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-564925382682214 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacpsdsp_template: Fix integer overflow in ps_stereo_interpolate_c()Michael Niedermayer2018-08-041-4/+4
| | | | | | | | Fixes: signed integer overflow: -1813244069 + -1407981383 cannot be represented in type 'int' Fixes: 8823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5643295618236416 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* oavcodec/aacpsdsp_template: Use unsigned for hs0X to prevent undefined behaviorMichael Niedermayer2018-05-271-4/+4
| | | | | | | | Fixes: signed integer overflow: 1073741842 + 1784008138 cannot be represented in type 'int' Fixes: 6792/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5677589835284480 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacpsdsp_template: Fix integer overflows in ps_decorrelate_c()Michael Niedermayer2017-11-131-4/+4
| | | | | | | | Fixes: runtime error: signed integer overflow: 1939661764 - -454942263 cannot be represented in type 'int' Fixes: 3191/clusterfuzz-testcase-minimized-5688798451073024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacpsdsp_template: Fix undefined integer overflow in ps_add_squares_c()Michael Niedermayer2017-08-271-1/+1
| | | | | | | | Fixes runtime error: signed integer overflow: 1997494407 + 613252359 cannot be represented in type 'int' Fixes: 2014/clusterfuzz-testcase-minimized-5186337030275072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/aacpsdsp: use ptrdiff_t for stride in hybrid_analysisClément Bœsch2017-06-281-1/+1
|
* lavc/aarch64: add a few SIMD functions for AAC PSClément Bœsch2017-06-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | ☭ tests/checkasm/checkasm --bench --test=aacpsdsp checkasm: using random seed 3318985180 MMX implied by specified flags MMX implied by specified flags NEON: - aacpsdsp.add_squares [OK] - aacpsdsp.mul_pair_single [OK] - aacpsdsp.hybrid_analysis [OK] - aacpsdsp.stereo_interpolate [OK] checkasm: all 5 tests passed nop: 10.0 ps_add_squares_c: 63221.2 ps_add_squares_neon: 22311.7 ps_hybrid_analysis_c: 2466.6 ps_hybrid_analysis_neon: 1521.9 ps_mul_pair_single_c: 68592.0 ps_mul_pair_single_neon: 17426.6 ps_stereo_interpolate_c: 72344.3 ps_stereo_interpolate_neon: 72308.8 ps_stereo_interpolate_ipdopd_c: 117415.2 ps_stereo_interpolate_ipdopd_neon: 113386.3
* lavc/aacpsdsp: fix a few spaces (cosmetics)Clément Bœsch2017-06-281-4/+5
|
* x86/aacpsdsp: add SSE and SSE3 optimized functionsJames Almer2015-07-301-0/+2
| | | | | | | Between 1.5 and 2.5 times faster Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Implementation of AAC_fixed_decoder (PS-module)Djordje Pesut2015-07-221-0/+228
Add fixed point implementation. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>