Loading lib_dec/ivas_core_dec_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -1181,11 +1181,13 @@ ivas_error ivas_core_dec_fx( q = 11; move16(); #ifndef FIX_2367_REMOVE_CODE_ICBWE if ( hCPE->hStereoDft != NULL ) { hCPE->hStereoDft->td_gain_fx[0] = 1; move32(); } #endif stereo_icBWE_dec_fx( hCPE, hb_synth_32_fx[0], hb_synth_32_fx[1], tmp_buffer_fx /*fb_synth_ref*/, voice_factors_fx[0], output_frame, &q, Q_white_exc ); test(); test(); Loading lib_dec/ivas_stereo_icbwe_dec_fx.c +19 −10 Original line number Diff line number Diff line Loading @@ -112,6 +112,12 @@ static Word16 FindScale( } /*-------------------------------------------------------------------* * stereo_icBWE_dec() * * Spatial mapping of reference to the non-reference channels in SHB *-------------------------------------------------------------------*/ void stereo_icBWE_dec_fx( CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */ Word32 *synthRef_fx, /* i/o: Reference channel HB synthesis at output Fs Q11 */ Loading Loading @@ -150,6 +156,14 @@ void stereo_icBWE_dec_fx( STEREO_ICBWE_DEC_HANDLE hStereoICBWE = hCPE->hStereoICBWE; st = hCPE->hCoreCoder[0]; #ifdef FIX_2367_REMOVE_CODE_ICBWE if ( hCPE->hStereoDft != NULL ) { hCPE->hStereoDft->td_gain_fx[0] = 1; move32(); } #endif /*--------------------------------------------------------------------* * skip IC-BWE in case of mono DMX output * * -------------------------------------------------------------------*/ Loading Loading @@ -251,6 +265,7 @@ void stereo_icBWE_dec_fx( /*--------------------------------------------------------------------* * IC-BWE * * -------------------------------------------------------------------*/ test(); test(); test(); Loading @@ -265,7 +280,6 @@ void stereo_icBWE_dec_fx( return; } set16_fx( fb_synth_nonref_fx, 0, L_FRAME48k ); /* core switching reset */ Loading Loading @@ -408,7 +422,6 @@ void stereo_icBWE_dec_fx( } // hStereoICBWE->prevgsMapping = powf( 10, hStereoICBWE->prevgsMapping ); specMapping_fx = hStereoICBWE->prevSpecMapping_fx; // Q15 move16(); gsMapping_fx = hStereoICBWE->prevgsMapping_fx; // Q14 Loading Loading @@ -637,7 +650,6 @@ void stereo_icBWE_dec_fx( } /* generate 32kHz SHB synthesis from 12.8(16)kHz signal */ tmp = 31; move16(); tmp = FindScale( shb_synth_nonref_fx, L_FRAME16k + L_SHB_LAHEAD, Q_syn_shb, tmp ); Loading Loading @@ -669,7 +681,6 @@ void stereo_icBWE_dec_fx( alpha_fx = winSlope_fx; /* Q15 */ move16(); IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) ) { ratio_L_fx = 16384; /* 0.5 in Q15 */ Loading @@ -685,7 +696,6 @@ void stereo_icBWE_dec_fx( move16(); IF( hStereoICBWE->refChanIndx_bwe == L_CH_INDX ) { IF( GE_16( ratio_L_fx, 3276 /* 0.1 in Q15 */ ) ) { tmp = mult_r( sub( 32767 /* 1.0 in Q15 */, ratio_L_fx ), sub( 32767 /* 1.0 in Q15 */, ratio_L_fx ) ); // Q15 Loading Loading @@ -775,8 +785,6 @@ void stereo_icBWE_dec_fx( } /* resample to output FS */ IF( EQ_32( st->output_Fs, 48000 /* Q0 */ ) ) { tmp = 31; Loading Loading @@ -829,7 +837,6 @@ void stereo_icBWE_dec_fx( } /* copy to outputHB and reset hb_synth values */ IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) ) { ratio_L_fx = 16384; /* 1.0 in Q15 */ Loading Loading @@ -926,6 +933,7 @@ void stereo_icBWE_dec_fx( return; } /*-------------------------------------------------------------------* * stereo_icBWE_decproc() * Loading Loading @@ -1084,7 +1092,7 @@ void stereo_icBWE_decproc_fx( move32(); BREAK; } // memOffset for 16K 32K 48K are 15 30 45 respectively.camera // memOffset for 16K 32K 48K are 15 30 45 respectively } ELSE { Loading Loading @@ -1172,7 +1180,7 @@ void stereo_icBWE_decproc_fx( move16(); BREAK; } // memOffset for 16K 32K 48K are 15 30 45 respectively.camera // memOffset for 16K 32K 48K are 15 30 45 respectively } ELSE { Loading Loading @@ -1354,6 +1362,7 @@ void stereo_icBWE_decproc_fx( return; } /*-------------------------------------------------------------------* * stereo_icBWE_init_dec() * Loading lib_enc/ivas_core_enc_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -810,13 +810,18 @@ ivas_error ivas_core_enc_fx( * Inter-channel BWE encoding *-------------------------------------------------------------------*/ #ifndef FIX_2367_REMOVE_CODE_ICBWE Word16 q_new_swb_speech_buffer = getScaleFactor16( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // st->q_inp+q_new_swb_speech_buffer q_new_swb_speech_buffer = add( st->q_inp, q_new_swb_speech_buffer ); #endif test(); test(); IF( n == 0 && GE_32( input_Fs, 32000 ) && hStereoICBWE != NULL ) { #ifdef FIX_2367_REMOVE_CODE_ICBWE Word16 q_new_swb_speech_buffer = st->q_inp; #endif Word32 voice_factors_fx32[CPE_CHANNELS][NB_SUBFR16k]; stereo_icBWE_preproc_fx( hCPE, input_frame, new_swb_speech_buffer_fx_16 /*tmp buffer*/, q_new_swb_speech_buffer ); Loading Loading
lib_dec/ivas_core_dec_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -1181,11 +1181,13 @@ ivas_error ivas_core_dec_fx( q = 11; move16(); #ifndef FIX_2367_REMOVE_CODE_ICBWE if ( hCPE->hStereoDft != NULL ) { hCPE->hStereoDft->td_gain_fx[0] = 1; move32(); } #endif stereo_icBWE_dec_fx( hCPE, hb_synth_32_fx[0], hb_synth_32_fx[1], tmp_buffer_fx /*fb_synth_ref*/, voice_factors_fx[0], output_frame, &q, Q_white_exc ); test(); test(); Loading
lib_dec/ivas_stereo_icbwe_dec_fx.c +19 −10 Original line number Diff line number Diff line Loading @@ -112,6 +112,12 @@ static Word16 FindScale( } /*-------------------------------------------------------------------* * stereo_icBWE_dec() * * Spatial mapping of reference to the non-reference channels in SHB *-------------------------------------------------------------------*/ void stereo_icBWE_dec_fx( CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */ Word32 *synthRef_fx, /* i/o: Reference channel HB synthesis at output Fs Q11 */ Loading Loading @@ -150,6 +156,14 @@ void stereo_icBWE_dec_fx( STEREO_ICBWE_DEC_HANDLE hStereoICBWE = hCPE->hStereoICBWE; st = hCPE->hCoreCoder[0]; #ifdef FIX_2367_REMOVE_CODE_ICBWE if ( hCPE->hStereoDft != NULL ) { hCPE->hStereoDft->td_gain_fx[0] = 1; move32(); } #endif /*--------------------------------------------------------------------* * skip IC-BWE in case of mono DMX output * * -------------------------------------------------------------------*/ Loading Loading @@ -251,6 +265,7 @@ void stereo_icBWE_dec_fx( /*--------------------------------------------------------------------* * IC-BWE * * -------------------------------------------------------------------*/ test(); test(); test(); Loading @@ -265,7 +280,6 @@ void stereo_icBWE_dec_fx( return; } set16_fx( fb_synth_nonref_fx, 0, L_FRAME48k ); /* core switching reset */ Loading Loading @@ -408,7 +422,6 @@ void stereo_icBWE_dec_fx( } // hStereoICBWE->prevgsMapping = powf( 10, hStereoICBWE->prevgsMapping ); specMapping_fx = hStereoICBWE->prevSpecMapping_fx; // Q15 move16(); gsMapping_fx = hStereoICBWE->prevgsMapping_fx; // Q14 Loading Loading @@ -637,7 +650,6 @@ void stereo_icBWE_dec_fx( } /* generate 32kHz SHB synthesis from 12.8(16)kHz signal */ tmp = 31; move16(); tmp = FindScale( shb_synth_nonref_fx, L_FRAME16k + L_SHB_LAHEAD, Q_syn_shb, tmp ); Loading Loading @@ -669,7 +681,6 @@ void stereo_icBWE_dec_fx( alpha_fx = winSlope_fx; /* Q15 */ move16(); IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) ) { ratio_L_fx = 16384; /* 0.5 in Q15 */ Loading @@ -685,7 +696,6 @@ void stereo_icBWE_dec_fx( move16(); IF( hStereoICBWE->refChanIndx_bwe == L_CH_INDX ) { IF( GE_16( ratio_L_fx, 3276 /* 0.1 in Q15 */ ) ) { tmp = mult_r( sub( 32767 /* 1.0 in Q15 */, ratio_L_fx ), sub( 32767 /* 1.0 in Q15 */, ratio_L_fx ) ); // Q15 Loading Loading @@ -775,8 +785,6 @@ void stereo_icBWE_dec_fx( } /* resample to output FS */ IF( EQ_32( st->output_Fs, 48000 /* Q0 */ ) ) { tmp = 31; Loading Loading @@ -829,7 +837,6 @@ void stereo_icBWE_dec_fx( } /* copy to outputHB and reset hb_synth values */ IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) ) { ratio_L_fx = 16384; /* 1.0 in Q15 */ Loading Loading @@ -926,6 +933,7 @@ void stereo_icBWE_dec_fx( return; } /*-------------------------------------------------------------------* * stereo_icBWE_decproc() * Loading Loading @@ -1084,7 +1092,7 @@ void stereo_icBWE_decproc_fx( move32(); BREAK; } // memOffset for 16K 32K 48K are 15 30 45 respectively.camera // memOffset for 16K 32K 48K are 15 30 45 respectively } ELSE { Loading Loading @@ -1172,7 +1180,7 @@ void stereo_icBWE_decproc_fx( move16(); BREAK; } // memOffset for 16K 32K 48K are 15 30 45 respectively.camera // memOffset for 16K 32K 48K are 15 30 45 respectively } ELSE { Loading Loading @@ -1354,6 +1362,7 @@ void stereo_icBWE_decproc_fx( return; } /*-------------------------------------------------------------------* * stereo_icBWE_init_dec() * Loading
lib_enc/ivas_core_enc_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -810,13 +810,18 @@ ivas_error ivas_core_enc_fx( * Inter-channel BWE encoding *-------------------------------------------------------------------*/ #ifndef FIX_2367_REMOVE_CODE_ICBWE Word16 q_new_swb_speech_buffer = getScaleFactor16( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX ); Scale_sig( new_swb_speech_buffer_fx_16, L_FRAME48k + STEREO_DFT_OVL_MAX, q_new_swb_speech_buffer ); // st->q_inp+q_new_swb_speech_buffer q_new_swb_speech_buffer = add( st->q_inp, q_new_swb_speech_buffer ); #endif test(); test(); IF( n == 0 && GE_32( input_Fs, 32000 ) && hStereoICBWE != NULL ) { #ifdef FIX_2367_REMOVE_CODE_ICBWE Word16 q_new_swb_speech_buffer = st->q_inp; #endif Word32 voice_factors_fx32[CPE_CHANNELS][NB_SUBFR16k]; stereo_icBWE_preproc_fx( hCPE, input_frame, new_swb_speech_buffer_fx_16 /*tmp buffer*/, q_new_swb_speech_buffer ); Loading