Commit 6a2e3a1e authored by Fabian Bauer's avatar Fabian Bauer
Browse files

some introduction to more tunings :: FIX_1072_SPEEDUP_output_synthesis_procSlot - inactive

parent 8d14bce5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@

#define SUPPORT_JBM_TRACEFILE                   /* Support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */

//#define WMOPS                                   /* Activate complexity and memory counters */
/*#define WMOPS*/                                   /* Activate complexity and memory counters */
#ifdef WMOPS
/*#define WMOPS_PER_FRAME*/                     /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */
/*#define WMOPS_DETAIL*/                        /* Output detailed complexity printout for every function. Increases runtime overhead */
@@ -157,3 +157,4 @@

#define FIX_1072_SPEEDUP_gainpanning            /* FhG: WMOPS tuning, in development*/
#define FIX_1072_SPEEDUP_COMPUTEDIFUSENESSB     /* "-" */
//#define FIX_1072_SPEEDUP_output_synthesis_procSlot  /* "-" */
 No newline at end of file
+13 −0
Original line number Diff line number Diff line
@@ -942,11 +942,22 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                                b = BASOP_Util_Divide3232_Scale( reference_power[k + num_freq_bands], reference_power[k + ( ch_idx + 1 ) * num_freq_bands], &b_exp ); /*q(15-b_exp)*/
                            }
                        }
#ifdef FIX_1072_SPEEDUP_output_synthesis_procSlot
                        q_diff_aab = add( h_dirac_output_synthesis_state->direct_responses_q + sub( sub( 15, b_exp ), 15 ), add( sub( h_dirac_output_synthesis_state->direct_responses_q, 31 ), sub( q_diffuseness, 31 ) ) );
                        q_diff_c = sub( q_diffuseness, 4 );

                        mpy_a_a_b = Mpy_32_32( a, Mpy_32_16_1( a, b ) );                                           // Q = (h_dirac_output_synthesis_state->q_direct_responses + (15 - b_exp) - 15) + (h_dirac_output_synthesis_state->q_direct_responses) - 31
                        mpy_diff_aab = Mpy_32_32( L_sub( L_shl( 1, q_diffuseness ), diffuseness[k] ), mpy_a_a_b ); // Q = 2*(h_dirac_output_synthesis_state->q_direct_responses) - b_exp - 31 + q_diffuseness -31
                        mpy_diff_c = Mpy_32_32( diffuseness[k], c );                                               // Q = q_diffuseness - 4

                        /*Todo: simplify so that mpy+add can be merged to madd*/
                        sqr_inp = BASOP_Util_Add_Mant32Exp( mpy_diff_c, sub( 31, q_diff_c ), mpy_diff_aab, sub( 31, q_diff_aab ), &sqr_exp ); /*q(31-sqr_exp)*/

#else
                        mpy_a_a_b = Mpy_32_32( a, Mpy_32_16_1( a, b ) );                                           // Q = (h_dirac_output_synthesis_state->q_direct_responses + (15 - b_exp) - 15) + (h_dirac_output_synthesis_state->q_direct_responses) - 31
                        mpy_diff_aab = Mpy_32_32( L_sub( L_shl( 1, q_diffuseness ), diffuseness[k] ), mpy_a_a_b ); // Q = 2*(h_dirac_output_synthesis_state->q_direct_responses) - b_exp - 31 + q_diffuseness -31
                        mpy_diff_c = Mpy_32_32( diffuseness[k], c );                                               // Q = q_diffuseness - 4

                        q_diff_aab = add( h_dirac_output_synthesis_state->direct_responses_q + sub( sub( 15, b_exp ), 15 ), add( sub( h_dirac_output_synthesis_state->direct_responses_q, 31 ), sub( q_diffuseness, 31 ) ) );
                        q_diff_c = sub( q_diffuseness, 4 );

@@ -970,6 +981,8 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                                sqr_exp = sub( 31, q_diff_c ); /*q_diff_c*/
                            }
                        }
#endif

                        sqr = Sqrt32( sqr_inp, &sqr_exp ); /*Q(31-sqr_exp)*/
                        sqr = L_shr( sqr, 2 );             /*Q(31-sqr_exp)*/
                        IF( h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + k] != 0 )