diff --git a/lib_dec/ivas_sba_dirac_stereo_dec_fx.c b/lib_dec/ivas_sba_dirac_stereo_dec_fx.c index 12a34e17089becdd980c9a5fa0f77a5aa008dd4e..150d81b13d68cd228ffcd96b71dcc940e7f2ab13 100644 --- a/lib_dec/ivas_sba_dirac_stereo_dec_fx.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec_fx.c @@ -277,6 +277,8 @@ static Word16 get_panning_tangent_gain( lim_r = sub( idx, 1 ); /*Q0*/ } } + assert( "should not be reached, added to avoid issues with WMC tool instrumentation" ); + return 0; /* should not be reached, added to avoid issues with WMC tool instrumentation */ } static Word16 get_panning( diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index e182a471bd6f147fec12efa0a326a6da1c296ee5..9753893e2cd84e406a23e383f2a8fe70e69232d4 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -4277,6 +4277,9 @@ static void ivas_destroy_handle_isar( free( ( *hSplitBinRend )->hCldfbDataOut ); ( *hSplitBinRend )->hCldfbDataOut = NULL; } + + free( *hSplitBinRend ); + *hSplitBinRend = NULL; } return; diff --git a/lib_lc3plus/basop_util_lc3plus.h b/lib_lc3plus/basop_util_lc3plus.h index f22d531cf5c25ad1be74253c185c61c1d31f57e3..d9abc7f5d92020d2ec18e69a41e7e63484080113 100644 --- a/lib_lc3plus/basop_util_lc3plus.h +++ b/lib_lc3plus/basop_util_lc3plus.h @@ -316,14 +316,9 @@ void BASOP_cfft_lc3plus(Word32 *re, Word32 *im, Word16 sizeOfFft, Word16 s, Word void BASOP_rfftN(Word32 *re, Word16 sizeOfFft, Word16 *scale, Word8 *scratchBuffer); void BASOP_irfftN(Word32 *re, Word16 sizeOfFft, Word16 *scale, Word8 *scratchBuffer); -#if WMOPS_LC3PLUS -extern BASIC_OP multiCounter[MAXCOUNTERS]; -extern int currCounter; -#endif - static __inline void basop_memcpy(void *dst, const void *src, size_t n) { -#if WMOPS_LC3PLUS +#ifdef WMOPS multiCounter[currCounter].move16 += (UWord32)n / 2; #endif /* check for overlapping memory */ @@ -333,7 +328,7 @@ static __inline void basop_memcpy(void *dst, const void *src, size_t n) static __inline void basop_memmove(void *dst, const void *src, size_t n) { -#if WMOPS_LC3PLUS +#ifdef WMOPS multiCounter[currCounter].move16 += (UWord32)n / 2; #endif memmove(dst, src, n); @@ -341,7 +336,7 @@ static __inline void basop_memmove(void *dst, const void *src, size_t n) static __inline void basop_memset(void *dst, int val, size_t n) { -#if WMOPS_LC3PLUS +#ifdef WMOPS multiCounter[currCounter].move16 += (UWord32)n / 2; #endif memset(dst, val, n); diff --git a/lib_lc3plus/constants.c b/lib_lc3plus/constants.c index c13c4e49eb51759a9e74157cfd59d06e3c99cd96..c02cf5c6918873017de8c0d0fe4fd053a02671d5 100644 --- a/lib_lc3plus/constants.c +++ b/lib_lc3plus/constants.c @@ -1439,7 +1439,7 @@ RAM_ALIGN const Word16 PhECU_whr16ms_WB_Q15[Lprot_hamm_len2_16k] = {/* From matl #define PhECU_whr16ms_WB_Q15 NULL #endif #ifdef SUBSET_SSWB -RAM_ALIGN const Word16 PhECU_whr16ms_sWB_Q15[Lprot_hamm_len2_24k] = +RAM_ALIGN const Word16 PhECU_whr16ms_ssWB_Q15[Lprot_hamm_len2_24k] = {/* From matlab */ 2621, 2636, 2679, 2750, 2850, 2979, 3135, 3319, 3530, 3769, 4034, 4325, 4641, 4982, 5347, 5736, 6148, 6582, 7036, 7511, 8006, 8519, 9049, 9596, 10158, 10735, 11324, 11926, 12539, 13162, @@ -1560,7 +1560,7 @@ RAM_ALIGN const Word16 PhECU_preTdaFx16ms_WB_Q14[256] = { #define PhECU_preTdaFx16ms_WB_Q14 NULL #endif #ifdef SUBSET_SSWB -RAM_ALIGN const Word16 PhECU_preTdaFx16ms_sWB_Q14[384] = { +RAM_ALIGN const Word16 PhECU_preTdaFx16ms_ssWB_Q14[384] = { -22499, -22471, -22152, -21551, -20715, -19688, -18527, -17277, -15982, -14679, -13393, -12145, -10954, -9826, -8760, -7763, -6831, -5958, -5149, -4394, -3688, -3029, -2410, -1831, -1285, -769, -279, 186, 630, 1055, 1462, 1856, 2236, 2606, 2966, 3317, 3662, 3999, 4330, 4658, 4981, 5301, @@ -1699,7 +1699,7 @@ RAM_ALIGN const Word16 *const PhECU_wins[5][3] = { /* 3ms hamm(left part) , 16ms(center IWHR(periodic)*MDCT-anaQ14) , 2ms(initial MDCT-ana in Q14) */ /*8 kHz*/ {PhECU_whr16ms_NB_Q15, PhECU_preTdaFx16ms_NB_Q14, PhECU_preTdaFx16ms_128_pre_Q14}, /*16 kHz*/ {PhECU_whr16ms_WB_Q15, PhECU_preTdaFx16ms_WB_Q14, PhECU_preTdaFx16ms_256_pre_Q14}, - /*24 kHz*/ {PhECU_whr16ms_sWB_Q15, PhECU_preTdaFx16ms_sWB_Q14, PhECU_preTdaFx16ms_384_pre_Q14}, + /*24 kHz*/ {PhECU_whr16ms_ssWB_Q15, PhECU_preTdaFx16ms_ssWB_Q14, PhECU_preTdaFx16ms_384_pre_Q14}, /*32 kHz*/ {PhECU_whr16ms_SWB_Q15, PhECU_preTdaFx16ms_SWB_Q14, PhECU_preTdaFx16ms_512_pre_Q14}, /*48 kHz*/ {PhECU_whr16ms_FB_Q15, PhECU_preTdaFx16ms_FB_Q14, PhECU_preTdaFx16ms_768_pre_Q14}}; diff --git a/lib_lc3plus/dec_lc3.c b/lib_lc3plus/dec_lc3.c index 59a0618627ff1f6aed45750444313aa4c9e7a1ed..1b23927c6d3fa5419b1f1e8d9814cb9a936cdf4a 100644 --- a/lib_lc3plus/dec_lc3.c +++ b/lib_lc3plus/dec_lc3.c @@ -148,8 +148,8 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s memset(q_d_fx, 0, decoder->frame_length * sizeof(*q_d_fx)); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Decoder"); +#ifdef WMOPS + push_wmops("Decoder"); #endif #ifdef ENABLE_RFRAME @@ -164,19 +164,19 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s if (bfi != 1) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("Dec(bfi=0)"); +#ifdef WMOPS + push_wmops("Dec(bfi=0)"); #endif } else { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("Dec(bfi=1)"); +#ifdef WMOPS + push_wmops("Dec(bfi=1)"); #endif } -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Entropy dec"); +#ifdef WMOPS + push_wmops("Entropy dec"); #endif IF (sub(bfi, 1) != 0) { @@ -186,12 +186,12 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s BW_cutoff_idx_nf = BW_cutoff_idx; move16(); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); /* Entropy dec */ +#ifdef WMOPS + pop_wmops(); /* Entropy dec */ #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Ari dec"); +#ifdef WMOPS + push_wmops("Ari dec"); #endif IF (sub(bfi, 1) != 0) { @@ -243,12 +243,12 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s processAriDecoderScaling_fx(sqQdec, decoder->yLen, q_d_fx, &q_fx_exp); } } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); /* Ari dec */ +#ifdef WMOPS + pop_wmops(); /* Ari dec */ #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("SnsQuantScfDec"); +#ifdef WMOPS + push_wmops("SnsQuantScfDec"); #endif IF (sub(bfi, 1) != 0) { @@ -260,24 +260,24 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s processSnsQuantizeScfDecoder_fx(L_scf_idx, scf_q, currentScratch); #endif } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("PLC::ComputeStabFac"); +#ifdef WMOPS + push_wmops("PLC::ComputeStabFac"); #endif if (h_DecSetup->plcAd) { processPLCcomputeStabFac_main(scf_q, h_DecSetup->plcAd->old_scf_q, h_DecSetup->plcAd->old_old_scf_q, bfi, h_DecSetup->prev_bfi, h_DecSetup->prev_prev_bfi, &h_DecSetup->plcAd->stab_fac); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Partial Concealment"); +#ifdef WMOPS + push_wmops("Partial Concealment"); #endif IF (sub(bfi, 1) != 0) { @@ -295,26 +295,26 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s &h_DecSetup->prev_gg_e, &BW_cutoff_idx_nf, &h_DecSetup->prev_BW_cutoff_idx_nf, fac_ns_idx, &h_DecSetup->prev_fac_ns_fx, &h_DecSetup->pc_nbLostFramesInRow); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif IF (sub(bfi, 1) != 0) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Residual dec"); +#ifdef WMOPS + push_wmops("Residual dec"); #endif processResidualDecoding_fx(q_d_fx, q_fx_exp, decoder->yLen, resBitBuf, fill_bits #ifdef ENABLE_HR_MODE , decoder->hrmode #endif ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Noisefill"); +#ifdef WMOPS + push_wmops("Noisefill"); #endif /* currentScratch Size = 2 * MAX_LEN bytes */ IF (zero_frame == 0) @@ -326,20 +326,20 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s #endif ); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("applyGlobalGain"); +#ifdef WMOPS + push_wmops("applyGlobalGain"); #endif processApplyGlobalGain_fx(q_d_fx, &q_fx_exp, decoder->yLen, gg_idx, h_DecSetup->quantizedGainOff); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Tns_dec"); +#ifdef WMOPS + push_wmops("Tns_dec"); #endif /* currentScratch Size = 48 bytes */ processTnsDecoder_fx(indexes, q_d_fx, decoder->yLen, tns_order, &q_fx_exp, BW_cutoff_idx, decoder->frame_dms, @@ -348,46 +348,46 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s , decoder->hrmode #endif ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef ENABLE_HR_MODE -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("SnsInterpScfDec"); +#ifdef WMOPS + push_wmops("SnsInterpScfDec"); #endif processSnsInterpolateScf_fx(scf_q_ip, int_scf_fx_ip, int_scf_fx_exp, 0, decoder->bands_number, currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Mdct shaping_dec"); +#ifdef WMOPS + push_wmops("Mdct shaping_dec"); #endif processScfScaling(int_scf_fx_exp, decoder->bands_number, &q_fx_exp); processMdctShaping_fx(q_d_fx, int_scf_fx_ip, int_scf_fx_exp, decoder->bands_offset, decoder->bands_number); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #else -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("SnsInterpScfDec"); +#ifdef WMOPS + push_wmops("SnsInterpScfDec"); #endif /* currentScratch Size = 128 bytes */ processSnsInterpolateScf_fx(scf_q, int_scf_fx, int_scf_fx_exp, 0, decoder->bands_number, currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Mdct shaping_dec"); +#ifdef WMOPS + push_wmops("Mdct shaping_dec"); #endif processScfScaling(int_scf_fx_exp, decoder->bands_number, &q_fx_exp); processMdctShaping_fx(q_d_fx, int_scf_fx, int_scf_fx_exp, decoder->bands_offset, decoder->bands_number); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif /* end int_scf_fx */ #endif /* ENABLE_HR_MODE */ @@ -406,8 +406,8 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s } #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("PLC::Main"); +#ifdef WMOPS + push_wmops("PLC::Main"); #endif /* currentScratch Size = 2 * MAX_LGW + 8 * MAX_LPROT + 12 * MAX_L_FRAME */ processPLCmain_fx(decoder->plcMeth, &h_DecSetup->concealMethod, &h_DecSetup->nbLostFramesInRow, bfi, @@ -432,8 +432,8 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s , decoder->alpha_type_2_table #endif ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef ENABLE_HR_MODE @@ -446,8 +446,8 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s } #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("PLC/PC::DampingScrambling"); +#ifdef WMOPS + push_wmops("PLC/PC::DampingScrambling"); #endif if (h_DecSetup->plcAd) { @@ -462,12 +462,12 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s #endif ); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Imdct"); +#ifdef WMOPS + push_wmops("Imdct"); #endif /* currentScratch Size = 4 * MAX_LEN */ ProcessingIMDCT(q_d_fx, &q_fx_exp, decoder->W_fx, h_DecSetup->stDec_ola_mem_fx, &h_DecSetup->stDec_ola_mem_fx_exp, @@ -499,12 +499,12 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s } #endif /* ENABLE_HR_MODE */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("PLC::Update"); +#ifdef WMOPS + push_wmops("PLC::Update"); #endif processPLCupdate_fx(h_DecSetup->plcAd, x_fx, q_fx_exp, h_DecSetup->concealMethod, decoder->frame_length, @@ -514,12 +514,12 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s , decoder->hrmode #endif ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("LtpfDec"); +#ifdef WMOPS + push_wmops("LtpfDec"); #endif /* currentScratch Size = 0.5 * MAX_LEN + 20 bytes */ process_ltpf_decoder_fx(&q_fx_exp, decoder->frame_length, decoder->ltpf_mem_x_len, decoder->fs_idx, @@ -533,8 +533,8 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s &h_DecSetup->rel_pitch_change, decoder->hrmode, decoder->frame_dms, #endif currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef ENABLE_HR_MODE @@ -547,8 +547,8 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s } #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Output scaling"); +#ifdef WMOPS + push_wmops("Output scaling"); #endif { scale = sub(sub(31 + 16, bits_per_sample), q_fx_exp); @@ -579,16 +579,16 @@ static int Dec_LC3PLUS_Channel(LC3PLUS_Dec *decoder, int channel, int bits_per_s } } } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); /* Output scaling */ +#ifdef WMOPS + pop_wmops(); /* Output scaling */ #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); /* Decoder */ +#ifdef WMOPS + pop_wmops(); /* Decoder */ #endif @@ -623,8 +623,8 @@ LC3PLUS_Error Dec_LC3PLUS(LC3PLUS_Dec *decoder, UWord8 *input, int num_bytes, vo { fec_num_bytes = num_bytes; -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("fec_dec"); +#ifdef WMOPS + push_wmops("fec_dec"); #endif decoder->error_report = @@ -632,8 +632,8 @@ LC3PLUS_Error Dec_LC3PLUS(LC3PLUS_Dec *decoder, UWord8 *input, int num_bytes, vo &decoder->n_pccw, &bfi, &decoder->be_bp_left, &decoder->be_bp_right, &decoder->n_pc, &decoder->m_fec, scratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif for (ch = 0; ch < decoder->channels; ch++) @@ -668,8 +668,8 @@ LC3PLUS_Error Dec_LC3PLUS(LC3PLUS_Dec *decoder, UWord8 *input, int num_bytes, vo { fec_num_bytes = num_bytes / decoder->channels + (ch < (num_bytes % decoder->channels)); -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("fec_dec"); +#ifdef WMOPS + push_wmops("fec_dec"); #endif channel_bfi = bfi; @@ -679,8 +679,8 @@ LC3PLUS_Error Dec_LC3PLUS(LC3PLUS_Dec *decoder, UWord8 *input, int num_bytes, vo &decoder->n_pccw, &channel_bfi, &decoder->be_bp_left, &decoder->be_bp_right, &decoder->n_pc, &decoder->m_fec, scratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif decoder->epmr = MIN(decoder->epmr, channel_epmr); diff --git a/lib_lc3plus/enc_lc3.c b/lib_lc3plus/enc_lc3.c index ada4bf87e6b4fa8c80e5f29d742128a768a7cb7e..f2276a2ed91c6f42f18fa9704e74ff0d0e421ef1 100644 --- a/lib_lc3plus/enc_lc3.c +++ b/lib_lc3plus/enc_lc3.c @@ -61,8 +61,8 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ # endif #endif /* CR8_F_ADAPT_MDCT_DCT_PRECISION */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Encoder"); +#ifdef WMOPS + push_wmops("Encoder"); #endif /* BUFFER INITIALISATION. Some buffers may overlap since they are not used in the whole encoding process */ @@ -134,16 +134,16 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ /* Scale 24-bit input data */ IF (sub(bits_per_sample, 24) == 0) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Scale_signal24"); +#ifdef WMOPS + push_wmops("Scale_signal24"); #endif scale_signal24_fx(s_in, s_in_scaled, &h_EncSetup->x_exp, h_EncSetup->stEnc_mdct_mem, encoder->stEnc_mdct_mem_len, h_EncSetup->r12k8_mem_in, encoder->r12k8_mem_in_len, h_EncSetup->r12k8_mem_50, h_EncSetup->r12k8_mem_out, encoder->r12k8_mem_out_len, h_EncSetup->mdct_mem32, encoder->frame_length, h_EncSetup->resamp_mem32, h_EncSetup->olpa_mem_s12k8, &h_EncSetup->resamp_exp); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } ELSE @@ -161,8 +161,8 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ #endif } -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Mdct"); +#ifdef WMOPS + push_wmops("Mdct"); #endif /* currentScratch Size = 4 * MAX_LEN */ @@ -174,13 +174,13 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ #endif encoder->W_fx, encoder->W_size, h_EncSetup->stEnc_mdct_mem, encoder->stEnc_mdct_mem_len, d_fx, &d_fx_exp, currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif /* begin s_12k8 */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Resamp12k8"); +#ifdef WMOPS + push_wmops("Resamp12k8"); #endif /* currentScratch Size = 2.25 * MAX_LEN bytes */ #ifdef ENABLE_HR_MODE @@ -198,12 +198,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ , bits_per_sample ); #endif /* ENABLE_HR_MODE */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Olpa"); +#ifdef WMOPS + push_wmops("Olpa"); #endif /* currentScratch Size = 392 bytes */ process_olpa_fx(&h_EncSetup->olpa_mem_s6k4_exp, h_EncSetup->olpa_mem_s12k8, h_EncSetup->olpa_mem_s6k4, &pitch, @@ -212,12 +212,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ &h_EncSetup->pitch_flag, #endif h_EncSetup->resamp_exp, encoder->frame_dms, currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("LtpfEnc"); +#ifdef WMOPS + push_wmops("LtpfEnc"); #endif /* currentScratch Size = 512 bytes */ process_ltpf_coder_fx(<pf_bits, pitch, h_EncSetup->ltpf_enable, &h_EncSetup->ltpf_mem_in_exp, @@ -229,13 +229,13 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ ,encoder->hrmode #endif ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif /* end s_12k8 */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("AttackDetector"); +#ifdef WMOPS + push_wmops("AttackDetector"); #endif /* currentScratch Size = ??? bytes */ #ifdef ENABLE_HR_MODE @@ -243,13 +243,13 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ #else attack_detector_fx(encoder, h_EncSetup, s_in_scaled, sub(h_EncSetup->x_exp, 15), currentScratch); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif /* begin ener_fx */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("PerBandEnergy"); +#ifdef WMOPS + push_wmops("PerBandEnergy"); #endif /* currentScratch Size = 160 bytes */ processPerBandEnergy_fx(ener_fx, &ener_fx_exp, d_fx, d_fx_exp, encoder->bands_offset, encoder->fs_idx, @@ -258,12 +258,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ , encoder->hrmode #endif ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Near Nyquist Detector"); +#ifdef WMOPS + push_wmops("Near Nyquist Detector"); #endif /* Near Nyquist Detector */ processNearNyquistdetector_fx(&encoder->near_nyquist_flag, encoder->fs_idx, encoder->near_nyquist_index, @@ -283,11 +283,11 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ h_EncSetup->ltpf_mem_ltpf_on = 0; move16(); ltpf_idx[1] = 0; move16(); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("BW Cutoff-Detection"); +#ifdef WMOPS + push_wmops("BW Cutoff-Detection"); #endif IF (h_EncSetup->lfe == 0) { @@ -311,12 +311,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ { BW_cutoff_idx = 0; } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("SnsCompScf"); +#ifdef WMOPS + push_wmops("SnsCompScf"); #endif @@ -324,51 +324,51 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ processSnsComputeScf_fx(ener_fx, ener_fx_exp, encoder->fs_idx, encoder->bands_number, scf, h_EncSetup->attdec_detected, encoder->attdec_damping, currentScratch, encoder->sns_damping ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("SnsQuantScfEnc"); +#ifdef WMOPS + push_wmops("SnsQuantScfEnc"); #endif /* currentScratch Size = 500 bytes */ processSnsQuantizeScfEncoder_fx(scf, L_scf_idx, scf_q, currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("SnsInterpScfEnc"); +#ifdef WMOPS + push_wmops("SnsInterpScfEnc"); #endif /* currentScratch Size = 128 bytes */ processSnsInterpolateScf_fx(scf_q, int_scf_fx, int_scf_fx_exp, 1, encoder->bands_number, currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Mdct shaping_enc"); +#ifdef WMOPS + push_wmops("Mdct shaping_enc"); #endif processMdctShaping_fx(d_fx, int_scf_fx, int_scf_fx_exp, encoder->bands_offset, encoder->bands_number); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif /* end int_scf_fx_exp */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("BandwidthControl_enc"); +#ifdef WMOPS + push_wmops("BandwidthControl_enc"); #endif if (encoder->bandwidth < L_shr_pos(encoder->fs, 1)) { process_cutoff_bandwidth(d_fx, encoder->yLen, encoder->bw_ctrl_cutoff_bin); BW_cutoff_idx = s_min(BW_cutoff_idx, encoder->bw_index); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Tns_enc"); +#ifdef WMOPS + push_wmops("Tns_enc"); #endif /* currentScratch Size = 2 * MAX_LEN + 220 */ @@ -392,12 +392,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ h_EncSetup->tns_bits = tns_numfilters; move16(); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Est. Global Gain"); +#ifdef WMOPS + push_wmops("Est. Global Gain"); #endif /* currentScratch Size = 4 * MAX_LEN bytes */ h_EncSetup->targetBitsQuant = sub(h_EncSetup->targetBitsInit, add(h_EncSetup->tns_bits, ltpf_bits)); @@ -430,13 +430,13 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ , encoder->hrmode, h_EncSetup->regBits, encoder->frame_dms #endif ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif /* begin q_d_fx16 */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Quant. 1"); +#ifdef WMOPS + push_wmops("Quant. 1"); #endif #ifdef ENABLE_HR_MODE processQuantizeSpec_fx(d_fx, d_fx_exp, gain32, gain_e, q_d_fx24, encoder->yLen, h_EncSetup->targetBitsQuant, @@ -448,12 +448,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ h_EncSetup->targetBitsAri, &h_EncSetup->mem_specBits, &nBits, encoder->fs_idx, &lastnz, codingdata, &lsbMode, -1); #endif /* ENABLE_HR_MODE */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Adj. Global Gain"); +#ifdef WMOPS + push_wmops("Adj. Global Gain"); #endif #ifdef ENABLE_HR_MODE //gain32 = L_shl_pos((Word32)gain, 16); @@ -466,12 +466,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ processAdjustGlobalGain_fx(&quantizedGain, quantizedGainMin, h_EncSetup->quantizedGainOff, &gain, &gain_e, h_EncSetup->targetBitsQuant, h_EncSetup->mem_specBits, &gainChange, encoder->fs_idx); #endif /* ENABLE_HR_MODE */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Quant. 2"); +#ifdef WMOPS + push_wmops("Quant. 2"); #endif IF (sub(gainChange, 1) == 0) { @@ -485,12 +485,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ 0); #endif /* ENABLE_HR_MODE */ } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Res. Cod."); +#ifdef WMOPS + push_wmops("Res. Cod."); #endif IF (lsbMode == 0) { @@ -516,12 +516,12 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ numResBits = 0; move16(); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Noise fac"); +#ifdef WMOPS + push_wmops("Noise fac"); #endif /* currentScratch Size = 2 * MAX_LEN bytes */ IF (h_EncSetup->lfe == 0) @@ -543,22 +543,22 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ fac_ns_idx = 7; move16(); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Entropy cod"); +#ifdef WMOPS + push_wmops("Entropy cod"); #endif processEncoderEntropy(bytes, &bp_side, &mask_side, h_EncSetup->targetBitsAri, h_EncSetup->targetBytes, encoder->yLen, encoder->BW_cutoff_bits, tns_numfilters, lsbMode, lastnz, tns_order, fac_ns_idx, quantizedGain, BW_cutoff_idx, ltpf_idx, L_scf_idx, bfi_ext, encoder->fs_idx); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Ari cod"); +#ifdef WMOPS + push_wmops("Ari cod"); #endif processAriEncoder_fx(bytes, bp_side, mask_side, h_EncSetup->targetBitsAri, #ifdef ENABLE_HR_MODE @@ -568,18 +568,18 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ #endif tns_order, tns_numfilters, indexes, lastnz, codingdata, resBits, numResBits, lsbMode, h_EncSetup->enable_lpc_weighting, currentScratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Reorder Bitstream Enc"); +#ifdef WMOPS + push_wmops("Reorder Bitstream Enc"); #endif test(); IF (encoder->combined_channel_coding == 0 && h_EncSetup->n_pc > 0) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("Reorder Ari dec"); +#ifdef WMOPS + push_wmops("Reorder Ari dec"); #endif #ifdef ENABLE_HR_MODE @@ -606,18 +606,18 @@ static void Enc_LC3PLUS_Channel(LC3PLUS_Enc *encoder, int channel, int bits_per_ ); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); /* Ari dec */ +#ifdef WMOPS + pop_wmops(); /* Ari dec */ #endif processReorderBitstream_fx(bytes, h_EncSetup->n_pccw, h_EncSetup->n_pc, b_left, currentScratch); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif /* end q_d_fx16 */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif Dyn_Mem_Deluxe_Out(); @@ -638,15 +638,15 @@ int Enc_LC3PLUS(LC3PLUS_Enc *encoder, void **input, int bits_per_sample, UWord8 if (encoder->epmode && encoder->combined_channel_coding == 0) { output_size2 = totalBytes / encoder->channels + (ch < (totalBytes % encoder->channels)); -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("fec_enc"); +#ifdef WMOPS + push_wmops("fec_enc"); #endif fec_encoder(encoder->epmode, encoder->epmr, lc3buf, encoder->channel_setup[ch]->targetBytes, output_size2, encoder->channel_setup[ch]->n_pccw, scratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif lc3buf += output_size2; @@ -663,15 +663,15 @@ int Enc_LC3PLUS(LC3PLUS_Enc *encoder, void **input, int bits_per_sample, UWord8 { input_size = output_size; output_size = (Word32)encoder->bitrate * encoder->frame_length / (8 * encoder->fs_in); -#ifdef WMOPS_LC3PLUS - BASOP_sub_start("fec_enc"); +#ifdef WMOPS + push_wmops("fec_enc"); #endif fec_encoder(encoder->epmode, encoder->epmr, output, input_size, output_size, encoder->channel_setup[0]->n_pccw, scratch); -#ifdef WMOPS_LC3PLUS - BASOP_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } diff --git a/lib_lc3plus/lc3.c b/lib_lc3plus/lc3.c index 68dd8a0bb3a446c1db39d62a8e4c87051684b41e..88ccc186e52eb2268cce564c2366a7ee85ef6bad 100644 --- a/lib_lc3plus/lc3.c +++ b/lib_lc3plus/lc3.c @@ -86,6 +86,8 @@ int lc3plus_samplerate_supported(int samplerate) #endif default: return 0; } + assert("should not be reached, added to avoid issues with WMC tool instrumentation"); + return 0; /* should not be reached, added to avoid issues with WMC tool instrumentation */ } static int lc3plus_plc_mode_supported(LC3PLUS_PlcMode plc_mode) @@ -96,6 +98,8 @@ static int lc3plus_plc_mode_supported(LC3PLUS_PlcMode plc_mode) return 1; default: return 0; } + assert("should not be reached, added to avoid issues with WMC tool instrumentation"); + return 0; /* should not be reached, added to avoid issues with WMC tool instrumentation */ } static int lc3plus_frame_size_supported(int frame_dms) @@ -111,6 +115,8 @@ static int lc3plus_frame_size_supported(int frame_dms) return 1; default: return 0; } + assert("should not be reached, added to avoid issues with WMC tool instrumentation"); + return 0; /* should not be reached, added to avoid issues with WMC tool instrumentation */ } static int null_in_list(void **list, int n) diff --git a/lib_lc3plus/plc_classify_fx.c b/lib_lc3plus/plc_classify_fx.c index d30b516a43802e539d4889720926f4c6852a5d39..cf455e68dc7717fad0bd00fa8485d9fc3b24a3cb 100644 --- a/lib_lc3plus/plc_classify_fx.c +++ b/lib_lc3plus/plc_classify_fx.c @@ -45,8 +45,8 @@ static void array_insert_and_shift(Word32 *array, UWord8 value, Word16 longterm_ { Word32 current_byte = 0; -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PLC::array_insert_and_shift"); +#ifdef WMOPS + push_wmops("PLC::array_insert_and_shift"); #endif IF( overall_counter != NULL) @@ -58,8 +58,8 @@ static void array_insert_and_shift(Word32 *array, UWord8 value, Word16 longterm_ current_byte = change_bit_at_position(current_byte, *bit_position, value); array[*byte_position] = current_byte; move16(); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -73,8 +73,8 @@ static void array_calculate(Word32 *array_tdc, Word32 *array_ns, int length, Wor Word32 current_byte_tdc = 0, current_byte_ns = 0; Word16 counter_loc_tdc = 0, counter_loc_ns = 0, counter_tmp = 0; -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PLC::array_calculate"); +#ifdef WMOPS + push_wmops("PLC::array_calculate"); #endif for (i = length - 1; i >= 0; i--) @@ -104,8 +104,8 @@ static void array_calculate(Word32 *array_tdc, Word32 *array_ns, int length, Wor #ifndef CR9_L_RETRAIN_FADEOUT_TYPE_CLASSIFIER *counter_phecu = sub(sub(overall_counter, counter_loc_tdc), counter_loc_ns); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } #endif @@ -130,8 +130,8 @@ void processPLCclassify_fx(Word16 plcMeth, Word16 *concealMethod, Word16 *nbLost Word32 class; ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PLC::processPLCclassify_fx"); +#ifdef WMOPS + push_wmops("PLC::processPLCclassify_fx"); #endif UNUSED(yLen); @@ -246,8 +246,8 @@ void processPLCclassify_fx(Word16 plcMeth, Word16 *concealMethod, Word16 *nbLost } Dyn_Mem_Deluxe_Out(); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -268,8 +268,8 @@ Word16 spectral_centroid_fx_lc(Word16 old_scf_q[], const Word16 *band_offsets, W Word16 *old_scf_q_mod_exp; Word16 *band_offsets_local; ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PLC::spectral_centroid_fx_lc"); +#ifdef WMOPS + push_wmops("PLC::spectral_centroid_fx_lc"); #endif #ifdef ENABLE_HR_MODE @@ -415,8 +415,8 @@ Word16 spectral_centroid_fx_lc(Word16 old_scf_q[], const Word16 *band_offsets, W # endif Dyn_Mem_Deluxe_Out(); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return sc; } diff --git a/lib_lc3plus/plc_phecu_fec_hq_fx.c b/lib_lc3plus/plc_phecu_fec_hq_fx.c index aaf6a9bd0e4d45e542e8adbdcb8b643c8c9beec2..e73a1faa818c1f60af03b5425f3d5b379bac77b9 100644 --- a/lib_lc3plus/plc_phecu_fec_hq_fx.c +++ b/lib_lc3plus/plc_phecu_fec_hq_fx.c @@ -127,13 +127,13 @@ static Word16 plc_phEcu_nonpure_tone_ana_fx(const Word16* plocs, const Word16 static void rotate_W16_fx(Word16 re_in, Word16 im_in, Word16 cosFactor, Word16 sinFactor, Word16 *re_out_ptr, Word16 *im_out_ptr) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::rotate_W16_fx"); +#ifdef WMOPS + push_wmops("PhECU::rotate_W16_fx"); #endif *re_out_ptr = msu_r(L_mult(re_in, cosFactor), im_in, sinFactor); /* 2 ops no move when inlined */ *im_out_ptr = mac_r(L_mult(re_in, sinFactor), im_in, cosFactor); /* 2 ops no move when inlined */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return; } @@ -141,8 +141,8 @@ static void rotate_W16_fx(Word16 re_in, Word16 im_in, Word16 cosFactor, Word16 s static void valley_magnitude_adj_fx(Word16 *re_ptr, Word16 *im_ptr, Word16 uniFactor, Word16 cosFactor) { Word16 scale_fx; -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::valley_magnitude_adj_fx"); +#ifdef WMOPS + push_wmops("PhECU::valley_magnitude_adj_fx"); #endif /* y = 0.5*((2*rand(1,10000) + 1*cos(2*pi*x)) - 1 */ /* y will be in -1 to 1 range */ @@ -158,8 +158,8 @@ static void valley_magnitude_adj_fx(Word16 *re_ptr, Word16 *im_ptr, Word16 uniFa *re_ptr = mult_r(scale_fx, shl_sat(*re_ptr, 1)); /* no moves , should be inlined */ *im_ptr = mult_r(scale_fx, shl_sat(*im_ptr, 1)); /* no moves , should be inlined */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return; } @@ -188,8 +188,8 @@ Word16 rand_phase_fx(const Word16 seed, Word16 *sin_F, Word16 *cos_F) })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::rand_phase_fx"); +#ifdef WMOPS + push_wmops("PhECU::rand_phase_fx"); #endif seed2 = extract_l(L_mac0(13849, seed, 31821)); @@ -201,8 +201,8 @@ Word16 rand_phase_fx(const Word16 seed, Word16 *sin_F, Word16 *cos_F) #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return seed2; } @@ -354,14 +354,14 @@ void trans_burst_ana_fx( if (time_offs == 0) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::trans_burst_ana_fx(1st)"); +#ifdef WMOPS + push_wmops("PhECU::trans_burst_ana_fx(1st)"); #endif } else { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::trans_burst_ana_fx(N)"); +#ifdef WMOPS + push_wmops("PhECU::trans_burst_ana_fx(N)"); #endif } @@ -699,7 +699,7 @@ void trans_burst_ana_fx( L_acc = L_sub((INT32_MAX >> 1) + 1, L_mult0(alpha[k], alpha[k])); { - /* use lower complex(WMOPS_LC3PLUS/ROM) 2nd-order sqrt approximation */ + /* use lower complex(WMOPS/ROM) 2nd-order sqrt approximation */ Word32 L_man, L_acc2 = L_acc; Word16 tmp, expo_in, expo2, man_in, man; /* updated code using the 2nd order approximation routine */ @@ -797,8 +797,8 @@ void trans_burst_ana_fx( #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -826,8 +826,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::imax_fx"); +#ifdef WMOPS + push_wmops("PhECU::imax_fx"); #endif /* Seek the extremum of the parabola P(x) defined by 3 consecutive points @@ -913,8 +913,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return posi; /* Q15. The position either left or right relative to the index of the middle of the 3 given data points. */ @@ -959,8 +959,8 @@ static Word16 imax_fx( /* o: The location, relative to the Word16 P_in_plocs; Word16 n_real_interp_tail; -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::spec_ana_fx(1st)"); +#ifdef WMOPS + push_wmops("PhECU::spec_ana_fx(1st)"); #endif #ifdef DYNMEM_COUNT Dyn_Mem_In("spec_ana_fx", sizeof(struct { @@ -1008,16 +1008,16 @@ static Word16 imax_fx( /* o: The location, relative to the rectLength = sub(Lprot, shl_pos(hamm_len2, 1)); /* The length of the rectangular portion of the Hamming-Rectangular window. */ { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::WhrAnaWin+fft"); +#ifdef WMOPS + push_wmops("PhECU::WhrAnaWin+fft"); #endif /* Apply hamming-rect window */ windowing_L(xfp, L_xfp, sp_ana_win, rectLength, hamm_len2); BASOP_rfftN(L_xfp, Lprot, &fft_scale, buffer_fft); } -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); /* anawin+fft */ +#ifdef WMOPS + pop_wmops(); /* anawin+fft */ #endif /* Convert 32 Bit intlv FFT into phecu 16 bit flipped fft format */ @@ -1035,7 +1035,7 @@ static Word16 imax_fx( /* o: The location, relative to the basop_memset(xfp + stop_band_start, 0, (stop_band_length) * sizeof(Word16)); } - peak_range_1 = s_min(Lprot2p1, MAX_LPROT_RED / 2 + 1); /* limit preliminary only active for 48k to save WMOPS_LC3PLUS */ + peak_range_1 = s_min(Lprot2p1, MAX_LPROT_RED / 2 + 1); /* limit preliminary only active for 48k to save WMOPS */ basop_memmove(X_sav, xfp, (Lprot) * sizeof(Word16)); @@ -1052,8 +1052,8 @@ static Word16 imax_fx( /* o: The location, relative to the plc_phEcu_peak_locator_fx(xfp, peak_range_1, plocs, num_plocs, sens, Xmax, Xmin, MAX_LPROT_RED, buffer_fft); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::Peaks_refine"); +#ifdef WMOPS + push_wmops("PhECU::Peaks_refine"); #endif /* Refine peaks */ @@ -1173,8 +1173,8 @@ static Word16 imax_fx( /* o: The location, relative to the } } -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); /* peaks refine */ +#ifdef WMOPS + pop_wmops(); /* peaks refine */ #endif logic16(); @@ -1217,8 +1217,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -1307,14 +1307,14 @@ static Word16 imax_fx( /* o: The location, relative to the if (time_offs == 0) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::subst_spec_fx(1st)"); +#ifdef WMOPS + push_wmops("PhECU::subst_spec_fx(1st)"); #endif } else { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::subst_spec_fx(N)"); +#ifdef WMOPS + push_wmops("PhECU::subst_spec_fx(N)"); #endif } @@ -1669,8 +1669,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -1700,8 +1700,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::my_wtda_fx"); +#ifdef WMOPS + push_wmops("PhECU::my_wtda_fx"); #endif L_w_audio = (Word32 *)scratchAlign(scratchBuffer, 0); /* Size = 4 * 2 * MAX_L_FRAME */ @@ -1760,8 +1760,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return; } @@ -1807,8 +1807,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::rec_wtda_fx"); +#ifdef WMOPS + push_wmops("PhECU::rec_wtda_fx"); #endif rec_buf = scratchAlign(scratchBuffer, 0); /* Size = 2 * 2 * MAX_L_FRAME */ @@ -1849,8 +1849,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return; @@ -1893,8 +1893,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::rec_frame_fx"); +#ifdef WMOPS + push_wmops("PhECU::rec_frame_fx"); #endif L_x = (Word32 *)scratchAlign(scratchBuffer, 0); /* Size = 4 * MAX_LPROT */ @@ -1912,12 +1912,12 @@ static Word16 imax_fx( /* o: The location, relative to the fft_scale = -1; move16(); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::IFFT_fx"); +#ifdef WMOPS + push_wmops("PhECU::IFFT_fx"); #endif BASOP_irfftN(L_x, Lprot, &fft_scale, buffer_fft); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif pX_L = &L_x[0]; @@ -1955,8 +1955,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return; } @@ -2036,14 +2036,14 @@ static Word16 imax_fx( /* o: The location, relative to the if (!prev_bfi) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::hq_phase_ecu_fx(1st)"); +#ifdef WMOPS + push_wmops("PhECU::hq_phase_ecu_fx(1st)"); #endif } else { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::hq_phase_ecu_fx(N)"); +#ifdef WMOPS + push_wmops("PhECU::hq_phase_ecu_fx(N)"); #endif } @@ -2244,8 +2244,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -2256,8 +2256,8 @@ static Word16 imax_fx( /* o: The location, relative to the { Word32 acc; Word16 z; -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::sqrt2ndOrder"); +#ifdef WMOPS + push_wmops("PhECU::sqrt2ndOrder"); #endif ASSERT(x >= 16384); @@ -2268,8 +2268,8 @@ static Word16 imax_fx( /* o: The location, relative to the z = mac_r(acc, z, x); /* in Q15 */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return z; } @@ -2297,8 +2297,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::windowing_L"); +#ifdef WMOPS + push_wmops("PhECU::windowing_L"); #endif pX = x; @@ -2335,8 +2335,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -2359,8 +2359,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::windowing_ola"); +#ifdef WMOPS + push_wmops("PhECU::windowing_ola"); #endif pX = x; @@ -2375,8 +2375,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -2460,8 +2460,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::sqrtMagnApprox_fx"); +#ifdef WMOPS + push_wmops("PhECU::sqrtMagnApprox_fx"); #endif /* Get values and move pointers */ @@ -2478,8 +2478,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return sum; } @@ -2520,8 +2520,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::fft_spec2_sqrt_approx_fx"); +#ifdef WMOPS + push_wmops("PhECU::fft_spec2_sqrt_approx_fx"); #endif /* Magnitude at 0. only real component */ @@ -2547,8 +2547,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return; } @@ -2584,8 +2584,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::imax2_jacobsen_mag_fx"); +#ifdef WMOPS + push_wmops("PhECU::imax2_jacobsen_mag_fx"); #endif /* Jacobsen estimates peak offset relative y_0 using @@ -2667,8 +2667,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return posi; /* Q15. The position either left or right relative to the index of the middle of the 3 given data points. */ @@ -2692,8 +2692,8 @@ static Word16 imax_fx( /* o: The location, relative to the #define FHG_FFT_UPSHIFT 2 -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::intlvW32_2_flippedW16"); +#ifdef WMOPS + push_wmops("PhECU::intlvW32_2_flippedW16"); #endif #ifdef DYNMEM_COUNT Dyn_Mem_In("intlvW32_2_flippedW16", sizeof(struct { @@ -2750,8 +2750,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -2766,8 +2766,8 @@ static Word16 imax_fx( /* o: The location, relative to the Counter numPairsLocal; Word32 *pX_L; Word16 *pX_re, *pX_im; -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::flippedW16_2_intlvW32"); +#ifdef WMOPS + push_wmops("PhECU::flippedW16_2_intlvW32"); #endif #ifdef DYNMEM_COUNT Dyn_Mem_In("flippedW16_2_intlvW32", sizeof(struct { @@ -2802,8 +2802,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -2818,8 +2818,8 @@ static Word16 imax_fx( /* o: The location, relative to the Dyn_Mem_In("get_sin_cosQ10", sizeof(struct { Word16 sign_val, idx, idx2, idx3; })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::get_sin_cosQ10opt"); +#ifdef WMOPS + push_wmops("PhECU::get_sin_cosQ10opt"); #endif /* sin table has a range up to pi/2 (256+1)=257 coeffs*/ @@ -2871,8 +2871,8 @@ static Word16 imax_fx( /* o: The location, relative to the #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -2902,8 +2902,8 @@ static Word16 imax_fx( /* o: The location, relative to the })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhEcu::nonpure_tone_ana_fx"); +#ifdef WMOPS + push_wmops("PhEcu::nonpure_tone_ana_fx"); #endif Word16 nonpure_tone_detect; /* output variable */ @@ -3144,8 +3144,8 @@ static Word16 imax_fx( /* o: The location, relative to the } /* bands available*/ -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return nonpure_tone_detect; diff --git a/lib_lc3plus/plc_phecu_peak_locator_fx.c b/lib_lc3plus/plc_phecu_peak_locator_fx.c index 78a6ec281b78d76ba250ae6a2b4182c38beb5f3b..42729e800fba9b283ca1dc2e4c32570d0228b786 100644 --- a/lib_lc3plus/plc_phecu_peak_locator_fx.c +++ b/lib_lc3plus/plc_phecu_peak_locator_fx.c @@ -65,8 +65,8 @@ void plc_phEcu_peak_locator_fx(const Word16 *inp, /* i: vector with values >=0 Word16 *fsc_idx; })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::peak_locator_fx(1st)"); +#ifdef WMOPS + push_wmops("PhECU::peak_locator_fx(1st)"); #endif sc_idx = (Word16 *)scratchAlign(scratchBuffer, 0); /* ByteSize = 2 * (1+ inp_len+1) */ cand_pairs_buf = (Word16 *)scratchAlign(sc_idx, sizeof(*sc_idx) * (1+inp_len+1)); /* ByteSize = 2 * (1+ 1+ inp_len+1 ) */ @@ -378,8 +378,8 @@ void plc_phEcu_peak_locator_fx(const Word16 *inp, /* i: vector with values >=0 #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } diff --git a/lib_lc3plus/plc_phecu_setf0hz_fx.c b/lib_lc3plus/plc_phecu_setf0hz_fx.c index 264aa19c3a66cded3aee31cd78a1289bf8f88346..3dd5b1a0844025d9a1c4b6d80f000bf670da16e2 100644 --- a/lib_lc3plus/plc_phecu_setf0hz_fx.c +++ b/lib_lc3plus/plc_phecu_setf0hz_fx.c @@ -32,8 +32,8 @@ plc_phEcuSetF0Hz_fx(/* output Q7 bin frequency [0.. 255.xxxx] "1 sign, 8 bits })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::plc_phEcuSetF0Hz_fx"); +#ifdef WMOPS + push_wmops("PhECU::plc_phEcuSetF0Hz_fx"); #endif result = 0; move16(); @@ -50,8 +50,8 @@ plc_phEcuSetF0Hz_fx(/* output Q7 bin frequency [0.. 255.xxxx] "1 sign, 8 bits #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return result; /*Q7*/ diff --git a/lib_lc3plus/plc_phecu_tools_fx.c b/lib_lc3plus/plc_phecu_tools_fx.c index 32eff68f2dd114f1cf4b4033d04be0b94e6a1750..c78d406a46e801b4594fd82ccc2dbc358ea2f356 100644 --- a/lib_lc3plus/plc_phecu_tools_fx.c +++ b/lib_lc3plus/plc_phecu_tools_fx.c @@ -167,8 +167,8 @@ Word32 winEnCalc( /* o: output summed energy Ltot */ #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::winEnCalc"); +#ifdef WMOPS + push_wmops("PhECU::winEnCalc"); #endif L_tot = INT32_MAX; move32(); /*acc is on negative side , but as all accumulation is positive, we make use of one extra bit */ @@ -235,8 +235,8 @@ Word32 winEnCalc( /* o: output summed energy Ltot */ L_tot = L_shl(L_tot,tmp); *exp = sub(*exp, tmp); move16(); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef DYNMEM_COUNT Dyn_Mem_Out(); diff --git a/lib_lc3plus/plc_update_aft_imdct_fx.c b/lib_lc3plus/plc_update_aft_imdct_fx.c index 6be74bb615b1b193b1fca331ab86c854d688a0ed..9ba483792d2ee91590e667026c4b2372659d6ebf 100644 --- a/lib_lc3plus/plc_update_aft_imdct_fx.c +++ b/lib_lc3plus/plc_update_aft_imdct_fx.c @@ -37,8 +37,8 @@ void processPLCUpdateAfterIMDCT_fx(Word16 x_fx[], Word16 q_fx_exp, Word16 concea -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("processPLCUpdateAfterIMDCT "); +#ifdef WMOPS + push_wmops("processPLCUpdateAfterIMDCT "); #endif @@ -160,8 +160,8 @@ void processPLCUpdateAfterIMDCT_fx(Word16 x_fx[], Word16 q_fx_exp, Word16 concea *prev_prev_bfi = *prev_bfi; move16(); *prev_bfi = bfi; move16(); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef DYNMEM_COUNT @@ -254,8 +254,8 @@ void processPLCUpdateXFP_w_E_hist_fx(Word16 prev_bfi, Word16 bfi, Word16 *xfp_fx Word16 exp_out; })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::UpdateXfp_w_E_hist_fx"); +#ifdef WMOPS + push_wmops("PhECU::UpdateXfp_w_E_hist_fx"); #endif IF (sub(bfi,1) != 0) @@ -331,8 +331,8 @@ void processPLCUpdateXFP_w_E_hist_fx(Word16 prev_bfi, Word16 bfi, Word16 *xfp_fx } } -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef DYNMEM_COUNT Dyn_Mem_Out(); diff --git a/lib_lc3plus/plc_update_fx.c b/lib_lc3plus/plc_update_fx.c index b219aa67436323dc5e493838380a7256cf11195d..7abb2b613ddfaa91068503689c12395bb0d840dd 100644 --- a/lib_lc3plus/plc_update_fx.c +++ b/lib_lc3plus/plc_update_fx.c @@ -85,8 +85,8 @@ void processPLCspec2shape_fx(Word16 prev_bfi, Word16 bfi, Word16 q_old_d_fx[], W Word16 fs_idx,local_prev_bfi; })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("PhECU::GF::process_plc_spec_2_shape_fx"); +#ifdef WMOPS + push_wmops("PhECU::GF::process_plc_spec_2_shape_fx"); #endif IF(sub(bfi, 1) != 0) @@ -210,8 +210,8 @@ void processPLCspec2shape_fx(Word16 prev_bfi, Word16 bfi, Word16 q_old_d_fx[], W } -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef DYNMEM_COUNT Dyn_Mem_Out(); diff --git a/lib_lc3plus/plc_xcorr_fx.c b/lib_lc3plus/plc_xcorr_fx.c index 92fc0fc162a2ce991a283426153a3106ebe5748e..d8c6d83904ef6955eee8d584709578625a4c8186 100644 --- a/lib_lc3plus/plc_xcorr_fx.c +++ b/lib_lc3plus/plc_xcorr_fx.c @@ -52,8 +52,8 @@ Word16 plc_norm_corr_blocks_fx( /* o: norm_corr range [-1 })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("plc_norm_corr_blocks_fx"); +#ifdef WMOPS + push_wmops("plc_norm_corr_blocks_fx"); #endif /* Calculate normalized correlation with added shift and block interleaving possibility */ @@ -166,8 +166,8 @@ Word16 plc_norm_corr_blocks_fx( /* o: norm_corr range [-1 #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return norm_corr; } @@ -192,8 +192,8 @@ Word16 plc_xcorr_lc_fx( /* o: quantized output xcorr in Q })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("plc_xcorr_lc_fx"); +#ifdef WMOPS + push_wmops("plc_xcorr_lc_fx"); #endif norm_xcorr_est_q = 0; move16(); @@ -241,8 +241,8 @@ Word16 plc_xcorr_lc_fx( /* o: quantized output xcorr in Q #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return norm_xcorr_est_q; } diff --git a/lib_lc3plus/pvq_enc_fx.c b/lib_lc3plus/pvq_enc_fx.c index 3f073eb577522f44887cb6526288fd9900f65c0f..b41d5ad0e50bcdb35dd1d739260452de07efed07 100644 --- a/lib_lc3plus/pvq_enc_fx.c +++ b/lib_lc3plus/pvq_enc_fx.c @@ -144,8 +144,8 @@ void pvq_enc_search_fx( Word16 pulses_far, pulses, pulsesA, pulsesB; ); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("pvq_enc_search_fx"); +#ifdef WMOPS + push_wmops("pvq_enc_search_fx"); #endif pulses_far = pulses_fin[0]; move16(); @@ -362,8 +362,8 @@ void pvq_enc_search_fx( } Dyn_Mem_Deluxe_Out(); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } diff --git a/lib_lc3plus/pvq_index_fx.c b/lib_lc3plus/pvq_index_fx.c index 2008629779f0049d24d3d8bcf53795ff8ce38d36..966dd7d138538d320d139ada03d6ae8b41aef721 100644 --- a/lib_lc3plus/pvq_index_fx.c +++ b/lib_lc3plus/pvq_index_fx.c @@ -318,8 +318,8 @@ void mpvq_deindex_fx( /* o : void #ifdef DYNMEM_COUNT Dyn_Mem_In("mpvq_deindex_fx", sizeof(struct { Word16 leading_sign; })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("mpvq_deindex_fx"); +#ifdef WMOPS + push_wmops("mpvq_deindex_fx"); #endif basop_memset(vec_out, 0, (entry->dim) * sizeof(Word16)); @@ -337,8 +337,8 @@ void mpvq_deindex_fx( /* o : void #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif } @@ -488,8 +488,8 @@ PvqEntry_fx mpvq_index_fx( /* o : leading_sign_index, i UWord32 lead_sign_ind; })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("mpvq_index_fx"); +#ifdef WMOPS + push_wmops("mpvq_index_fx"); #endif ASSERT(k_val_local <= KMAX_FX); @@ -504,8 +504,8 @@ PvqEntry_fx mpvq_index_fx( /* o : leading_sign_index, i #ifdef DYNMEM_COUNT Dyn_Mem_Out(); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return result; diff --git a/lib_lc3plus/sns_quantize_scf_fx.c b/lib_lc3plus/sns_quantize_scf_fx.c index fe8b38344d868878ea952239517791412c937554..f1f0ba423ac32acb334b53cc9b024e024379aeef 100644 --- a/lib_lc3plus/sns_quantize_scf_fx.c +++ b/lib_lc3plus/sns_quantize_scf_fx.c @@ -36,8 +36,8 @@ static Word16 stage1_base( /* o : idx Word32 L_min_mse, L_mse; })); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("stage1_base"); +#ifdef WMOPS + push_wmops("stage1_base"); #endif /* find first vector error energy for */ @@ -89,8 +89,8 @@ static Word16 stage1_base( /* o : idx } ASSERT(idx >= 0 && idx < R); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef DYNMEM_COUNT Dyn_Mem_Out(); @@ -183,8 +183,8 @@ static void processQuantize_stage1ScfEncStage1_fx(const Word16 *target_st1, Word16 *st1_idx0Ptr, Word16 *st1_idx1Ptr) { -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("processQuantize_stage1ScfEncStage1_fx"); +#ifdef WMOPS + push_wmops("processQuantize_stage1ScfEncStage1_fx"); #endif #ifdef ENABLE_HR_MODE @@ -201,8 +201,8 @@ static void processQuantize_stage1ScfEncStage1_fx(const Word16 *target_st1, *st1_idx1Ptr, st1_vector); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif return; @@ -306,8 +306,8 @@ static void pvq_enc_find_best_submode_pre_post_fx( shape_far = (Word16 *)scratchAlign(pulses_far, sizeof(*pulses_far) * M); /* Size = 2 * M */ #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("pvq_enc_find_best_submode_pre_post_fx"); +#ifdef WMOPS + push_wmops("pvq_enc_find_best_submode_pre_post_fx"); #endif /* construct pulse vectors and en1 normalized shape vectors */ /* use shape Q in Q14 */ @@ -414,8 +414,8 @@ static void pvq_enc_find_best_submode_pre_post_fx( *sub_mode_ptr = extract_l(L_section); move16(); /* 0,1,2,3 */ -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef DYNMEM_COUNT Dyn_Mem_Out(); @@ -505,8 +505,8 @@ static void processQuantize_stage2ScfEncStage2_fx( proc_target_lp = (Word16 *)buffer_pvq_enc_find_best_submode_pre_post_fx; /* size = 2*M */ #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("processQuantize_stage2ScfEncStage2_fx"); +#ifdef WMOPS + push_wmops("processQuantize_stage2ScfEncStage2_fx"); #endif /* fixed setup for a given bitrate of 38 , no moves needed */ @@ -631,8 +631,8 @@ static void processQuantize_stage2ScfEncStage2_fx( L_prm_idx[2] = L_deposit_l(enc_PVQ_OA.lead_sign_ind); /* LS shape single bit */ } -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif #ifdef DYNMEM_COUNT Dyn_Mem_Out(); @@ -676,8 +676,8 @@ static Word16 scfdec_stage2_fx( /* o: ber flag */ ); #endif -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_start("scfdec_stage2_fx"); +#ifdef WMOPS + push_wmops("scfdec_stage2_fx"); #endif dec_pulses = (Word16 *)scratchAlign(scratchBuffer, 0); /* Size = 2 * M = 32 bytes */ @@ -740,8 +740,8 @@ static Word16 scfdec_stage2_fx( /* o: ber flag */ /* scaling aligend with encoder search */ pvq_dec_scale_vec_fx(dec_adj_glob_vec, gValQ13, st2_vector); -#ifdef WMOPS_LC3PLUS - BASOP_sub_sub_end(); +#ifdef WMOPS + pop_wmops(); #endif Dyn_Mem_Deluxe_Out(); return BER_dec;