summaryrefslogtreecommitdiff
path: root/libavcodec/aac_defines.h
Commit message (Collapse)AuthorAge
* avcodec: Remove the FFT_FIXED_32 defineAndreas Rheinhardt2021-08-05
| | | | | | | | Since the removal of the 16-bit FFT said define is unnecessary as FFT_FIXED_32 is always !FFT_FLOAT. But one wouldn't believe it when looking at the code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacdec_fixed: Move fixed-point sinewin tables to its only userAndreas Rheinhardt2021-02-07
| | | | | | | | | | | | | | | | | | | | | | The fixed-point AAC decoder is the only user of the fixed-point sinewin tables from sinewin; and it only uses a few of them (about 10% when counting by size). This means that guarding initializing these tables by an AVOnce (as done in 3719122065863f701026632f610175980d42b05a) is unnecessary for them. Furthermore the array of pointers to the individual arrays is also unneeded. Therefore this commit moves these tables directly into aacdec_fixed.c; this is done by ridding the original sinewin.h and sinewin_tablegen.h headers completely of any fixed-point code at the cost of a bit of duplicated code (the alternative is an ugly ifdef-mess). This saves about 58KB from the binary when using hardcoded tables (as these tables are hardcoded in this scenario); when not using hardcoded tables, most of these savings only affect the .bss segment, but the rest (< 1KB) contains relocations (i.e. savings in .data.rel.ro). Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacdec, aactab: Move kbd tables to their only userAndreas Rheinhardt2020-12-08
| | | | | | | | | | | | The floating point kbd tables for 120 and 960 samples are only used by the floating point decoder whereas the fixed point kbd tables for 128 and 1024 samples are only used by the fixed point AAC decoder. So move these tables to their only users. This ensures that they are not accidentally used somewhere else without ensuring that initializing these tables stays thread-safe (as it is now because the only place from where they are initialized is guarded by an AVOnce). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacdec_template: Fix undefined integer overflow in apply_tns()Michael Niedermayer2017-07-16
| | | | | | | | Fixes: runtime error: signed integer overflow: -2147483648 - 1202286525 cannot be represented in type 'int' Fixes: 2071/clusterfuzz-testcase-minimized-6036414271586304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aac_defines: Add missing () to AAC_HALF_SUM() macroMichael Niedermayer2017-05-28
| | | | | | | | Fixes: runtime error: shift exponent 1073741848 is too large for 32-bit type 'INTFLOAT' (aka 'int') Fixes: 1880/clusterfuzz-testcase-minimized-4900645322620928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aac_defines: Fix: runtime error: left shift of negative value -2Michael Niedermayer2017-05-21
| | | | | | | Fixes: 1716/clusterfuzz-testcase-minimized-4691012196761600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aactab: do not use floats for constantsMarton Balint2016-03-15
| | | | | | | | This may improve the precision of the fixed point encoder/decoder for some compilers and architectures. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/aac_defines: replace #define by typedefGanesh Ajjanagadde2015-11-24
| | | | | | | See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c for rationale. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* avcodec: Implementation of AAC_fixed_decoder (PS-module)Djordje Pesut2015-07-22
| | | | | | | Add fixed point implementation. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: Implementation of AAC_fixed_decoder (SBR-module)Djordje Pesut2015-07-20
Add fixed poind code. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>