Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -110,8 +110,10 @@ #define FIX_BASOP_2350_HARM_0B_BWE_2 /* VA: basop issue 2350: Simplify calling of hf_synth_fx() */ #define FIX_2349_HARM_FIND_UV /* VA: basop issue 2349: harmonization of find_uv() function */ #define FIX_2364_HARM_MULT_HARM /* VA: basop issue 2364 : harmonizing multi_harm_fx function */ #define FIX_2363_FIND_WSP /* VA: basop issue 2363 : harmonizing find_wsp function */ #define FIX_2370_UNUSED_BUFFERS_CORE_ENC /* VA: basop issue 2370: remove temporary input buffers in core-encoder */ #define FIX_2376_FIX_USAN_PRE_PROC /* VA: basop issue 2376: Resolve "USAN: SEGV in ivas_compute_core_buffers_fx() */ #define FIX_2367_REMOVE_CODE_ICBWE /* VA: basop issue 2367: Remove IC-BWE obsolete code */ #define REMOVE_SCALING_SHB_SPEECH /* VA: remove unnecessary scaling and 32-bit buffers from ivas_core_enc_fx() */ /* #################### End BE switches ################################## */ Loading lib_com/prot_fx.h +2 −1 Original line number Diff line number Diff line Loading @@ -11031,7 +11031,7 @@ void bands_and_bit_alloc_ivas_fx( const Word16 element_mode, /* i : element mode */ const Word16 GSC_IVAS_mode /* i : GSC IVAS mode */ ); #ifndef FIX_2363_FIND_WSP void ivas_find_wsp_fx( const Word16 L_frame, /* i : length of the frame Q0*/ const Word16 L_subfr, /* i : length of subframe Q0*/ Loading @@ -11045,6 +11045,7 @@ void ivas_find_wsp_fx( const Word16 gamma, /* i : weighting factor Q15 */ const Word16 L_look /* i : look-ahead Q0*/ ); #endif Word16 RCcontextMapping_encode2_estimate_bandWise_start_fx( Word16 *x, /* Q0 */ 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/find_uv_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -739,7 +739,7 @@ Word16 find_uv_fx( *-----------------------------------------------------------------*/ #ifdef FIX_2349_HARM_FIND_UV IF( st_fx->element_mode == EVS_MONO ) /* Overwrite DE3 in case of EVS */ IF( st_fx->element_mode == EVS_MONO ) /* Overwrite dE3 in case of EVS */ { dE3 = sub( Etot, hNoiseEst->Etot_last_fx ); /*Q8*/ } Loading Loading @@ -1108,8 +1108,8 @@ Word16 find_uv_fx( { st_fx->rf_mode = 0; move16(); /* Current frame cannot be compressed to pack the partial redundancy;*/ /* Current frame cannot be compressed to pack the partial redundancy */ IF( NE_16( st_fx->rf_mode, st_fx->Opt_RF_ON ) ) /* can happen only for EVS format */ { #ifdef FIX_2349_HARM_FIND_UV Loading Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -110,8 +110,10 @@ #define FIX_BASOP_2350_HARM_0B_BWE_2 /* VA: basop issue 2350: Simplify calling of hf_synth_fx() */ #define FIX_2349_HARM_FIND_UV /* VA: basop issue 2349: harmonization of find_uv() function */ #define FIX_2364_HARM_MULT_HARM /* VA: basop issue 2364 : harmonizing multi_harm_fx function */ #define FIX_2363_FIND_WSP /* VA: basop issue 2363 : harmonizing find_wsp function */ #define FIX_2370_UNUSED_BUFFERS_CORE_ENC /* VA: basop issue 2370: remove temporary input buffers in core-encoder */ #define FIX_2376_FIX_USAN_PRE_PROC /* VA: basop issue 2376: Resolve "USAN: SEGV in ivas_compute_core_buffers_fx() */ #define FIX_2367_REMOVE_CODE_ICBWE /* VA: basop issue 2367: Remove IC-BWE obsolete code */ #define REMOVE_SCALING_SHB_SPEECH /* VA: remove unnecessary scaling and 32-bit buffers from ivas_core_enc_fx() */ /* #################### End BE switches ################################## */ Loading
lib_com/prot_fx.h +2 −1 Original line number Diff line number Diff line Loading @@ -11031,7 +11031,7 @@ void bands_and_bit_alloc_ivas_fx( const Word16 element_mode, /* i : element mode */ const Word16 GSC_IVAS_mode /* i : GSC IVAS mode */ ); #ifndef FIX_2363_FIND_WSP void ivas_find_wsp_fx( const Word16 L_frame, /* i : length of the frame Q0*/ const Word16 L_subfr, /* i : length of subframe Q0*/ Loading @@ -11045,6 +11045,7 @@ void ivas_find_wsp_fx( const Word16 gamma, /* i : weighting factor Q15 */ const Word16 L_look /* i : look-ahead Q0*/ ); #endif Word16 RCcontextMapping_encode2_estimate_bandWise_start_fx( Word16 *x, /* Q0 */
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/find_uv_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -739,7 +739,7 @@ Word16 find_uv_fx( *-----------------------------------------------------------------*/ #ifdef FIX_2349_HARM_FIND_UV IF( st_fx->element_mode == EVS_MONO ) /* Overwrite DE3 in case of EVS */ IF( st_fx->element_mode == EVS_MONO ) /* Overwrite dE3 in case of EVS */ { dE3 = sub( Etot, hNoiseEst->Etot_last_fx ); /*Q8*/ } Loading Loading @@ -1108,8 +1108,8 @@ Word16 find_uv_fx( { st_fx->rf_mode = 0; move16(); /* Current frame cannot be compressed to pack the partial redundancy;*/ /* Current frame cannot be compressed to pack the partial redundancy */ IF( NE_16( st_fx->rf_mode, st_fx->Opt_RF_ON ) ) /* can happen only for EVS format */ { #ifdef FIX_2349_HARM_FIND_UV Loading