Loading lib_com/ivas_prot.h +2 −2 Original line number Diff line number Diff line Loading @@ -3535,12 +3535,12 @@ void distribute_evenly_ism( ); int16_t ivas_qmetadata_encode_extended_gr_length( int16_t ivas_qmetadata_encode_extended_gr_length_fx( const uint16_t value, const uint16_t alphabet_size, const int16_t gr_param); void ivas_qmetadata_encode_extended_gr( void ivas_qmetadata_encode_extended_gr_fx( BSTR_ENC_HANDLE hMetaData, /* i/o: q_metadata handle */ const uint16_t value, /* i : value to be encoded */ const uint16_t alphabet_size, /* i : alphabet size */ Loading lib_com/ivas_prot_fx.h +6 −7 Original line number Diff line number Diff line Loading @@ -4638,8 +4638,7 @@ Word32 lin_interp32_fx( const Word32 y1, /* i : source range interval: high end */ const Word32 x2, /* i : target range interval: low */ const Word32 y2, /* i : target range interval: high */ const Word16 flag_sat, /* i : flag to indicate whether to apply saturation */ Word16 *Q_io /*i/o : i/o Q factor of the output*/ const Word16 flag_sat /* i : flag to indicate whether to apply saturation */ ); void v_addc_fx( Loading lib_com/ivas_qmetadata_com.c +2 −2 Original line number Diff line number Diff line Loading @@ -280,8 +280,8 @@ void ivas_qmetadata_close_fx( /*! r: codeword index */ Word16 masa_sq_fx( const Word32 in, /* i : input value */ const Word32 *threshold, /* i : partition */ const Word32 in, /* i : input value Q30*/ const Word32 *threshold, /* i : partition Q30*/ const Word16 cb_sz /* i : codebook size */ ) { Loading lib_com/ivas_qspherical_com.c +1 −9 Original line number Diff line number Diff line Loading @@ -668,15 +668,7 @@ Word16 quantize_phi_chan_compand_fx( delta_phi = L_shr( delta_phi, sub( 9, tmp_e ) ); // Q22 // id_phi = (int16_t) round_f( ( phi / (float) delta_phi ) ); id_phi = BASOP_Util_Divide3232_Scale( phi, delta_phi, &tmp_e ); // Q15 IF( GE_16( abs_s( id_phi ), shl_sat( 1, sub( 15, tmp_e ) ) ) ) { id_phi = shr( id_phi, sub( 15, tmp_e ) ); // Q0 } ELSE { id_phi = 0; move16(); } id_phi = round_fx( L_shl( id_phi, add( tmp_e, 1 ) ) ); // Q0 IF( add( id_phi, shr( n, 1 ) ) < 0 ) { Loading lib_com/ivas_tools.c +14 −17 Original line number Diff line number Diff line Loading @@ -834,21 +834,18 @@ Word32 logsumexp_fx( *---------------------------------------------------------------------*/ /*! r: mapped output value */ Word32 lin_interp32_fx( const Word32 x, /* i : the value to be mapped Qin*/ const Word32 x1, /* i : source range interval: low end Qin*/ const Word32 y1, /* i : source range interval: high end Qin*/ const Word32 x2, /* i : target range interval: low Qin*/ const Word32 y2, /* i : target range interval: high Qin*/ const Word16 flag_sat, /* i : flag to indicate whether to apply saturation Q0*/ Word16 *Q_io /*i/o : i/o Q factor of the output*/ const Word32 x, /* i : the value to be mapped Qx */ const Word32 x1, /* i : source range interval: low end Qx */ const Word32 y1, /* i : source range interval: high end Q31 */ const Word32 x2, /* i : target range interval: low Qx */ const Word32 y2, /* i : target range interval: high Q31 */ const Word16 flag_sat /* i : flag to indicate whether to apply saturation */ ) { Word32 temp32; Word32 temp_div; Word16 temp_e = 0; Word16 exp_out = 0; move16(); move16(); Word16 exp_out; IF( L_sub( x2, x1 ) == 0 ) { return y1; Loading @@ -865,12 +862,12 @@ Word32 lin_interp32_fx( } } temp32 = Mpy_32_32( L_sub( x, x1 ), L_sub( y2, y1 ) ); // Qin*2 -31 temp_div = L_deposit_h( BASOP_Util_Divide3232_Scale( temp32, L_sub( x2, x1 ), &temp_e ) ); // 31-temp_e + 2*Qin -31 - Qin = Qin-temp_e temp32 = BASOP_Util_Add_Mant32Exp( y1, sub( 31, *Q_io ), temp_div, sub( 31, sub( *Q_io, temp_e ) ), &exp_out ); // Qin-temp_e *Q_io = sub( 31, exp_out ); move16(); return temp32; /*Q_io*/ temp32 = Mpy_32_32( L_sub( x, x1 ), L_sub( y2, y1 ) ); /* Qx */ temp_div = L_deposit_h( BASOP_Util_Divide3232_Scale( temp32, L_sub( x2, x1 ), &exp_out ) ); temp32 = BASOP_Util_Add_Mant32Exp( y1, 0, temp_div, exp_out, &exp_out ); temp32 = L_shl_sat( temp32, exp_out ); /* Q31 */ return temp32; } /*-------------------------------------------------------------------* Loading Loading
lib_com/ivas_prot.h +2 −2 Original line number Diff line number Diff line Loading @@ -3535,12 +3535,12 @@ void distribute_evenly_ism( ); int16_t ivas_qmetadata_encode_extended_gr_length( int16_t ivas_qmetadata_encode_extended_gr_length_fx( const uint16_t value, const uint16_t alphabet_size, const int16_t gr_param); void ivas_qmetadata_encode_extended_gr( void ivas_qmetadata_encode_extended_gr_fx( BSTR_ENC_HANDLE hMetaData, /* i/o: q_metadata handle */ const uint16_t value, /* i : value to be encoded */ const uint16_t alphabet_size, /* i : alphabet size */ Loading
lib_com/ivas_prot_fx.h +6 −7 Original line number Diff line number Diff line Loading @@ -4638,8 +4638,7 @@ Word32 lin_interp32_fx( const Word32 y1, /* i : source range interval: high end */ const Word32 x2, /* i : target range interval: low */ const Word32 y2, /* i : target range interval: high */ const Word16 flag_sat, /* i : flag to indicate whether to apply saturation */ Word16 *Q_io /*i/o : i/o Q factor of the output*/ const Word16 flag_sat /* i : flag to indicate whether to apply saturation */ ); void v_addc_fx( Loading
lib_com/ivas_qmetadata_com.c +2 −2 Original line number Diff line number Diff line Loading @@ -280,8 +280,8 @@ void ivas_qmetadata_close_fx( /*! r: codeword index */ Word16 masa_sq_fx( const Word32 in, /* i : input value */ const Word32 *threshold, /* i : partition */ const Word32 in, /* i : input value Q30*/ const Word32 *threshold, /* i : partition Q30*/ const Word16 cb_sz /* i : codebook size */ ) { Loading
lib_com/ivas_qspherical_com.c +1 −9 Original line number Diff line number Diff line Loading @@ -668,15 +668,7 @@ Word16 quantize_phi_chan_compand_fx( delta_phi = L_shr( delta_phi, sub( 9, tmp_e ) ); // Q22 // id_phi = (int16_t) round_f( ( phi / (float) delta_phi ) ); id_phi = BASOP_Util_Divide3232_Scale( phi, delta_phi, &tmp_e ); // Q15 IF( GE_16( abs_s( id_phi ), shl_sat( 1, sub( 15, tmp_e ) ) ) ) { id_phi = shr( id_phi, sub( 15, tmp_e ) ); // Q0 } ELSE { id_phi = 0; move16(); } id_phi = round_fx( L_shl( id_phi, add( tmp_e, 1 ) ) ); // Q0 IF( add( id_phi, shr( n, 1 ) ) < 0 ) { Loading
lib_com/ivas_tools.c +14 −17 Original line number Diff line number Diff line Loading @@ -834,21 +834,18 @@ Word32 logsumexp_fx( *---------------------------------------------------------------------*/ /*! r: mapped output value */ Word32 lin_interp32_fx( const Word32 x, /* i : the value to be mapped Qin*/ const Word32 x1, /* i : source range interval: low end Qin*/ const Word32 y1, /* i : source range interval: high end Qin*/ const Word32 x2, /* i : target range interval: low Qin*/ const Word32 y2, /* i : target range interval: high Qin*/ const Word16 flag_sat, /* i : flag to indicate whether to apply saturation Q0*/ Word16 *Q_io /*i/o : i/o Q factor of the output*/ const Word32 x, /* i : the value to be mapped Qx */ const Word32 x1, /* i : source range interval: low end Qx */ const Word32 y1, /* i : source range interval: high end Q31 */ const Word32 x2, /* i : target range interval: low Qx */ const Word32 y2, /* i : target range interval: high Q31 */ const Word16 flag_sat /* i : flag to indicate whether to apply saturation */ ) { Word32 temp32; Word32 temp_div; Word16 temp_e = 0; Word16 exp_out = 0; move16(); move16(); Word16 exp_out; IF( L_sub( x2, x1 ) == 0 ) { return y1; Loading @@ -865,12 +862,12 @@ Word32 lin_interp32_fx( } } temp32 = Mpy_32_32( L_sub( x, x1 ), L_sub( y2, y1 ) ); // Qin*2 -31 temp_div = L_deposit_h( BASOP_Util_Divide3232_Scale( temp32, L_sub( x2, x1 ), &temp_e ) ); // 31-temp_e + 2*Qin -31 - Qin = Qin-temp_e temp32 = BASOP_Util_Add_Mant32Exp( y1, sub( 31, *Q_io ), temp_div, sub( 31, sub( *Q_io, temp_e ) ), &exp_out ); // Qin-temp_e *Q_io = sub( 31, exp_out ); move16(); return temp32; /*Q_io*/ temp32 = Mpy_32_32( L_sub( x, x1 ), L_sub( y2, y1 ) ); /* Qx */ temp_div = L_deposit_h( BASOP_Util_Divide3232_Scale( temp32, L_sub( x2, x1 ), &exp_out ) ); temp32 = BASOP_Util_Add_Mant32Exp( y1, 0, temp_div, exp_out, &exp_out ); temp32 = L_shl_sat( temp32, exp_out ); /* Q31 */ return temp32; } /*-------------------------------------------------------------------* Loading