shithub: opus

Download patch

ref: db7a0d6626b795357b2c21474187e27647ff21e8
parent: bae854501fa55ce2cdc1dd8f81e5e9c19c6ed2ff
author: Timothy B. Terriberry <[email protected]>
date: Wed Oct 7 15:45:44 EDT 2015

Fix dump_modes output for fixed-point NE10.

Some of the fields present in NE10's float state struct are not
 present in the fixed-point version, but we were generating
 initializers for them anyway.
Also, the float modes were not up-to-date with the output of
 dump_modes.

--- a/celt/dump_modes/dump_modes_arm_ne10.c
+++ b/celt/dump_modes/dump_modes_arm_ne10.c
@@ -133,10 +133,12 @@
       fprintf(file, "NULL,\n");  /* buffer */
       fprintf(file, "(%s *)&ne10_twiddles_%d[%d],\n",
               NE10_FFT_CPX_TYPE_T_STR, mode->mdct.kfft[k]->nfft, cfg->nfft);
+#if !defined(FIXED_POINT)
       fprintf(file, "/* is_forward_scaled = true */\n");
       fprintf(file, "(ne10_int32_t) 1,\n");
       fprintf(file, "/* is_backward_scaled = false */\n");
       fprintf(file, "(ne10_int32_t) 0,\n");
+#endif
       fprintf(file, "};\n");
 
       fprintf(file, "static const arch_fft_state cfg_arch_%d = {\n",
--- a/celt/static_modes_fixed_arm_ne10.h
+++ b/celt/static_modes_fixed_arm_ne10.h
@@ -343,10 +343,6 @@
 (ne10_fft_cpx_int32_t *)ne10_twiddles_480,
 NULL,
 (ne10_fft_cpx_int32_t *)&ne10_twiddles_480[120],
-/* is_forward_scaled = true */
-(ne10_int32_t) 1,
-/* is_backward_scaled = false */
-(ne10_int32_t) 0,
 };
 static const arch_fft_state cfg_arch_480 = {
 1,
@@ -359,10 +355,6 @@
 (ne10_fft_cpx_int32_t *)ne10_twiddles_240,
 NULL,
 (ne10_fft_cpx_int32_t *)&ne10_twiddles_240[60],
-/* is_forward_scaled = true */
-(ne10_int32_t) 1,
-/* is_backward_scaled = false */
-(ne10_int32_t) 0,
 };
 static const arch_fft_state cfg_arch_240 = {
 1,
@@ -375,10 +367,6 @@
 (ne10_fft_cpx_int32_t *)ne10_twiddles_120,
 NULL,
 (ne10_fft_cpx_int32_t *)&ne10_twiddles_120[30],
-/* is_forward_scaled = true */
-(ne10_int32_t) 1,
-/* is_backward_scaled = false */
-(ne10_int32_t) 0,
 };
 static const arch_fft_state cfg_arch_120 = {
 1,
@@ -391,10 +379,6 @@
 (ne10_fft_cpx_int32_t *)ne10_twiddles_60,
 NULL,
 (ne10_fft_cpx_int32_t *)&ne10_twiddles_60[15],
-/* is_forward_scaled = true */
-(ne10_int32_t) 1,
-/* is_backward_scaled = false */
-(ne10_int32_t) 0,
 };
 static const arch_fft_state cfg_arch_60 = {
 1,
--- a/celt/static_modes_float_arm_ne10.h
+++ b/celt/static_modes_float_arm_ne10.h
@@ -337,7 +337,7 @@
 {-0.95105654f,-0.30901679f}, {-1.0000000f,8.7422777e-08f}, {-0.95105654f,0.30901697f},
 {-0.80901694f,0.58778536f}, {-0.58778507f,0.80901712f}, {-0.30901709f,0.95105648f},
 };
-static const ne10_fft_state_float32_t ne10_fft_state_float32_480 = {
+static const ne10_fft_state_float32_t ne10_fft_state_float32_t_480 = {
 120,
 (ne10_int32_t *)ne10_factors_480,
 (ne10_fft_cpx_float32_t *)ne10_twiddles_480,
@@ -350,10 +350,10 @@
 };
 static const arch_fft_state cfg_arch_480 = {
 1,
-(void *)&ne10_fft_state_float32_480,
+(void *)&ne10_fft_state_float32_t_480,
 };
 
-static const ne10_fft_state_float32_t ne10_fft_state_float32_240 = {
+static const ne10_fft_state_float32_t ne10_fft_state_float32_t_240 = {
 60,
 (ne10_int32_t *)ne10_factors_240,
 (ne10_fft_cpx_float32_t *)ne10_twiddles_240,
@@ -366,10 +366,10 @@
 };
 static const arch_fft_state cfg_arch_240 = {
 1,
-(void *)&ne10_fft_state_float32_240,
+(void *)&ne10_fft_state_float32_t_240,
 };
 
-static const ne10_fft_state_float32_t ne10_fft_state_float32_120 = {
+static const ne10_fft_state_float32_t ne10_fft_state_float32_t_120 = {
 30,
 (ne10_int32_t *)ne10_factors_120,
 (ne10_fft_cpx_float32_t *)ne10_twiddles_120,
@@ -382,10 +382,10 @@
 };
 static const arch_fft_state cfg_arch_120 = {
 1,
-(void *)&ne10_fft_state_float32_120,
+(void *)&ne10_fft_state_float32_t_120,
 };
 
-static const ne10_fft_state_float32_t ne10_fft_state_float32_60 = {
+static const ne10_fft_state_float32_t ne10_fft_state_float32_t_60 = {
 15,
 (ne10_int32_t *)ne10_factors_60,
 (ne10_fft_cpx_float32_t *)ne10_twiddles_60,
@@ -398,7 +398,7 @@
 };
 static const arch_fft_state cfg_arch_60 = {
 1,
-(void *)&ne10_fft_state_float32_60,
+(void *)&ne10_fft_state_float32_t_60,
 };
 
 #endif  /* end NE10_FFT_PARAMS48000_960 */