Loading lib_com/basop32.c +8 −0 Original line number Diff line number Diff line Loading @@ -3577,12 +3577,20 @@ Word16 div_l( Word32 L_num, Word16 den ) if ( den == (Word16) 0 ) { #ifdef IVAS_FLOAT_FIXED /* NOTE: This is just for temporary usage for identifying crashes */ assert( 0 ); #endif // IVAS_FLOAT_FIXED /* printf("Division by 0 in div_l, Fatal error in "); printStack(); */ exit( -1 ); } if ( ( L_num < (Word32) 0 ) || ( den < (Word16) 0 ) ) { #ifdef IVAS_FLOAT_FIXED /* NOTE: This is just for temporary usage for identifying crashes */ assert( 0 ); #endif // IVAS_FLOAT_FIXED /* printf("Division Error in div_l, Fatal error in "); printStack(); */ exit( -1 ); } Loading lib_dec/dec_gen_voic_fx.c +17 −0 Original line number Diff line number Diff line Loading @@ -740,19 +740,36 @@ ivas_error decod_gen_voic_ivas_fx( Word32 Ltmp1; /* Contribution from AVQ layer */ Ltmp1 = L_mult(gain_preQ_fx, code_preQ_fx[i]); /* Q2 + Q6 -> Q9*/ #ifdef BASOP_NOGLOB Ltmp1 = L_shl_sat(Ltmp1, tmp1_fx); /* Q16 + Q_exc */ #else Ltmp1 = L_shl(Ltmp1, tmp1_fx); /* Q16 + Q_exc */ #endif /* Compute exc2 */ #ifdef BASOP_NOGLOB L_tmp = L_shl_sat(L_mult(gain_pit_fx, exc_fx[i + i_subfr_fx]), 1); exc2_fx[i + i_subfr_fx] = round_fx_sat(L_add_sat(L_tmp, Ltmp1)); #else L_tmp = L_shl(L_mult(gain_pit_fx, exc_fx[i + i_subfr_fx]), 1); exc2_fx[i + i_subfr_fx] = round_fx(L_add(L_tmp, Ltmp1)); #endif /* code in Q9, gain_pit in Q14 */ L_tmp = L_mult(gain_code16, code_fx[i]); #ifdef BASOP_NOGLOB L_tmp = L_shl_sat(L_tmp, 5); L_tmp = L_mac_sat(L_tmp, exc_fx[i + i_subfr_fx], gain_pit_fx); L_tmp = L_shl_sat(L_tmp, 1); /* saturation can occur here */ exc_fx[i + i_subfr_fx] = round_fx_sat(L_add_sat(L_tmp, Ltmp1)); #else L_tmp = L_shl(L_tmp, 5); L_tmp = L_mac(L_tmp, exc_fx[i + i_subfr_fx], gain_pit_fx); L_tmp = L_shl(L_tmp, 1); /* saturation can occur here */ exc_fx[i + i_subfr_fx] = round_fx(L_add(L_tmp, Ltmp1)); #endif } } ELSE Loading lib_dec/hf_synth_fx.c +21 −22 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ void hf_synth_init_fx( return; } void hf_synth_reset_fx( ZERO_BWE_DEC_HANDLE hBWE_zero /* o : zero BWE decoder handle */ ) Loading lib_dec/ivas_cpe_dec_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -615,7 +615,7 @@ ivas_error ivas_cpe_dec_fx( IF( shift != 31 ) { shift = hCPE->hStereoDft->q_dft + shift - Q11; /* Q11 for guard bits */ shift = hCPE->hStereoDft->q_dft + shift - Q12; /* Q13 for guard bits */ IF( shift > hCPE->hStereoDft->q_dft ) { Loading lib_dec/ivas_dirac_dec.c +8 −2 Original line number Diff line number Diff line Loading @@ -4953,8 +4953,14 @@ void ivas_dirac_dec_render_sf_fx( { st_ivas->hMasa->data.dir_decode_quality_fx = float_to_fix16( st_ivas->hMasa->data.dir_decode_quality, Q15 ); qualityBasedSmFactor_fx = L_deposit_h( st_ivas->hMasa->data.dir_decode_quality_fx ); // Q31 qualityBasedSmFactor_fx = Mpy_32_32( qualityBasedSmFactor_fx, qualityBasedSmFactor_fx ); // (Q31, Q31) -> Q31 IF( EQ_16( st_ivas->hMasa->data.dir_decode_quality_fx, MAX_16 ) ) { qualityBasedSmFactor_fx = MAX_32; } ELSE { qualityBasedSmFactor_fx = L_mult( st_ivas->hMasa->data.dir_decode_quality_fx, st_ivas->hMasa->data.dir_decode_quality_fx ); // (Q15, Q15) -> Q31 } } qualityBasedSmFactor = fixedToFloat( qualityBasedSmFactor_fx, Q31 ); Loading Loading
lib_com/basop32.c +8 −0 Original line number Diff line number Diff line Loading @@ -3577,12 +3577,20 @@ Word16 div_l( Word32 L_num, Word16 den ) if ( den == (Word16) 0 ) { #ifdef IVAS_FLOAT_FIXED /* NOTE: This is just for temporary usage for identifying crashes */ assert( 0 ); #endif // IVAS_FLOAT_FIXED /* printf("Division by 0 in div_l, Fatal error in "); printStack(); */ exit( -1 ); } if ( ( L_num < (Word32) 0 ) || ( den < (Word16) 0 ) ) { #ifdef IVAS_FLOAT_FIXED /* NOTE: This is just for temporary usage for identifying crashes */ assert( 0 ); #endif // IVAS_FLOAT_FIXED /* printf("Division Error in div_l, Fatal error in "); printStack(); */ exit( -1 ); } Loading
lib_dec/dec_gen_voic_fx.c +17 −0 Original line number Diff line number Diff line Loading @@ -740,19 +740,36 @@ ivas_error decod_gen_voic_ivas_fx( Word32 Ltmp1; /* Contribution from AVQ layer */ Ltmp1 = L_mult(gain_preQ_fx, code_preQ_fx[i]); /* Q2 + Q6 -> Q9*/ #ifdef BASOP_NOGLOB Ltmp1 = L_shl_sat(Ltmp1, tmp1_fx); /* Q16 + Q_exc */ #else Ltmp1 = L_shl(Ltmp1, tmp1_fx); /* Q16 + Q_exc */ #endif /* Compute exc2 */ #ifdef BASOP_NOGLOB L_tmp = L_shl_sat(L_mult(gain_pit_fx, exc_fx[i + i_subfr_fx]), 1); exc2_fx[i + i_subfr_fx] = round_fx_sat(L_add_sat(L_tmp, Ltmp1)); #else L_tmp = L_shl(L_mult(gain_pit_fx, exc_fx[i + i_subfr_fx]), 1); exc2_fx[i + i_subfr_fx] = round_fx(L_add(L_tmp, Ltmp1)); #endif /* code in Q9, gain_pit in Q14 */ L_tmp = L_mult(gain_code16, code_fx[i]); #ifdef BASOP_NOGLOB L_tmp = L_shl_sat(L_tmp, 5); L_tmp = L_mac_sat(L_tmp, exc_fx[i + i_subfr_fx], gain_pit_fx); L_tmp = L_shl_sat(L_tmp, 1); /* saturation can occur here */ exc_fx[i + i_subfr_fx] = round_fx_sat(L_add_sat(L_tmp, Ltmp1)); #else L_tmp = L_shl(L_tmp, 5); L_tmp = L_mac(L_tmp, exc_fx[i + i_subfr_fx], gain_pit_fx); L_tmp = L_shl(L_tmp, 1); /* saturation can occur here */ exc_fx[i + i_subfr_fx] = round_fx(L_add(L_tmp, Ltmp1)); #endif } } ELSE Loading
lib_dec/hf_synth_fx.c +21 −22 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ void hf_synth_init_fx( return; } void hf_synth_reset_fx( ZERO_BWE_DEC_HANDLE hBWE_zero /* o : zero BWE decoder handle */ ) Loading
lib_dec/ivas_cpe_dec_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -615,7 +615,7 @@ ivas_error ivas_cpe_dec_fx( IF( shift != 31 ) { shift = hCPE->hStereoDft->q_dft + shift - Q11; /* Q11 for guard bits */ shift = hCPE->hStereoDft->q_dft + shift - Q12; /* Q13 for guard bits */ IF( shift > hCPE->hStereoDft->q_dft ) { Loading
lib_dec/ivas_dirac_dec.c +8 −2 Original line number Diff line number Diff line Loading @@ -4953,8 +4953,14 @@ void ivas_dirac_dec_render_sf_fx( { st_ivas->hMasa->data.dir_decode_quality_fx = float_to_fix16( st_ivas->hMasa->data.dir_decode_quality, Q15 ); qualityBasedSmFactor_fx = L_deposit_h( st_ivas->hMasa->data.dir_decode_quality_fx ); // Q31 qualityBasedSmFactor_fx = Mpy_32_32( qualityBasedSmFactor_fx, qualityBasedSmFactor_fx ); // (Q31, Q31) -> Q31 IF( EQ_16( st_ivas->hMasa->data.dir_decode_quality_fx, MAX_16 ) ) { qualityBasedSmFactor_fx = MAX_32; } ELSE { qualityBasedSmFactor_fx = L_mult( st_ivas->hMasa->data.dir_decode_quality_fx, st_ivas->hMasa->data.dir_decode_quality_fx ); // (Q15, Q15) -> Q31 } } qualityBasedSmFactor = fixedToFloat( qualityBasedSmFactor_fx, Q31 ); Loading