Loading lib_com/prot_fx.h +2 −0 Original line number Diff line number Diff line Loading @@ -7189,7 +7189,9 @@ ivas_error core_switching_pre_dec_fx( const Word16 last_element_mode, /* i : last_element_mode */ const Word32 last_element_brate, /* i : last element bitrate */ const Word16 Q_old_synthFB, #ifndef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING Word16 *Q_olapBufferSynth, #endif Word16 *Q_olapBufferSynth2 ); ivas_error core_switching_post_dec_fx( Loading lib_dec/core_switching_dec_fx.c +7 −3 Original line number Diff line number Diff line Loading @@ -1158,7 +1158,9 @@ ivas_error core_switching_pre_dec_fx( const Word16 last_element_mode, /* i : last_element_mode */ const Word32 last_element_brate, /* i : last element bitrate */ const Word16 Q_old_synthFB, #ifndef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING Word16 *Q_olapBufferSynth, #endif Word16 *Q_olapBufferSynth2 ) { Word32 tmp_fx; /*Q-12*/ Loading Loading @@ -1954,7 +1956,6 @@ ivas_error core_switching_pre_dec_fx( { #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING lerp( st->hFdCngDec->hFdCngCom->olapBufferSynth, st->hFdCngDec->hFdCngCom->olapBufferSynth, shl( st->L_frame, 1 ), shl( st->last_L_frame, 1 ) ); (void) Q_olapBufferSynth; #else L_lerp_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth_fx, st->hFdCngDec->hFdCngCom->olapBufferSynth_fx, shl( st->L_frame, 1 ), shl( st->last_L_frame, 1 ), Q_olapBufferSynth ); #endif Loading @@ -1964,7 +1965,7 @@ ivas_error core_switching_pre_dec_fx( FOR( i = 0; i < shl( st->L_frame, 1 ); i++ ) { #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 20480 /* Q15*/ ); /* q_olapBuffer */ st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 20480 /* Q15*/ ); /* (Q15 - olapBufferSynth_exp) */ move16(); #else st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i] = Mult_32_16( st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i], (Word16) 20480 /* 0.6250f in Q15 */ ); Loading @@ -1977,13 +1978,16 @@ ivas_error core_switching_pre_dec_fx( FOR( i = 0; i < shl( st->L_frame, 1 ); i++ ) { #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( shl( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 1 ), 26214 /* Q14*/ ); /* q_olapBuffer */ st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 26214 /* Q14*/ ); /* (Q15 - olapBufferSynth_exp) + 1 */ move16(); #else st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i] = Mult_32_16( L_shl( st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i], 1 ), (Word16) 26214 /* 1.6f in Q14 */ ); move32(); #endif } #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING st->hFdCngDec->hFdCngCom->olapBufferSynth_exp = add( st->hFdCngDec->hFdCngCom->olapBufferSynth_exp, 1 ); #endif } } } Loading lib_dec/ivas_core_dec_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -438,7 +438,13 @@ ivas_error ivas_core_dec_fx( /*---------------------------------------------------------------------* * Preprocessing (preparing) for ACELP/HQ core switching *---------------------------------------------------------------------*/ #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING Word16 Q_olapBufferSynth2; Q_olapBufferSynth2 = Q15; /*Initializing with max values to avoid warnings*/ move16(); IF( NE_32( ( error = core_switching_pre_dec_fx( st, output_frame, sts[0]->last_core_brate, nchan_out, last_element_mode, last_element_brate, st->Q_syn, &Q_olapBufferSynth2 ) ), IVAS_ERR_OK ) ) #else Word16 Q_olapBufferSynth, Q_olapBufferSynth2; Q_olapBufferSynth = Q15; /*Initializing with max values to avoid warnings*/ Loading @@ -447,6 +453,7 @@ ivas_error ivas_core_dec_fx( move16(); IF( NE_32( ( error = core_switching_pre_dec_fx( st, output_frame, sts[0]->last_core_brate, nchan_out, last_element_mode, last_element_brate, st->Q_syn, &Q_olapBufferSynth, &Q_olapBufferSynth2 ) ), IVAS_ERR_OK ) ) #endif { return error; } Loading Loading
lib_com/prot_fx.h +2 −0 Original line number Diff line number Diff line Loading @@ -7189,7 +7189,9 @@ ivas_error core_switching_pre_dec_fx( const Word16 last_element_mode, /* i : last_element_mode */ const Word32 last_element_brate, /* i : last element bitrate */ const Word16 Q_old_synthFB, #ifndef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING Word16 *Q_olapBufferSynth, #endif Word16 *Q_olapBufferSynth2 ); ivas_error core_switching_post_dec_fx( Loading
lib_dec/core_switching_dec_fx.c +7 −3 Original line number Diff line number Diff line Loading @@ -1158,7 +1158,9 @@ ivas_error core_switching_pre_dec_fx( const Word16 last_element_mode, /* i : last_element_mode */ const Word32 last_element_brate, /* i : last element bitrate */ const Word16 Q_old_synthFB, #ifndef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING Word16 *Q_olapBufferSynth, #endif Word16 *Q_olapBufferSynth2 ) { Word32 tmp_fx; /*Q-12*/ Loading Loading @@ -1954,7 +1956,6 @@ ivas_error core_switching_pre_dec_fx( { #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING lerp( st->hFdCngDec->hFdCngCom->olapBufferSynth, st->hFdCngDec->hFdCngCom->olapBufferSynth, shl( st->L_frame, 1 ), shl( st->last_L_frame, 1 ) ); (void) Q_olapBufferSynth; #else L_lerp_fx( st->hFdCngDec->hFdCngCom->olapBufferSynth_fx, st->hFdCngDec->hFdCngCom->olapBufferSynth_fx, shl( st->L_frame, 1 ), shl( st->last_L_frame, 1 ), Q_olapBufferSynth ); #endif Loading @@ -1964,7 +1965,7 @@ ivas_error core_switching_pre_dec_fx( FOR( i = 0; i < shl( st->L_frame, 1 ); i++ ) { #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 20480 /* Q15*/ ); /* q_olapBuffer */ st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 20480 /* Q15*/ ); /* (Q15 - olapBufferSynth_exp) */ move16(); #else st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i] = Mult_32_16( st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i], (Word16) 20480 /* 0.6250f in Q15 */ ); Loading @@ -1977,13 +1978,16 @@ ivas_error core_switching_pre_dec_fx( FOR( i = 0; i < shl( st->L_frame, 1 ); i++ ) { #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( shl( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 1 ), 26214 /* Q14*/ ); /* q_olapBuffer */ st->hFdCngDec->hFdCngCom->olapBufferSynth[i] = mult_r( st->hFdCngDec->hFdCngCom->olapBufferSynth[i], 26214 /* Q14*/ ); /* (Q15 - olapBufferSynth_exp) + 1 */ move16(); #else st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i] = Mult_32_16( L_shl( st->hFdCngDec->hFdCngCom->olapBufferSynth_fx[i], 1 ), (Word16) 26214 /* 1.6f in Q14 */ ); move32(); #endif } #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING st->hFdCngDec->hFdCngCom->olapBufferSynth_exp = add( st->hFdCngDec->hFdCngCom->olapBufferSynth_exp, 1 ); #endif } } } Loading
lib_dec/ivas_core_dec_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -438,7 +438,13 @@ ivas_error ivas_core_dec_fx( /*---------------------------------------------------------------------* * Preprocessing (preparing) for ACELP/HQ core switching *---------------------------------------------------------------------*/ #ifdef FIX_BASOP_2262_OLAP_BUFFER_SYNTH_SWITCHING Word16 Q_olapBufferSynth2; Q_olapBufferSynth2 = Q15; /*Initializing with max values to avoid warnings*/ move16(); IF( NE_32( ( error = core_switching_pre_dec_fx( st, output_frame, sts[0]->last_core_brate, nchan_out, last_element_mode, last_element_brate, st->Q_syn, &Q_olapBufferSynth2 ) ), IVAS_ERR_OK ) ) #else Word16 Q_olapBufferSynth, Q_olapBufferSynth2; Q_olapBufferSynth = Q15; /*Initializing with max values to avoid warnings*/ Loading @@ -447,6 +453,7 @@ ivas_error ivas_core_dec_fx( move16(); IF( NE_32( ( error = core_switching_pre_dec_fx( st, output_frame, sts[0]->last_core_brate, nchan_out, last_element_mode, last_element_brate, st->Q_syn, &Q_olapBufferSynth, &Q_olapBufferSynth2 ) ), IVAS_ERR_OK ) ) #endif { return error; } Loading