lavc/dsd_tablegen: always generate tables at runtime

Commit b272c3a5aa has sped up dsd_tablegen, and now table generation takes
~ 40k cycles. Thus, these tables can always be generated at runtime.

Tested with/without --enable-hardcoded-tables.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
Ganesh Ajjanagadde 2015-12-29 08:50:43 -08:00
parent 73ce8162f3
commit b492fbcc6e
3 changed files with 1 additions and 46 deletions

View File

@ -975,7 +975,6 @@ HOSTPROGS = aacps_tablegen \
cbrt_tablegen \
cbrt_fixed_tablegen \
cos_tablegen \
dsd_tablegen \
dv_tablegen \
motionpixels_tablegen \
mpegaudio_tablegen \
@ -1002,7 +1001,7 @@ $(SUBDIR)%_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DCONFIG_SMALL=0
endif
GEN_HEADERS = cbrt_tables.h cbrt_fixed_tables.h aacps_tables.h aacps_fixed_tables.h \
dsd_tables.h dv_tables.h \
dv_tables.h \
sinewin_tables.h sinewin_fixed_tables.h mpegaudio_tables.h motionpixels_tables.h \
pcm_tables.h qdm2_tables.h
GEN_HEADERS := $(addprefix $(SUBDIR), $(GEN_HEADERS))
@ -1016,7 +1015,6 @@ $(SUBDIR)aacdec_fixed.o: $(SUBDIR)cbrt_fixed_tables.h
$(SUBDIR)aacps_float.o: $(SUBDIR)aacps_tables.h
$(SUBDIR)aacps_fixed.o: $(SUBDIR)aacps_fixed_tables.h
$(SUBDIR)aactab_fixed.o: $(SUBDIR)aac_fixed_tables.h
$(SUBDIR)dsddec.o: $(SUBDIR)dsd_tables.h
$(SUBDIR)dvenc.o: $(SUBDIR)dv_tables.h
$(SUBDIR)sinewin.o: $(SUBDIR)sinewin_tables.h
$(SUBDIR)sinewin_fixed.o: $(SUBDIR)sinewin_fixed_tables.h

View File

@ -1,38 +0,0 @@
/*
* Generate a header file for hardcoded DSD tables
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdlib.h>
#define CONFIG_HARDCODED_TABLES 0
#include "dsd_tablegen.h"
#include "tableprint.h"
#include <inttypes.h>
int main(void)
{
dsd_ctables_tableinit();
write_fileheader();
printf("static const double ctables[CTABLES][256] = {\n");
write_float_2d_array(ctables, CTABLES, 256);
printf("};\n");
return 0;
}

View File

@ -29,10 +29,6 @@
#define HTAPS 48 /** number of FIR constants */
#define CTABLES ((HTAPS + 7) / 8) /** number of "8 MACs" lookup tables */
#if CONFIG_HARDCODED_TABLES
#define dsd_ctables_tableinit()
#include "libavcodec/dsd_tables.h"
#else
#include "libavutil/common.h"
/*
@ -91,6 +87,5 @@ static av_cold void dsd_ctables_tableinit(void)
ctables[CTABLES - 1 - t][e] = acc[t];
}
}
#endif /* CONFIG_HARDCODED_TABLES */
#endif /* AVCODEC_DSD_TABLEGEN_H */