[FFmpeg-devel] [PATCH 3/5] avcodec/fft_fixed: Hardcode cosine tables to save space
Lynne
dev at lynne.ee
Thu Jan 7 17:42:49 EET 2021
Jan 7, 2021, 00:13 by andreas.rheinhardt at gmail.com:
> The tables that are used take 256B; the code to initialize them uses
> 281B here (GCC 9.3, x64, -O3, but in av_cold functions). On top of that,
> removing this code also allows to remove the array of AVOnce used to
> guard the cosine tables against multiple initializations; this also
> removes relocations.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> libavcodec/Makefile | 2 +-
> libavcodec/fft.h | 19 +++++++++---------
> libavcodec/fft_fixed.c | 42 +++++++++++++++++++++++++++++++++++++++
> libavcodec/fft_template.c | 27 +++++++++----------------
> 4 files changed, 62 insertions(+), 28 deletions(-)
>
I'm not a big fan of this one. It saves minor amounts of space, introduces
more hard/soft table init splits, and is for code due to be replaced by
libavutil/tx anyway.
More information about the ffmpeg-devel
mailing list