summaryrefslogtreecommitdiff
path: root/libavcodec/sinewin_tablegen.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/aacdec_fixed: Move fixed-point sinewin tables to its only userAndreas Rheinhardt2021-02-071-21/+12
| | | | | | | | | | | | | | | | | | | | | | 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/sinewin_tablegen: Make initializing ff_sine_windows thread-safeAndreas Rheinhardt2020-12-081-0/+43
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/aacdec, sinewin: Move 120 and 960 point sine tables to aacdecAndreas Rheinhardt2020-12-081-4/+0
| | | | | | | | | | | | | 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>
* avcodec/sinewin_tablegen: Use better check in assertAndreas Rheinhardt2020-12-081-1/+1
| | | | | | | There are no ff_sine_windows for 2^i, 0 <= i < 5, so one should check for the index being >= 5. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavc/sinewin: Do not declare AAC 120/960 tables as const.Carl Eugen Hoyos2018-10-191-2/+2
| | | | | | | | | | 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.
* lavc/sinewin_tablegen: Fix compilation with --enable-hardcoded-tables.Carl Eugen Hoyos2017-08-261-3/+4
| | | | Reported by irc user JCount_.
* avcodec/aac: Add floating point 960/120 MDCT windowPaul B Mahol2017-08-241-1/+4
| | | | | Co-Authored-By: Alex Converse <alex.converse@gmail.com> Co-Authored-By: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec: Minor macro polishingNedeljko Babic2015-07-221-12/+9
| | | | | | | | 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-091-8/+23
| | | | | | | 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-08-161-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix even more missing includes after the common.h removal build: Factor out rangecoder dependencies to CONFIG_RANGECODER build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE x86: avcodec: Consistently name all init files Add more missing includes after removing the implicit common.h Add some more missing includes after removing the implicit common.h Don't include common.h from avutil.h rtmp: Automatically compute the hash for SWFVerification Conflicts: configure doc/APIchanges doc/examples/decoding_encoding.c libavcodec/Makefile libavcodec/assdec.c libavcodec/audio_frame_queue.c libavcodec/avpacket.c libavcodec/dv_profile.c libavcodec/dwt.c libavcodec/libtheoraenc.c libavcodec/rawdec.c libavcodec/rv40dsp.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/v210dec.h libavcodec/vc1dsp.c libavcodec/x86/Makefile libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/buffer.c libavfilter/formats.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_select.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/version.h libavutil/audioconvert.c libavutil/error.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Don't include common.h from avutil.hMartin Storsjö2012-08-151-0/+1
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Revert "sinewin_tablegen: use av_assert"Michael Niedermayer2012-06-081-2/+2
| | | | | | | | | | | | | | using as_assert() in the table generator would make the generators have to be linked to libavutil. This reverts commit c3b6efa4cb25400d7ff8853ee6ebd95c29b744a6.
* | sinewin_tablegen: use av_assertMichael Niedermayer2012-06-061-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-181-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-161-1/+2
| | | | | | | | | | | | | | 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-221-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-211-0/+5
| | | | | | | | | | 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-211-4/+4
|/ | | | Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Move sine windows to a separate fileMans Rullgard2011-03-201-0/+60
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>