From 698a4b22d09daf592c68b1a044ad22d5a7daf884 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 30 Dec 2020 01:46:34 +0100 Subject: avcodec/aacdec_fixed: Move fixed-point sinewin tables to its only user 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 Signed-off-by: Andreas Rheinhardt --- libavcodec/aac_defines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/aac_defines.h') diff --git a/libavcodec/aac_defines.h b/libavcodec/aac_defines.h index 74ac011785..e94475ac54 100644 --- a/libavcodec/aac_defines.h +++ b/libavcodec/aac_defines.h @@ -34,7 +34,7 @@ #define AAC_RENAME(x) x ## _fixed #define AAC_RENAME_32(x) x ## _fixed_32 -#define AAC_KBD_RENAME(x) aac_ ## x ## _fixed +#define AAC_RENAME2(x) x ## _fixed typedef int INTFLOAT; typedef unsigned UINTFLOAT; ///< Equivalent to INTFLOAT, Used as temporal cast to avoid undefined sign overflow operations. typedef int64_t INT64FLOAT; @@ -84,7 +84,7 @@ typedef int AAC_SIGNE; #define AAC_RENAME(x) x #define AAC_RENAME_32(x) x -#define AAC_KBD_RENAME(x) ff_aac_ ## x +#define AAC_RENAME2(x) ff_ ## x typedef float INTFLOAT; typedef float UINTFLOAT; typedef float INT64FLOAT; -- cgit v1.2.3