summaryrefslogtreecommitdiff
path: root/libavcodec/sinewin.h
Commit message (Collapse)AuthorAge
* 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>
* lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov2021-01-01
| | | | They are not properly namespaced and not intended for public use.
* avcodec/sinewin: Fix wrong number of elements of array declarationAndreas Rheinhardt2020-12-08
| | | | | | There are actually only 14 elements in each ff_sine_windows array. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacdec, sinewin: Move 120 and 960 point sine tables to aacdecAndreas Rheinhardt2020-12-08
| | | | | | | | | | | | | The floating point AAC decoder is the only user of these tables, so it makes sense to move them there. Furthermore, initializing the ordinary power-of-two sinetables is currently not thread-safe and if the 120- and 960-point sinetables were not moved, one would have to choose whether to guard initializing these two tables with their own AVOnces or not. Doing so would add unnecessary AVOnces as the AAC decoder already guards initializing its static data by an AVOnce; not doing so would be fragile if a second user of these tables were to be added. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavc/sinewin: Do not declare AAC 120/960 tables as const.Carl Eugen Hoyos2018-10-19
| | | | | | | | | | ff_sine_window_init() is writing to these tables causing a crash if compiled with gcc 8 and lto. Analyzed by Martin Liška in: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85132 Fixes ticket #7491.
* avcodec/aac: Add floating point 960/120 MDCT windowPaul B Mahol2017-08-24
| | | | | Co-Authored-By: Alex Converse <alex.converse@gmail.com> Co-Authored-By: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec: Minor macro polishingNedeljko Babic2015-07-22
| | | | | | | | Use macros from aac_defines.h for adding suffixes instead of local macros. Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec: Implementation of AAC_fixed_decoder (LC-module) [2/4]Jovan Zelincevic2015-07-09
| | | | | | | Add fixed point implementation of functions for generating tables Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dwt: check malloc calls ppc: Drop unused header regs.h af_resample: remove an extra space in the log output Convert vector_fmul range of functions to YASM and add AVX versions lavfi: add an audio split filter lavfi: rename vf_split.c to split.c Conflicts: doc/filters.texi libavcodec/ppc/regs.h libavfilter/Makefile libavfilter/allfilters.c libavfilter/f_split.c libavfilter/split.c libavfilter/version.h libavfilter/vf_split.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Convert vector_fmul range of functions to YASM and add AVX versionsKieran Kunhya2012-05-21
| | | | | | | | Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) als: prevent infinite loop in zero_remaining(). cook: prevent div-by-zero if channels is zero. pamenc: switch to encode2(). svq1enc: switch to encode2(). dvenc: switch to encode2(). dpxenc: switch to encode2(). pngenc: switch to encode2(). v210enc: switch to encode2(). xwdenc: switch to encode2(). ttadec: use branchless unsigned-to-signed unfolding avcodec: add a Sun Rasterfile encoder sunrast: Move common defines to a new header file. cdxl: fix video decoding for some files cdxl: fix audio for some samples apetag: add proper support for binary tags ttadec: remove dead code swscale: make access to filter data conditional on filter type. swscale: update context offsets after removal of AlpMmxFilter. prores: initialise encoder and decoder parts only when needed swscale: make monowhite/black RGB-independent. ... Conflicts: Changelog libavcodec/alsdec.c libavcodec/dpxenc.c libavcodec/golomb.h libavcodec/pamenc.c libavcodec/pngenc.c libavformat/img2.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * wmapro: change max. block size to 13 bits.Ronald S. Bultje2012-02-16
| | | | | | | | | | | | | | WMApro actually support 13-bits block sizes (potentially even up to 14), and thus we should support that also. If we get block sizes beyond what the decoder can handle (14 is possible depending on s->decode_flags), error out instead of crashing.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-05-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ffmpeg: get rid of the -vglobal option. dct32: Add AVX implementation of 32-point DCT dct32: Change pass 6 permutation to allow for AVX implementation dct32: port SSE 32-point DCT to YASM multiple inclusion guard cleanup avio: document buffer must created with av_malloc() and friends avio: check AVIOContext malloc failure swscale: point out an alternative to sws_getContext svq3: Do initialization after parsing the extradata add changelog entries for 0.7_beta2 mp3lame: add #include required for AV_RB32 macro. Conflicts: Changelog libavcodec/svq3.c libavcodec/x86/dct32_sse.c libavfilter/vsrc_buffer.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * multiple inclusion guard cleanupDiego Biurrun2011-05-21
| | | | | | | | | | Add missing multiple inclusion guards; clean up #endif comments; add missing library prefixes; keep guard names consistent.
* | Merge remote-tracking branch 'newdev/master'Michael Niedermayer2011-03-21
|/ | | | Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Move sine windows to a separate fileMans Rullgard2011-03-20
These windows do not really belong in fft/mdct files and were easily confused with the similarly named tables used by rdft. Signed-off-by: Mans Rullgard <mans@mansr.com>