Loading lib_com/basop_util.c +3 −3 Original line number Diff line number Diff line Loading @@ -872,7 +872,7 @@ Word16 divide3232( Word32 L_num, Word32 L_denom ) #endif sign = L_and( L_xor( L_num, L_denom ), 0x80000000 ); sign = L_and( L_xor( L_num, L_denom ), (Word32) 0x80000000 ); L_num = L_abs( L_num ); L_denom = L_abs( L_denom ); Loading Loading @@ -1520,7 +1520,7 @@ Word32 imult3216( Word32 x, Word16 y ) Mpy_32_16_ss( x, y, &mh, &ml ); mh = L_shl( mh, 15 ); ml = lshr( ml, 1 ); ml = (UWord16) lshr( (Word16) ml, 1 ); return L_or( mh, L_deposit_l( ml ) ); } Loading Loading @@ -2459,7 +2459,7 @@ Word16 BASOP_util_atan2( /* o: atan2(y,x) [-pi,pi] Q13 */ } /* --- division */ L_sign = L_and( L_xor( x, y ), 0x80000000 ); L_sign = L_and( L_xor( x, y ), (Word32) 0x80000000 ); q = 32767 /*1.0f Q15*/; /* y/x = neg/zero = -Inf */ sf = 0; Loading lib_com/bitstream_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -422,8 +422,8 @@ UWord16 get_next_indice_fx( /* o : value of the indice */ FOR( i = 0; i < nb_bits; i++ ) { value = lshl( value, 1 ); value = add( value, st_fx->bit_stream[add( st_fx->next_bit_pos, i )] ); value = (UWord16) L_shl( value, 1 ); value = (UWord16) L_add( value, st_fx->bit_stream[add( st_fx->next_bit_pos, i )] ); } /* update the position in the bitstream */ Loading lib_com/enh64.c +2 −2 Original line number Diff line number Diff line Loading @@ -707,7 +707,7 @@ Word32 W_sat_l( Word64 L64_var ) } else if ( L64_var < (int) 0x80000000 ) { L_var_out = 0x80000000; L_var_out = (Word32) 0x80000000; } else { Loading Loading @@ -1201,7 +1201,7 @@ Word32 W_round48_L( Word64 L64_var1 ) Word32 L_result; Word64 L64_var2 = 0x80000000; Word64 L64_MIN = 0x8000000000000000LL; Word64 L64_MIN = (Word64) 0x8000000000000000LL; Word64 L64_MAX = 0x7FFFFFFFFFFFFFFFLL; L64_var1 = W_shl( L64_var1, 16 ); Loading lib_com/enhUL32.c +1 −1 Original line number Diff line number Diff line Loading @@ -401,7 +401,7 @@ UWord16 u_extract_h( UWord32 UL_var1 ) UWord16 u_extract_l( UWord32 UL_var1 ) { return (UWord32) extract_l( (Word32) UL_var1 ); return (UWord16) extract_l( (Word32) UL_var1 ); } /* enable convenient reuse of Non-saturating UL_subNs , UL_addNs while "D"iscarding the sgn/wrap output flags */ Loading lib_com/hq_tools_fx.c +8 −8 Original line number Diff line number Diff line Loading @@ -676,7 +676,7 @@ void hvq_bwe_fine_fx( Mpy_32_16_ss( L_coeff[i], tmp, &L_tmp, &lsb ); /* 12+33-s+1-16=Q(30-s) */ shift2 = add( shift, 1 ); tmp = round_fx( L_shl( L_tmp, shift2 ) ); /* 30-s+s+1-16=Q(15) */ SWB_signal[i] = add( tmp, lshr( lsb, sub( 32, shift2 ) ) ); SWB_signal[i] = add( tmp, extract_l( L_shr( lsb, sub( 32, shift2 ) ) ) ); move16(); /* Q15 */ /*SWB_signal[i] = round_fx(L_shl(L_tmp, add(shift, 1))); // 30-s+s+1-16=Q(15) */ } Loading Loading @@ -1369,13 +1369,13 @@ void hvq_bwe_fx( tmp = s_min( norm_l( L_tmp0 ), tmp ); tmp = sub( tmp, 1 ); L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_deposit_l( lshr( lsb, sub( 16, tmp ) ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_shr( lsb, sub( 16, tmp ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_tmp0, L_shr( L_mult0( noise_level[0], Random( bwe_seed ) ), sub( 30 - ( qin + 2 ), tmp ) ) ); /* Qin+2+tmp */ tmp = round_fx( L_shl( L_tmp0, 27 - ( qin + 2 ) - tmp ) ); /* Q11 (Qin+2+tmp+27-qin-2-tmp-16) */ Mpy_32_16_ss( L_tmp1, tmp, &L_tmp0, &lsb ); /* Q10 (14+11+1-16) */ L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_deposit_l( lshr( lsb, 10 + 16 - qout ) ) ); L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_shr( lsb, 10 + 16 - qout ) ); move32(); /* Qout (10+qout-10) */ } ELSE Loading Loading @@ -1626,12 +1626,12 @@ void noise_mix_fx( tmp = s_min( norm_l( L_tmp0 ), tmp ); tmp = sub( tmp, 1 ); L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_deposit_l( lshr( lsb, sub( 16, tmp ) ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_shr( lsb, sub( 16, tmp ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_tmp0, L_shr( L_mult0( noise_level, Random( seed ) ), sub( 30 - ( qin + 2 ), tmp ) ) ); /* Qin+2+tmp */ tmp = round_fx( L_shl( L_tmp0, sub( sub( 27, add( qin, 2 ) ), tmp ) ) ); /* Q11 (Qin+2+tmp+27-qin-2-tmp-16) */ Mpy_32_16_ss( L_normq, tmp, &L_tmp0, &lsb ); /* Q10 (14+11+1-16) */ L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_deposit_l( lshr( lsb, 10 + 16 - qout ) ) ); L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_shr( lsb, 10 + 16 - qout ) ); move32(); /* Qout (10+qout-10) */ } ELSE Loading Loading @@ -2609,7 +2609,7 @@ void apply_envelope_fx( { /*coeff_out[i] = coeff[i]*normq; */ Mpy_32_16_ss( normq, coeff[i], &L_tmp, &lsb ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), lshr( lsb, 15 ) ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), L_shr( lsb, 15 ) ); move32(); /* Q12 (14+12+1-16)+1 */ } } Loading @@ -2631,7 +2631,7 @@ void apply_envelope_fx( { /*coeff_out[i] = coeff[i]*normq; */ Mpy_32_16_ss( normq, coeff[i], &L_tmp, &lsb ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), lshr( lsb, 15 ) ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), L_shr( lsb, 15 ) ); move32(); /* Q12 (14+12+1-16)+1 */ } } Loading @@ -2647,7 +2647,7 @@ void apply_envelope_fx( { /*coeff_out1[i] = coeff_out1[i]*normq; */ Mpy_32_16_ss( normq, coeff1[i], &L_tmp, &lsb ); coeff_out1[i] = L_add( L_shl( L_tmp, 1 ), lshr( lsb, 15 ) ); coeff_out1[i] = L_add( L_shl( L_tmp, 1 ), L_shr( lsb, 15 ) ); move32(); /* Q12 (14+12+1-16)+1 */ } } Loading Loading
lib_com/basop_util.c +3 −3 Original line number Diff line number Diff line Loading @@ -872,7 +872,7 @@ Word16 divide3232( Word32 L_num, Word32 L_denom ) #endif sign = L_and( L_xor( L_num, L_denom ), 0x80000000 ); sign = L_and( L_xor( L_num, L_denom ), (Word32) 0x80000000 ); L_num = L_abs( L_num ); L_denom = L_abs( L_denom ); Loading Loading @@ -1520,7 +1520,7 @@ Word32 imult3216( Word32 x, Word16 y ) Mpy_32_16_ss( x, y, &mh, &ml ); mh = L_shl( mh, 15 ); ml = lshr( ml, 1 ); ml = (UWord16) lshr( (Word16) ml, 1 ); return L_or( mh, L_deposit_l( ml ) ); } Loading Loading @@ -2459,7 +2459,7 @@ Word16 BASOP_util_atan2( /* o: atan2(y,x) [-pi,pi] Q13 */ } /* --- division */ L_sign = L_and( L_xor( x, y ), 0x80000000 ); L_sign = L_and( L_xor( x, y ), (Word32) 0x80000000 ); q = 32767 /*1.0f Q15*/; /* y/x = neg/zero = -Inf */ sf = 0; Loading
lib_com/bitstream_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -422,8 +422,8 @@ UWord16 get_next_indice_fx( /* o : value of the indice */ FOR( i = 0; i < nb_bits; i++ ) { value = lshl( value, 1 ); value = add( value, st_fx->bit_stream[add( st_fx->next_bit_pos, i )] ); value = (UWord16) L_shl( value, 1 ); value = (UWord16) L_add( value, st_fx->bit_stream[add( st_fx->next_bit_pos, i )] ); } /* update the position in the bitstream */ Loading
lib_com/enh64.c +2 −2 Original line number Diff line number Diff line Loading @@ -707,7 +707,7 @@ Word32 W_sat_l( Word64 L64_var ) } else if ( L64_var < (int) 0x80000000 ) { L_var_out = 0x80000000; L_var_out = (Word32) 0x80000000; } else { Loading Loading @@ -1201,7 +1201,7 @@ Word32 W_round48_L( Word64 L64_var1 ) Word32 L_result; Word64 L64_var2 = 0x80000000; Word64 L64_MIN = 0x8000000000000000LL; Word64 L64_MIN = (Word64) 0x8000000000000000LL; Word64 L64_MAX = 0x7FFFFFFFFFFFFFFFLL; L64_var1 = W_shl( L64_var1, 16 ); Loading
lib_com/enhUL32.c +1 −1 Original line number Diff line number Diff line Loading @@ -401,7 +401,7 @@ UWord16 u_extract_h( UWord32 UL_var1 ) UWord16 u_extract_l( UWord32 UL_var1 ) { return (UWord32) extract_l( (Word32) UL_var1 ); return (UWord16) extract_l( (Word32) UL_var1 ); } /* enable convenient reuse of Non-saturating UL_subNs , UL_addNs while "D"iscarding the sgn/wrap output flags */ Loading
lib_com/hq_tools_fx.c +8 −8 Original line number Diff line number Diff line Loading @@ -676,7 +676,7 @@ void hvq_bwe_fine_fx( Mpy_32_16_ss( L_coeff[i], tmp, &L_tmp, &lsb ); /* 12+33-s+1-16=Q(30-s) */ shift2 = add( shift, 1 ); tmp = round_fx( L_shl( L_tmp, shift2 ) ); /* 30-s+s+1-16=Q(15) */ SWB_signal[i] = add( tmp, lshr( lsb, sub( 32, shift2 ) ) ); SWB_signal[i] = add( tmp, extract_l( L_shr( lsb, sub( 32, shift2 ) ) ) ); move16(); /* Q15 */ /*SWB_signal[i] = round_fx(L_shl(L_tmp, add(shift, 1))); // 30-s+s+1-16=Q(15) */ } Loading Loading @@ -1369,13 +1369,13 @@ void hvq_bwe_fx( tmp = s_min( norm_l( L_tmp0 ), tmp ); tmp = sub( tmp, 1 ); L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_deposit_l( lshr( lsb, sub( 16, tmp ) ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_shr( lsb, sub( 16, tmp ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_tmp0, L_shr( L_mult0( noise_level[0], Random( bwe_seed ) ), sub( 30 - ( qin + 2 ), tmp ) ) ); /* Qin+2+tmp */ tmp = round_fx( L_shl( L_tmp0, 27 - ( qin + 2 ) - tmp ) ); /* Q11 (Qin+2+tmp+27-qin-2-tmp-16) */ Mpy_32_16_ss( L_tmp1, tmp, &L_tmp0, &lsb ); /* Q10 (14+11+1-16) */ L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_deposit_l( lshr( lsb, 10 + 16 - qout ) ) ); L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_shr( lsb, 10 + 16 - qout ) ); move32(); /* Qout (10+qout-10) */ } ELSE Loading Loading @@ -1626,12 +1626,12 @@ void noise_mix_fx( tmp = s_min( norm_l( L_tmp0 ), tmp ); tmp = sub( tmp, 1 ); L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_deposit_l( lshr( lsb, sub( 16, tmp ) ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_shl( L_tmp0, tmp ), L_shr( lsb, sub( 16, tmp ) ) ); /* Qin+2+tmp */ L_tmp0 = L_add( L_tmp0, L_shr( L_mult0( noise_level, Random( seed ) ), sub( 30 - ( qin + 2 ), tmp ) ) ); /* Qin+2+tmp */ tmp = round_fx( L_shl( L_tmp0, sub( sub( 27, add( qin, 2 ) ), tmp ) ) ); /* Q11 (Qin+2+tmp+27-qin-2-tmp-16) */ Mpy_32_16_ss( L_normq, tmp, &L_tmp0, &lsb ); /* Q10 (14+11+1-16) */ L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_deposit_l( lshr( lsb, 10 + 16 - qout ) ) ); L_coeff_out[i] = L_add( L_shl( L_tmp0, qout - 10 ), L_shr( lsb, 10 + 16 - qout ) ); move32(); /* Qout (10+qout-10) */ } ELSE Loading Loading @@ -2609,7 +2609,7 @@ void apply_envelope_fx( { /*coeff_out[i] = coeff[i]*normq; */ Mpy_32_16_ss( normq, coeff[i], &L_tmp, &lsb ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), lshr( lsb, 15 ) ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), L_shr( lsb, 15 ) ); move32(); /* Q12 (14+12+1-16)+1 */ } } Loading @@ -2631,7 +2631,7 @@ void apply_envelope_fx( { /*coeff_out[i] = coeff[i]*normq; */ Mpy_32_16_ss( normq, coeff[i], &L_tmp, &lsb ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), lshr( lsb, 15 ) ); coeff_out[i] = L_add( L_shl( L_tmp, 1 ), L_shr( lsb, 15 ) ); move32(); /* Q12 (14+12+1-16)+1 */ } } Loading @@ -2647,7 +2647,7 @@ void apply_envelope_fx( { /*coeff_out1[i] = coeff_out1[i]*normq; */ Mpy_32_16_ss( normq, coeff1[i], &L_tmp, &lsb ); coeff_out1[i] = L_add( L_shl( L_tmp, 1 ), lshr( lsb, 15 ) ); coeff_out1[i] = L_add( L_shl( L_tmp, 1 ), L_shr( lsb, 15 ) ); move32(); /* Q12 (14+12+1-16)+1 */ } } Loading