Loading lib_com/ACcontextMapping.c +6 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include "cnst.h" #include "prot.h" #include "wmc_auto.h" #include "prot_fx.h" /*-------------------------------------------------------------------* * get_next_coeff_mapped_ivas() Loading Loading @@ -66,7 +67,7 @@ int16_t get_next_coeff_mapped_ivas( return hm_cfg->indexBuffer[*idx]; } #else Word16 get_next_coeff_mapped_ivas( Word16 get_next_coeff_mapped_ivas_fx( Word16 ii[2], /* i/o: coefficient indexes Q0*/ Word32 *pp, /* o : peak(1)/hole(0) indicator Q0*/ Word16 *idx, /* o : index in unmapped domain Q0*/ Loading @@ -89,6 +90,7 @@ Word16 get_next_coeff_mapped_ivas( #endif #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * get_next_coeff_unmapped_ivas() * Loading @@ -106,7 +108,9 @@ int16_t get_next_coeff_unmapped_ivas( return *idx; } #endif #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * update_mixed_context_ivas() * Loading @@ -128,3 +132,4 @@ int32_t update_mixed_context_ivas( return ( ctx & 0xf ) * 16 + t + 13; } #endif lib_com/ari.c +2 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #include "wmc_auto.h" #ifndef IVAS_FLOAT_FIXED /*--------------------------------------------------------------- Ari 14 bits common routines -------------------------------------------------------------*/ Loading @@ -65,3 +66,4 @@ int32_t mul_sbc_14bits_ivas( /*function in line*/ } #endif lib_com/ari_hm.c +10 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ * *-------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void UnmapIndex_ivas( const int16_t PeriodicityIndex, const int16_t Bandwidth, Loading Loading @@ -99,6 +100,7 @@ void UnmapIndex_ivas( return; } #endif void UnmapIndex_fx( const Word16 PeriodicityIndex, /* Q0 */ Loading Loading @@ -167,6 +169,7 @@ void UnmapIndex_fx( } #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * ConfigureContextHm_ivas() * Loading Loading @@ -241,6 +244,7 @@ void ConfigureContextHm_ivas( return; } #endif /*-------------------------------------------------------------------* Loading @@ -249,6 +253,7 @@ void ConfigureContextHm_ivas( * *-------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED int16_t CountIndexBits_ivas( const int16_t Bandwidth, const int16_t PeriodicityIndex ) Loading @@ -261,6 +266,7 @@ int16_t CountIndexBits_ivas( return 8; } #endif Word16 CountIndexBits_fx( Word16 Bandwidth, /* Q0 */ Loading @@ -285,6 +291,7 @@ Word16 CountIndexBits_fx( #define WMC_TOOL_SKIP #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * tcx_hm_render_ivas() * Loading Loading @@ -343,6 +350,7 @@ Word16 tcx_hm_render_ivas( return 0; } #endif Word32 tcx_hm_render_fx( const Word32 lag, /* i: pitch lag Q0 */ Loading Loading @@ -400,6 +408,7 @@ Word32 tcx_hm_render_fx( return 0; } #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * tcx_hm_modify_envelope_ivas() * Loading Loading @@ -446,6 +455,7 @@ void tcx_hm_modify_envelope_ivas( return; } #endif void tcx_hm_modify_envelope_fx( const Word16 gain, /* i: HM gain Q11 */ Loading lib_com/arith_coder.c +8 −9 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ *-------------------------------------------------------*/ /*! r: Q15 */ Word16 expfp_evs( Word16 expfp_evs_fx( const Word16 x, /* i : mantissa Q15-e */ const Word16 x_e /* i : exponent Q0 */ ) Loading Loading @@ -117,7 +117,6 @@ Word16 expfp_evs( return round_fx( L_shl( y, 15 ) ); } /*-------------------------------------------------------* * powfp_odd2_evs() * Loading @@ -130,6 +129,7 @@ Word16 expfp_evs( * * NOTE: This function must be in sync with ari_decode_14bits_pow_ivas() */ #ifndef IVAS_FLOAT_FIXED void powfp_odd2_evs( const Word16 base, /* Q15 */ const Word16 exp, /* Q0 */ Loading Loading @@ -200,7 +200,6 @@ void powfp_odd2_evs( return; } /*------------------------------------------------------------------------ * Function: tcx_arith_scale_envelope_flt * Loading Loading @@ -503,7 +502,7 @@ void tcx_arith_scale_envelope_ivas( return; } #endif /*------------------------------------------------------------------------ * Function: tcx_arith_render_envelope_flt Loading @@ -518,7 +517,7 @@ void tcx_arith_scale_envelope_ivas( * and decoder remain synchronized. *-------------------------------------------------------------------------*/ void tcx_arith_render_envelope_ivas( void tcx_arith_render_envelope_ivas_fx( const Word16 A_ind[], /* i : LPC coefficients of signal envelope Q12*/ const Word16 L_frame, /* i : number of spectral lines Q0*/ const Word16 L_spec, /* i : length of the coded spectrum Q0*/ Loading @@ -535,12 +534,12 @@ void tcx_arith_render_envelope_ivas( /* Compute perceptual LPC envelope, transform it into freq.-domain gains */ basop_weight_a( A_ind, tmpA, gamma_w ); basop_lpc2mdct( tmpA, M, NULL, NULL, gainlpc, gainlpc_e ); basop_lpc2mdct_fx( tmpA, M, NULL, NULL, gainlpc, gainlpc_e ); /* Add pre-emphasis tilt to LPC envelope, transform LPC into MDCT gains */ basop_weight_a_inv( A_ind, signal_env, gamma_uw ); basop_E_LPC_a_add_tilt( signal_env, tmpA, preemph_fac ); basop_lpc2mdct( tmpA, M + 1, signal_env, signal_env_e, NULL, NULL ); basop_lpc2mdct_fx( tmpA, M + 1, signal_env, signal_env_e, NULL, NULL ); /* Compute weighted signal envelope in perceptual domain */ FOR( k = 0; k < FDNS_NPTS; k++ ) Loading @@ -558,10 +557,10 @@ void tcx_arith_render_envelope_ivas( move32(); } basop_PsychAdaptLowFreqDeemph( env, gainlpc, gainlpc_e, NULL ); basop_PsychAdaptLowFreqDeemph_fx( env, gainlpc, gainlpc_e, NULL ); /* Scale from FDNS_NPTS to L_frame and multiply LFE gains */ basop_mdct_noiseShaping_interp( env, L_frame, signal_env, signal_env_e ); basop_mdct_noiseShaping_interp_fx( env, L_frame, signal_env, signal_env_e ); FOR( k = L_frame; k < L_spec; ++k ) { Loading lib_com/basop_proto_func.h +3 −3 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ void basop_E_LPC_f_lsp_a_conversion( ); /* tcx_utils.c */ void basop_lpc2mdct( void basop_lpc2mdct_fx( Word16 *lpcCoeffs, /* Q12 */ Word16 lpcOrder, /* Q0 */ Word16 *mdct_gains, /* Q12 */ Loading @@ -95,13 +95,13 @@ void basop_lpc2mdct( Word16 *mdct_inv_gains, /* Q12 */ Word16 *mdct_inv_gains_exp ); void basop_PsychAdaptLowFreqDeemph( void basop_PsychAdaptLowFreqDeemph_fx( Word32 x[], /* Q16 */ const Word16 lpcGains[], /* exp(lpcGains_e) */ const Word16 lpcGains_e[], Word16 lf_deemph_factors[] /* Qx */ ); void basop_mdct_noiseShaping_interp( void basop_mdct_noiseShaping_interp_fx( Word32 x[], /* Q16 */ Word16 lg, /* Q0 */ Word16 gains[], /* exp(gain_exp) */ Loading Loading
lib_com/ACcontextMapping.c +6 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include "cnst.h" #include "prot.h" #include "wmc_auto.h" #include "prot_fx.h" /*-------------------------------------------------------------------* * get_next_coeff_mapped_ivas() Loading Loading @@ -66,7 +67,7 @@ int16_t get_next_coeff_mapped_ivas( return hm_cfg->indexBuffer[*idx]; } #else Word16 get_next_coeff_mapped_ivas( Word16 get_next_coeff_mapped_ivas_fx( Word16 ii[2], /* i/o: coefficient indexes Q0*/ Word32 *pp, /* o : peak(1)/hole(0) indicator Q0*/ Word16 *idx, /* o : index in unmapped domain Q0*/ Loading @@ -89,6 +90,7 @@ Word16 get_next_coeff_mapped_ivas( #endif #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * get_next_coeff_unmapped_ivas() * Loading @@ -106,7 +108,9 @@ int16_t get_next_coeff_unmapped_ivas( return *idx; } #endif #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * update_mixed_context_ivas() * Loading @@ -128,3 +132,4 @@ int32_t update_mixed_context_ivas( return ( ctx & 0xf ) * 16 + t + 13; } #endif
lib_com/ari.c +2 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #include "wmc_auto.h" #ifndef IVAS_FLOAT_FIXED /*--------------------------------------------------------------- Ari 14 bits common routines -------------------------------------------------------------*/ Loading @@ -65,3 +66,4 @@ int32_t mul_sbc_14bits_ivas( /*function in line*/ } #endif
lib_com/ari_hm.c +10 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ * *-------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void UnmapIndex_ivas( const int16_t PeriodicityIndex, const int16_t Bandwidth, Loading Loading @@ -99,6 +100,7 @@ void UnmapIndex_ivas( return; } #endif void UnmapIndex_fx( const Word16 PeriodicityIndex, /* Q0 */ Loading Loading @@ -167,6 +169,7 @@ void UnmapIndex_fx( } #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * ConfigureContextHm_ivas() * Loading Loading @@ -241,6 +244,7 @@ void ConfigureContextHm_ivas( return; } #endif /*-------------------------------------------------------------------* Loading @@ -249,6 +253,7 @@ void ConfigureContextHm_ivas( * *-------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED int16_t CountIndexBits_ivas( const int16_t Bandwidth, const int16_t PeriodicityIndex ) Loading @@ -261,6 +266,7 @@ int16_t CountIndexBits_ivas( return 8; } #endif Word16 CountIndexBits_fx( Word16 Bandwidth, /* Q0 */ Loading @@ -285,6 +291,7 @@ Word16 CountIndexBits_fx( #define WMC_TOOL_SKIP #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * tcx_hm_render_ivas() * Loading Loading @@ -343,6 +350,7 @@ Word16 tcx_hm_render_ivas( return 0; } #endif Word32 tcx_hm_render_fx( const Word32 lag, /* i: pitch lag Q0 */ Loading Loading @@ -400,6 +408,7 @@ Word32 tcx_hm_render_fx( return 0; } #ifndef IVAS_FLOAT_FIXED /*-------------------------------------------------------------------* * tcx_hm_modify_envelope_ivas() * Loading Loading @@ -446,6 +455,7 @@ void tcx_hm_modify_envelope_ivas( return; } #endif void tcx_hm_modify_envelope_fx( const Word16 gain, /* i: HM gain Q11 */ Loading
lib_com/arith_coder.c +8 −9 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ *-------------------------------------------------------*/ /*! r: Q15 */ Word16 expfp_evs( Word16 expfp_evs_fx( const Word16 x, /* i : mantissa Q15-e */ const Word16 x_e /* i : exponent Q0 */ ) Loading Loading @@ -117,7 +117,6 @@ Word16 expfp_evs( return round_fx( L_shl( y, 15 ) ); } /*-------------------------------------------------------* * powfp_odd2_evs() * Loading @@ -130,6 +129,7 @@ Word16 expfp_evs( * * NOTE: This function must be in sync with ari_decode_14bits_pow_ivas() */ #ifndef IVAS_FLOAT_FIXED void powfp_odd2_evs( const Word16 base, /* Q15 */ const Word16 exp, /* Q0 */ Loading Loading @@ -200,7 +200,6 @@ void powfp_odd2_evs( return; } /*------------------------------------------------------------------------ * Function: tcx_arith_scale_envelope_flt * Loading Loading @@ -503,7 +502,7 @@ void tcx_arith_scale_envelope_ivas( return; } #endif /*------------------------------------------------------------------------ * Function: tcx_arith_render_envelope_flt Loading @@ -518,7 +517,7 @@ void tcx_arith_scale_envelope_ivas( * and decoder remain synchronized. *-------------------------------------------------------------------------*/ void tcx_arith_render_envelope_ivas( void tcx_arith_render_envelope_ivas_fx( const Word16 A_ind[], /* i : LPC coefficients of signal envelope Q12*/ const Word16 L_frame, /* i : number of spectral lines Q0*/ const Word16 L_spec, /* i : length of the coded spectrum Q0*/ Loading @@ -535,12 +534,12 @@ void tcx_arith_render_envelope_ivas( /* Compute perceptual LPC envelope, transform it into freq.-domain gains */ basop_weight_a( A_ind, tmpA, gamma_w ); basop_lpc2mdct( tmpA, M, NULL, NULL, gainlpc, gainlpc_e ); basop_lpc2mdct_fx( tmpA, M, NULL, NULL, gainlpc, gainlpc_e ); /* Add pre-emphasis tilt to LPC envelope, transform LPC into MDCT gains */ basop_weight_a_inv( A_ind, signal_env, gamma_uw ); basop_E_LPC_a_add_tilt( signal_env, tmpA, preemph_fac ); basop_lpc2mdct( tmpA, M + 1, signal_env, signal_env_e, NULL, NULL ); basop_lpc2mdct_fx( tmpA, M + 1, signal_env, signal_env_e, NULL, NULL ); /* Compute weighted signal envelope in perceptual domain */ FOR( k = 0; k < FDNS_NPTS; k++ ) Loading @@ -558,10 +557,10 @@ void tcx_arith_render_envelope_ivas( move32(); } basop_PsychAdaptLowFreqDeemph( env, gainlpc, gainlpc_e, NULL ); basop_PsychAdaptLowFreqDeemph_fx( env, gainlpc, gainlpc_e, NULL ); /* Scale from FDNS_NPTS to L_frame and multiply LFE gains */ basop_mdct_noiseShaping_interp( env, L_frame, signal_env, signal_env_e ); basop_mdct_noiseShaping_interp_fx( env, L_frame, signal_env, signal_env_e ); FOR( k = L_frame; k < L_spec; ++k ) { Loading
lib_com/basop_proto_func.h +3 −3 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ void basop_E_LPC_f_lsp_a_conversion( ); /* tcx_utils.c */ void basop_lpc2mdct( void basop_lpc2mdct_fx( Word16 *lpcCoeffs, /* Q12 */ Word16 lpcOrder, /* Q0 */ Word16 *mdct_gains, /* Q12 */ Loading @@ -95,13 +95,13 @@ void basop_lpc2mdct( Word16 *mdct_inv_gains, /* Q12 */ Word16 *mdct_inv_gains_exp ); void basop_PsychAdaptLowFreqDeemph( void basop_PsychAdaptLowFreqDeemph_fx( Word32 x[], /* Q16 */ const Word16 lpcGains[], /* exp(lpcGains_e) */ const Word16 lpcGains_e[], Word16 lf_deemph_factors[] /* Qx */ ); void basop_mdct_noiseShaping_interp( void basop_mdct_noiseShaping_interp_fx( Word32 x[], /* Q16 */ Word16 lg, /* Q0 */ Word16 gains[], /* exp(gain_exp) */ Loading