Commit 2875f268 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

add debug code

parent 3a282318
Loading
Loading
Loading
Loading
+32 −1
Original line number Diff line number Diff line
@@ -1872,7 +1872,8 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                            {
                                sqr = L_shr( sqr, sub( sub( 31, sqr_exp ), h_dirac_output_synthesis_state->q_cy_cross_dir_smooth[ch_idx * num_freq_bands + k] ) ); /*Q(31-sqr_exp)->h_dirac_output_synthesis_state->q_cy_cross_dir_smooth*/
                            }
                            h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + k] = L_add( h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + k], sqr ); /*Q_temp_cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + k]*/
                            h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + k] = 
								L_add( h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + k], sqr ); /*Q_temp_cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + k]*/
                            move32();
#else
                            IF( LT_16( sub( 31, sqr_exp ), h_dirac_output_synthesis_state->q_cy_cross_dir_smooth ) )
@@ -2042,6 +2043,22 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                             &h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands],
                             &h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands],
                             num_freq_bands, 0 ); /*Q(h_dirac_output_synthesis_state->q_cy_cross_dir_smooth)*/

#ifdef FIX_867_DBG
				FOR(Word16 l = 0; l < num_freq_bands; l++)
				{
					static FILE *f = 0;
					if (f == 0)
						f = fopen("cy_cross_dir_smooth1", "w");

					Word32 m = h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands_diff + l];
					Word16 e = h_dirac_output_synthesis_state->q_cy_cross_dir_smooth[ch_idx * num_freq_bands_diff + l];
					float f1_m = (float)m;
					float f1_e = powf(2, e);
					float f1 = f1_m / f1_e;
					fprintf(f, "%d %d %d %f\n", l, m, e, f1);
				}
#endif
            }

            /*Diffuse gain*/
@@ -2070,6 +2087,20 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx(
                             &h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[ch_idx * num_freq_bands_diff],
                             &h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[ch_idx * num_freq_bands_diff],
                             num_freq_bands_diff, 0 ); /*h_dirac_output_synthesis_state->q_cy_auto_diff_smooth*/

				FOR(Word16 l = 0; l < num_freq_bands; l++)
				{
					static FILE *f = 0;
					if (f == 0)
						f = fopen("cy_auto_diff_smooth1", "w");

					Word32 m = h_dirac_output_synthesis_state->cy_auto_diff_smooth_fx[ch_idx * num_freq_bands_diff + l];
					Word16 e = h_dirac_output_synthesis_state->q_cy_auto_diff_smooth[ch_idx * num_freq_bands_diff + l];
					float f1_m = (float)m;
					float f1_e = powf(2, e);
					float f1 = f1_m / f1_e;
					fprintf(f, "%d %d %d %f\n", l, m, e, f1);
				}
            }

            return;