Commit a962a9fe authored by Manuel Jander's avatar Manuel Jander
Browse files

Correct value for output_mem_dmx_32k_q, the error was the assumption that...

Correct value for output_mem_dmx_32k_q, the error was the assumption that st->q_inp32 == st->q_inp + 16 which is not true. Also remove some scaling operations with no effect.
parent a65de9d7
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -804,7 +804,7 @@ void swb_pre_proc_fx(
                                hCPE->hStereoDft->output_mem_dmx_32k_fx[i] = Mpy_32_16_1( hCPE->hStereoDft->win_32k_fx[STEREO_DFT_OVL_32k - 1 - i], new_swb_speech[( ( inner_frame + i ) - STEREO_DFT_OVL_32k )] );
                                move32();
                            }
                            hCPE->hStereoDft->output_mem_dmx_32k_q = st->q_inp32;
                            hCPE->hStereoDft->output_mem_dmx_32k_q = add( st->q_inp, 16 );
                            move16();
#else
                            FOR( i = 0; i < STEREO_DFT_OVL_32k; i++ )
@@ -879,12 +879,10 @@ void swb_pre_proc_fx(
                        Word32 *new_swb_speech_fx;
                        set32_fx( new_swb_speech_buffer_fx, 0, L_FRAME48k + STEREO_DFT_OVL_MAX );
                        new_swb_speech_fx = new_swb_speech_buffer_fx + STEREO_DFT_OVL_MAX;
                        new_swb_speech_q = add( add( q_reImBuffer, 1 ), Q16 );
                        new_swb_speech_q = Q31;
                        move16();
                        stereo_dft_enc_synthesize_fx( hCPE->hStereoDft, new_swb_speech_fx, &new_swb_speech_q, &out_start_ind, &out_end_ind, st->idchan, input_Fs, 32000, 0, NULL );
                        // Copy_Scale_sig32_16( new_swb_speech_fx - STEREO_DFT_OVL_MAX, new_swb_speech - STEREO_DFT_OVL_MAX, L_FRAME48k + STEREO_DFT_OVL_MAX, add( st->q_inp, new_swb_speech_q ) ); // st->q_inp
                        Copy_Scale_sig_32_16( new_swb_speech_fx + out_start_ind, new_swb_speech + out_start_ind, out_end_ind - out_start_ind, sub( st->q_inp, new_swb_speech_q ) ); // st->q_inp
                        Copy_Scale_sig_32_16( new_swb_speech_fx + out_end_ind, new_swb_speech + out_end_ind, L_FRAME48k - out_end_ind, sub( st->q_inp, add( q_reImBuffer, 1 ) ) );  // st->q_inp

                        Copy_Scale_sig_nosat( new_swb_speech - Sample_Delay_SWB_BWE32k, hBWE_FD->old_input_fx, Sample_Delay_SWB_BWE32k, sub( -1, st->q_inp ) ); // Q(-1)
#else