Skip to content

Usage of NS2SA()-macro on variables

Basic info

Bug description

In the BASOP code, at approx. 170 places the macro NS2SA() seems to be used on variables. This macro contains e.g. a division, which is not counted. Instead, probably NS2SA_FX2() should be used (at least, if it's really used with a variable).

Using grep on the source code (find . -name "*.c" -exec grep -E -Hn 'NS2SA(:space::lower:' {} ;) produces the following results:

./lib_com/ivas_fb_mixer.c:1292:        IF( EQ_16( pCfg->fb_latency, NS2SA( sampling_rate, DELAY_FB_1_NS ) ) )
./lib_com/ivas_fb_mixer.c:1481:    IF( EQ_16( fade_len, NS2SA( sampling_rate, DELAY_FB_4_NS ) ) )
./lib_com/ivas_fb_mixer.c:1498:    ELSE IF( EQ_16( fade_len, NS2SA( sampling_rate, DELAY_FB_1_NS ) ) )
./lib_com/tcx_ltp_fx.c:1285:    tcx_buf_len = NS2SA( st->output_Fs, TCXLTP_DELAY_NS ); /* Q0 */
./lib_com/window_ola_fx.c:836:            Copy( mem_over_hp + 2, tmp_buf_switch + i_mult2( SWITCH_GAP_LENGTH_8k, delta ), NS2SA( output_Fs, DELAY_CLDFB_NS ) );
./lib_com/window_ola_fx.c:842:                Copy( synth_subfr_out + SWITCH_GAP_LENGTH_8k, tmp_buf_switch + SWITCH_GAP_LENGTH_8k, NS2SA( output_Fs, DELAY_CLDFB_NS ) ); /* copy subframe to tmp buffer */
./lib_com/window_ola_fx.c:953:    tmp = NS2SA( output_Fs, DELAY_CLDFB_NS );
./lib_dec/FEC_HQ_core_fx.c:1983:            post_hq_delay = NS2SA( st->output_Fs, POST_HQ_DELAY_NS );
./lib_dec/FEC_HQ_core_fx.c:1986:            post_hq_delay = NS2SA( st->output_Fs, DELAY_CLDFB_NS );
./lib_dec/FEC_HQ_core_fx.c:1991:                post_hq_delay = NS2SA( st->output_Fs, DELAY_CLDFB_NS );
./lib_dec/FEC_HQ_core_fx.c:2006:        mvr2r( st->hTcxDec->synth_history + output_frame, st->hTcxDec->synth_history, output_frame - post_hq_delay + NS2SA( st->output_Fs, PH_ECU_MEM_NS ) );
./lib_dec/FEC_HQ_core_fx.c:2016:                mvr2r( st->prev_synth_buffer, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS ), NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ) );
./lib_dec/FEC_HQ_core_fx.c:2020:                mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) );
./lib_dec/FEC_HQ_core_fx.c:2027:                    mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_CLDFB_NS ), NS2SA( st->output_Fs, DELAY_CLDFB_NS ) );
./lib_dec/FEC_HQ_core_fx.c:2028:                    mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) );
./lib_dec/FEC_HQ_core_fx.c:2032:                    mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS ), NS2SA( st->output_Fs, DELAY_CLDFB_NS ) );
./lib_dec/FEC_HQ_core_fx.c:2033:                    mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ), NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) );
./lib_dec/FEC_HQ_core_fx.c:2042:                mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) );
./lib_dec/FEC_HQ_phase_ecu_fx.c:2562:        tmp = NS2SA( output_frame * 50, PH_ECU_ALDO_OLP2_NS - PH_ECU_LOOKAHEAD_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:2923:    copy_len = NS2SA( output_frame * FRAMES_PER_SEC, ( 2 * FRAME_SIZE_NS - L_PROT_NS ) / 2 ); /* prototype fill on each side of xsubst to fill MDCT Frame */
./lib_dec/FEC_HQ_phase_ecu_fx.c:2925:    ola_len = NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS - ( 2 * FRAME_SIZE_NS - L_PROT_NS ) / 2 ); /* remaining lengt of LA_ZEROS to overlap add decoded with xsubst */
./lib_dec/FEC_HQ_phase_ecu_fx.c:2983:    timesh = sub( NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS ), shr( sub( shl( output_frame, 1 ), Lprot ), 1 ) );
./lib_dec/FEC_HQ_phase_ecu_fx.c:2991:        Copy( old_dec, xsubst_ + NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS ), copy_len ); /* also need to scale to Q0 ?? */
./lib_dec/FEC_HQ_phase_ecu_fx.c:2993:        pNew = xsubst_ + add( copy_len, NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS ) );
./lib_dec/FEC_HQ_phase_ecu_fx.c:3064:    copy_len = NS2SA( output_frame * FRAMES_PER_SEC, ( 2 * FRAME_SIZE_NS - L_PROT_NS ) / 2 );                 /* prototype fill on each side of xsubst to fill MDCT Frame */
./lib_dec/FEC_HQ_phase_ecu_fx.c:3065:    ola_len = NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS - ( 2 * FRAME_SIZE_NS - L_PROT_NS ) / 2 ); /* remaining lengt of LA_ZEROS to overlap add decoded with xsubst */
./lib_dec/FEC_HQ_phase_ecu_fx.c:3100:    timesh = NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS ) - ( 2 * output_frame - Lprot ) / 2;
./lib_dec/FEC_HQ_phase_ecu_fx.c:3108:        mvr2r( old_dec, xsubst_ + NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS ), copy_len ); /* also need to scale to Q0 ?? */
./lib_dec/FEC_HQ_phase_ecu_fx.c:3110:        pNew = xsubst_ + copy_len + NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:4942:        ph_ecu_lookahead = NS2SA( output_frame * FRAMES_PER_SEC, PH_ECU_LOOKAHEAD_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5021:    old_dec = prevsynth + sub( shl( output_frame, 1 ), NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS ) );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5070:        ph_ecu_lookahead = NS2SA( output_frame * FRAMES_PER_SEC, PH_ECU_LOOKAHEAD_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5167:    old_dec = prevsynth + 2 * output_frame - NS2SA( output_frame * FRAMES_PER_SEC, N_ZERO_MDCT_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5226:        fec_alg_input = prevsynth + NS2SA( output_frame * FRAMES_PER_SEC, ACELP_LOOK_NS / 2 - PH_ECU_LOOKAHEAD_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5230:        fec_alg_input = prevsynth - NS2SA( output_frame * FRAMES_PER_SEC, PH_ECU_LOOKAHEAD_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5289:        ivas_hq_phase_ecu_fx( prevsynth - NS2SA( output_frame * FRAMES_PER_SEC, PH_ECU_LOOKAHEAD_NS ), ecu_rec, time_offs, X_sav, Q_spec, num_p, plocs, plocsi,
./lib_dec/FEC_HQ_phase_ecu_fx.c:5337:        fec_alg_input = prevsynth + NS2SA( output_frame * FRAMES_PER_SEC, ACELP_LOOK_NS / 2 - PH_ECU_LOOKAHEAD_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5341:        fec_alg_input = prevsynth - NS2SA( output_frame * FRAMES_PER_SEC, PH_ECU_LOOKAHEAD_NS );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5357:        fec_ecu_pitch_fx( prevsynth + NS2SA( output_frame * 50, ACELP_LOOK_NS / 2 - PH_ECU_LOOKAHEAD_NS ), prevsynth_LP, output_frame, &N, &corr, &decimatefactor, ph_ecu_HqVoicing );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5401:        hq_phase_ecu( prevsynth - NS2SA( output_frame * FRAMES_PER_SEC, PH_ECU_LOOKAHEAD_NS ), ecu_rec, time_offs, X_sav, num_p, plocs, plocsi, env_stab, last_fec, prev_bfi, old_is_transient, mag_chg_1st, Xavg, beta_mute, st->bwidth, output_frame, corr, st->element_mode );
./lib_dec/FEC_HQ_phase_ecu_fx.c:5412:        fec_alg_fx( prevsynth + NS2SA( output_frame * 50, ACELP_LOOK_NS / 2 - PH_ECU_LOOKAHEAD_NS ), prevsynth_LP, &st_fx->hHQ_core->ni_seed_forfec, ecu_rec, output_frame, N, decimatefactor, ph_ecu_HqVoicing, gapsynth );
./lib_dec/acelp_core_dec_fx.c:1820:        int16_t nSamples = NS2SA( st->L_frame * FRAMES_PER_SEC, FRAME_SIZE_NS /*DELAY_CLDFB_NS*/ ); /* IVAS-64: optimization is likely possible here (don't resample the whole frame) */
./lib_dec/acelp_core_dec_fx.c:1829:        cldfbSynthesis( realBuffer, imagBuffer, synth /*dummy*/, NS2SA( st->output_Fs, FRAME_SIZE_NS /*DELAY_CLDFB_NS*/ ), st->cldfbSyn );
./lib_dec/acelp_core_dec_ivas_fx.c:2065:        cldfbSynthesis_ivas_fx( realBuffer_fx, imagBuffer_fx, synth_fx /*dummy*/, NS2SA( st->output_Fs, FRAME_SIZE_NS /*DELAY_CLDFB_NS*/ ), st->cldfbSyn );
./lib_dec/acelp_core_switch_dec_fx.c:239:        Copy_Scale_sig( synth_intFreq + sub( NS2SA( i_mult( L_frame_for_cs, 50 ), ( SWITCH_GAP_LENGTH_NS - DELAY_CLDFB_NS ) ), 2 ), mem_synth, add( NS2SA( i_mult( L_frame_for_cs, 50 ), DELAY_CLDFB_NS ), 2 ), negate( st_fx->Q_syn ) ); /* Copy mem with Q0 */
./lib_dec/core_switching_dec.c:113:            st->old_bwe_delay = NS2SA( st->output_Fs, MAX_DELAY_TBE_NS - DELAY_SWB_TBE_12k8_NS );
./lib_dec/core_switching_dec.c:117:            st->old_bwe_delay = NS2SA( st->output_Fs, MAX_DELAY_TBE_NS - DELAY_SWB_TBE_16k_NS );
./lib_dec/core_switching_dec.c:192:                Copy32( st->hTcxDec->FBTCXdelayBuf_32, st->prev_synth_buffer32_fx, NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ) );
./lib_dec/core_switching_dec.c:193:                // Copy_Scale_sig_32_16( st->hTcxDec->FBTCXdelayBuf_32, st->prev_synth_buffer_fx, NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ), -11 ); //Q11 -> Q0
./lib_dec/core_switching_dec.c:224:            delay_comp = NS2SA( st->output_Fs, DELAY_CLDFB_NS );
./lib_dec/core_switching_dec_fx.c:1768:                Word16 tmpDelta = NS2SA( st_fx->output_Fs, DELAY_BWE_TOTAL_NS );
./lib_dec/core_switching_dec_fx.c:1927:                    Scale_sig( output_mem_fx, NS2SA( st_fx->output_Fs, STEREO_DFT32MS_OVL_NS ), Qtmp ); /* Qtmp */
./lib_dec/evs_dec_fx.c:922:                            GenTransition_fx( hBWE_TD->syn_overlap_fx, hBWE_TD->old_tbe_synth_fx, 2 * NS2SA( st_fx->output_Fs, DELAY_BWE_TOTAL_NS ), hb_synth_fx,
./lib_dec/evs_dec_fx.c:932:                            GenTransition_WB_fx( hBWE_TD->syn_overlap_fx, hBWE_TD->old_tbe_synth_fx, st_fx->prev_Qx, 2 * NS2SA( st_fx->output_Fs, DELAY_BWE_TOTAL_NS ), hb_synth_fx,
./lib_dec/evs_dec_fx.c:1330:                    Copy( hTcxDec->FBTCXdelayBuf, st_fx->delay_buf_out_fx, NS2SA( st_fx->output_Fs, DELAY_CLDFB_NS ) ); /*st_fx->q_prev_synth_buffer_fx*/
./lib_dec/evs_dec_fx.c:1334:                    Copy( hTcxDec->FBTCXdelayBuf, st_fx->prev_synth_buffer_fx, NS2SA( st_fx->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ) );                                         /*st_fx->Qprev_synth_buffer_fx*/
./lib_dec/evs_dec_fx.c:1335:                    Copy( hTcxDec->FBTCXdelayBuf + NS2SA( st_fx->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ), st_fx->delay_buf_out_fx, NS2SA( st_fx->output_Fs, DELAY_CLDFB_NS ) ); /*Q0*/
./lib_dec/fd_cng_dec_fx.c:3620:                FOR( i = 0; i < sub( hFdCngCom->frameSize, NS2SA( st->sr_core, N_ZERO_MDCT_NS ) ); i++ )
./lib_dec/fd_cng_dec_fx.c:3622:                    timeDomainOutput[i] = add( timeDomainOutput[i], shr_r( st->hHQ_core->old_out_LB_fx[i + NS2SA( st->sr_core, N_ZERO_MDCT_NS )], st->hHQ_core->Q_old_wtda_LB ) ); /*st->q_old_outLB_fx*/
./lib_dec/fd_cng_dec_fx.c:4159:                FOR( i = 0; i < sub( hFdCngCom->frameSize, NS2SA( st->sr_core, N_ZERO_MDCT_NS ) ); i++ )
./lib_dec/fd_cng_dec_fx.c:4161:                    timeDomainOutput[i] = add( timeDomainOutput[i], shr_r( st->hHQ_core->old_out_LB_fx[i + NS2SA( st->sr_core, N_ZERO_MDCT_NS )], st->hHQ_core->Q_old_wtda_LB ) ); /*st->q_old_outLB_fx*/
./lib_dec/init_dec_fx.c:496:        st_fx->hTcxDec->old_synthFB_fx = st_fx->hTcxDec->synth_history_fx + NS2SA( st_fx->output_Fs, PH_ECU_MEM_NS );
./lib_dec/init_dec_fx.c:497:        st_fx->hTcxDec->prev_good_synth_fx = st_fx->hTcxDec->old_synthFB_fx + NS2SA( st_fx->output_Fs, PH_ECU_LOOKAHEAD_NS );
./lib_dec/ivas_core_dec.c:1638:            exp_old_out = Find_Max_Norm16( st->hHQ_core->old_out_fx + NS2SA_FX2( st->output_Fs, N_ZERO_MDCT_NS ), sub( add( NS2SA_FX2( st->output_Fs, N_ZERO_MDCT_NS ), NS2SA_FX2( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ), NS2SA( st->output_Fs, N_ZERO_MDCT_NS ) ) );
./lib_dec/ivas_dirac_dec.c:2096:    slot_size = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); // cL
./lib_dec/ivas_init_dec.c:2037:        granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES );
./lib_dec/ivas_init_dec.c:2336:        IF( NE_32( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, ivas_jbm_dec_get_tc_buffer_mode( st_ivas ), n_channels_transport_jbm, n_channels_transport_jbm, n_channels_transport_jbm, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ), IVAS_ERR_OK ) )
./lib_dec/ivas_jbm_dec.c:435:                    scale_sig32( hCPE->input_mem_fx[i], NS2SA( hCPE->hCoreCoder[0]->output_Fs, STEREO_DFT32MS_OVL_NS ), sub( hCPE->hStereoDft->q_dft, Q11 ) ); // q_dft
./lib_dec/ivas_jbm_dec.c:972:                    scale_sig32( hCPE->input_mem_fx[i], NS2SA( hCPE->hCoreCoder[0]->output_Fs, STEREO_DFT32MS_OVL_NS ), sub( hCPE->hStereoDft->q_dft, Q11 ) ); // q_dft
./lib_dec/ivas_jbm_dec.c:1032:                    scale_sig32( hCPE->input_mem_fx[i], NS2SA( hCPE->hCoreCoder[0]->output_Fs, STEREO_DFT32MS_OVL_NS ), sub( Q11, hCPE->hStereoDft->q_dft ) ); // Q11
./lib_dec/ivas_jbm_dec.c:1431:                    scale_sig32( hCPE->input_mem_fx[i], NS2SA( hCPE->hCoreCoder[0]->output_Fs, STEREO_DFT32MS_OVL_NS ), sub( hCPE->hStereoDft->q_dft, Q11 ) ); // q_dft
./lib_dec/ivas_masa_dec.c:839:        IF( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, buffer_mode, nchan_transport, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ) != IVAS_ERR_OK )
./lib_dec/ivas_mc_param_dec.c:537:            IF( NE_32( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, TC_BUFFER_MODE_RENDERER, nchan_transport, nchan_transport, 0, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ), IVAS_ERR_OK ) )
./lib_dec/ivas_mc_param_dec.c:1944:    Word16 temp = BASOP_Util_Divide1616_Scale( nSamplesAsked, NS2SA( output_Fs, CLDFB_SLOT_NS ), &temp_e );
./lib_dec/ivas_mc_param_dec.c:1947:    *nSamplesRendered = imult1616( slots_to_render, NS2SA( output_Fs, CLDFB_SLOT_NS ) );
./lib_dec/ivas_mc_param_dec.c:2275:    *nSamplesAvailableNext = imult1616( sub( hParamMC->num_slots, hParamMC->slots_rendered ), NS2SA( output_Fs, CLDFB_SLOT_NS ) );
./lib_dec/ivas_mc_paramupmix_dec.c:421:        IF( NE_32( ( error = ivas_jbm_dec_tc_buffer_open_fx( st_ivas, buffer_mode, nchan_tc, nchan_to_allocate, nchan_to_allocate, NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ) ) ), IVAS_ERR_OK ) )
./lib_dec/ivas_mct_dec.c:405:                Copy_Scale_sig_32_16( hCPE->output_mem_fx[1], output_mem_fx, NS2SA( sts[n]->output_Fs, 3125000 ), -Q11 );
./lib_dec/ivas_mct_dec.c:409:                set16_fx( output_mem_fx, 0, NS2SA( sts[n]->output_Fs, 3125000 ) );
./lib_dec/ivas_mdct_core_dec.c:1364:        Copy( st->hTcxDec->old_synthFB_fx + st->hTcxDec->L_frameTCX - NS2SA( st->output_Fs, PH_ECU_MEM_NS ), st->hTcxDec->synth_history_fx, NS2SA( st->output_Fs, PH_ECU_MEM_NS ) );
./lib_dec/ivas_mdct_core_dec.c:1374:            Copy( st->hHQ_core->old_out_fx + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB_fx + st->hTcxDec->old_synth_lenFB, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) );
./lib_dec/ivas_post_proc.c:162:                tcx_ltp_post32( sts[0], hTcxLtpDec, TCX_20_CORE, output_frame, NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ), output[k], hCPE->output_mem_fx[k], output_q );
./lib_dec/ivas_sba_dec.c:226:        granularity_new = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); /*Q0*/
./lib_dec/ivas_stereo_ica_dec.c:129:    tempMax = NS2SA( output_Fs, L_NCSHIFT_NS );                                           /* Q0 */
./lib_dec/ivas_stereo_ica_dec.c:346:    l_ica_ovl = NS2SA( output_Fs, STEREO_L_TCA_OVLP_NS ); /* Q0 */
./lib_dec/ivas_stereo_ica_dec.c:353:        flat_old = NS2SA( output_Fs, ACELP_LOOK_NS + IVAS_DEC_DELAY_NS - DELAY_CLDFB_NS ); /* Q0 */
./lib_dec/ivas_stereo_ica_dec.c:368:            flat_old = NS2SA( output_Fs, IVAS_DEC_DELAY_NS ); /* Q0 */
./lib_dec/ivas_stereo_ica_dec.c:374:        flat_old = NS2SA( output_Fs, IVAS_DEC_DELAY_NS ); /* Q0 */
./lib_dec/ivas_stereo_ica_dec.c:379:        flat_old = NS2SA( output_Fs, ACELP_LOOK_NS + IVAS_DEC_DELAY_NS ); /* Q0 */
./lib_dec/ivas_stereo_icbwe_dec.c:342:                FOR( ; i < NS2SA( st->output_Fs, FRAME_SIZE_NS ); i++ )
./lib_dec/ivas_stereo_icbwe_dec.c:769:        FOR( ; i < NS2SA( st->output_Fs, FRAME_SIZE_NS ); i++ )
./lib_dec/ivas_stereo_icbwe_dec.c:936:    FOR( ; i < NS2SA( st->output_Fs, FRAME_SIZE_NS ); i++ )
./lib_dec/ivas_stereo_icbwe_dec.c:1018:    memOffset = NS2SA( output_Fs, IVAS_DEC_DELAY_NS - DELAY_BWE_TOTAL_NS ); /* Q0 */
./lib_dec/ivas_stereo_icbwe_dec.c:1073:            set32_fx( hStereoICBWE->memTransitionHB_fx[0], 0, NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) );
./lib_dec/ivas_stereo_icbwe_dec.c:1074:            set32_fx( hStereoICBWE->memTransitionHB_fx[1], 0, NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) );
./lib_dec/ivas_stereo_icbwe_dec.c:1126:            decoderDelay = NS2SA( output_Fs, IVAS_DEC_DELAY_NS ); /* Q0 */
./lib_dec/ivas_stereo_icbwe_dec.c:1132:                icbweOLASize = NS2SA( output_Fs, STEREO_DFT_DELAY_DEC_BWE_NS ); /* Q0 */
./lib_dec/ivas_stereo_icbwe_dec.c:1289:                    v_add_32( output[0], hStereoICBWE->memTransitionHB_fx[hStereoICBWE->prev_refChanIndx_bwe], output[0], NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) );
./lib_dec/ivas_stereo_icbwe_dec.c:1290:                    v_add_32( output[1], hStereoICBWE->memTransitionHB_fx[!hStereoICBWE->prev_refChanIndx_bwe], output[1], NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) );
./lib_dec/ivas_stereo_icbwe_dec.c:1296:                set32_fx( hStereoICBWE->memTransitionHB_fx[0], 0, NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) );
./lib_dec/ivas_stereo_icbwe_dec.c:1297:                set32_fx( hStereoICBWE->memTransitionHB_fx[1], 0, NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) );
./lib_dec/ivas_stereo_icbwe_dec.c:1307:        Word16 delay_tdbwe = NS2SA( output_Fs, DELAY_BWE_TOTAL_NS );
./lib_dec/ivas_stereo_icbwe_dec.c:1313:                output[n][NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) - delay_tdbwe + i] = L_add_sat( output[n][NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ) - delay_tdbwe + i], outputHB[0][i] );
./lib_dec/ivas_stereo_mdct_stereo_dec.c:950:        crossfade_len = NS2SA( hCPE->hCoreCoder[0]->output_Fs, IVAS_DEC_DELAY_NS - DELAY_CLDFB_NS );
./lib_dec/ivas_stereo_mdct_stereo_dec.c:997:        crossfade_len = NS2SA( hCPE->hCoreCoder[0]->output_Fs, DELAY_CLDFB_NS ); /* Q0 */
./lib_dec/ivas_stereo_switching_dec.c:418:            Copy32( hCPE->hStereoDft->buff_LBTCX_mem_fx, hCPE->input_mem_LB_fx[0], NS2SA( i_mult( hCPE->hCoreCoder[0]->last_L_frame, FRAMES_PER_SEC ), STEREO_DFT32MS_OVL_NS ) ); /* Q11 */
./lib_dec/ivas_stereo_switching_dec.c:473:            Copy32( hCPE->input_mem_LB_fx[0], hCPE->hStereoDft->buff_LBTCX_mem_fx, NS2SA( s_min( i_mult( hCPE->hCoreCoder[0]->last_L_frame, FRAMES_PER_SEC ), 16000 ), STEREO_DFT32MS_OVL_NS ) ); /* Q11 */
./lib_dec/ivas_stereo_switching_dec.c:1037:                IF( ( hCPE->prev_synth_chs_fx[1] = (Word32 *) malloc( sizeof( Word32 ) * NS2SA( st->output_Fs, FRAME_SIZE_NS ) ) ) == NULL )
./lib_dec/ivas_stereo_switching_dec.c:1041:                set32_fx( hCPE->prev_synth_chs_fx[1], 0, NS2SA( st->output_Fs, FRAME_SIZE_NS ) );
./lib_dec/ivas_stereo_td_dec.c:683:    tdm_n_OVA = NS2SA( output_Fs, TDM_L_NOVA_NS ); /* Q0 */
./lib_dec/ivas_stereo_td_dec.c:688:        upmixing_delay = NS2SA( output_Fs, ACELP_LOOK_NS + DELAY_BWE_TOTAL_NS ); /* Q0 */
./lib_dec/ivas_stereo_td_dec.c:693:        upmixing_delay = NS2SA( output_Fs, ACELP_LOOK_NS + DELAY_CLDFB_NS ); /* Q0 */
./lib_dec/ivas_stereo_td_dec.c:848:            FOR( i = 0; i < NS2SA( output_Fs, ACELP_LOOK_NS ); i++ )
./lib_dec/updt_dec_fx.c:583:        output_frame = NS2SA( st->output_Fs, FRAME_SIZE_NS );
./lib_dec/updt_dec_fx.c:971:        output_frame = NS2SA( st->output_Fs, FRAME_SIZE_NS );
./lib_enc/core_enc_init_fx.c:529:    hTcxEnc->new_speech_TCX = st->input_buff_fx + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ) - NS2SA( st->input_Fs, DELAY_FIR_RESAMPL_NS );
./lib_enc/fd_cng_enc_fx.c:1534:                    timeDomainOutput[i] = add( timeDomainOutput[i], shr_r( hTcxEnc->old_out_fx[i + NS2SA( stcod->sr_core, N_ZERO_MDCT_NS )], hTcxEnc->Q_old_out ) );
./lib_enc/fd_cng_enc_fx.c:1920:                    timeDomainOutput[i] = add( timeDomainOutput[i], shr_r( hTcxEnc->old_out_fx[i + NS2SA( stcod->sr_core, N_ZERO_MDCT_NS )], hTcxEnc->Q_old_out ) );
./lib_enc/hq_core_enc.c:326:        nz = NS2SA( st->sr_core, N_ZERO_MDCT_NS );
./lib_enc/hq_core_enc_fx.c:294:        nz = NS2SA( st->sr_core, N_ZERO_MDCT_NS );
./lib_enc/init_enc.c:430:            st->input_fx = st->input_buff_fx + add( frame_length, (Word16) NS2SA( st->input_Fs, DELAY_FIR_RESAMPL_NS ) );
./lib_enc/init_enc_fx.c:72:            st_fx->input_fx = st_fx->input_buff_fx + st_fx->input_Fs / FRAMES_PER_SEC + NS2SA( st_fx->input_Fs, DELAY_FIR_RESAMPL_NS );
./lib_enc/ivas_core_pre_proc.c:532:    L_look = NS2SA( sr_core_tmp, ACELP_LOOK_NS ); /* lookahead at other sampling rate (16kHz, 25.6kHz, 32kHz)	Q0*/
./lib_enc/ivas_core_pre_proc.c:744:        lMemRecalc = NS2SA( input_Fs, L_MEM_RECALC_NS );
./lib_enc/ivas_core_pre_proc.c:762:    L_look = NS2SA( sr_core, ACELP_LOOK_NS ); /* lookahead at other sampling rate (16kHz, 25.6kHz, 32kHz) */
./lib_enc/ivas_core_pre_proc.c:772:        new_inp_16k_fx -= NS2SA( sr_core, DELAY_FIR_RESAMPL_NS );
./lib_enc/ivas_core_pre_proc.c:811:            size_modified = modify_Fs_ivas_fx( temp1F_icatdmResampBuf_fx, NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_16k_fx + NS2SA( sr_core, FRAME_SIZE_NS ), sr_core, mem_decim16k_dummy_fx, 0, &Q_tmp, &mem_decim16k_size ); /* Q0 */
./lib_enc/ivas_core_pre_proc.c:812:            Scale_sig( new_inp_16k_fx + NS2SA( sr_core, FRAME_SIZE_NS ), size_modified, negate( Q_tmp ) );                                                                                                                                      /* scaling back to Q_old_inp_16k */
./lib_enc/ivas_core_pre_proc.c:837:                Copy( signal_in_fx - lMemRecalc - length_inp - 2 * NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ), st->mem_decim16k_fx, 2 * NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ) );                                               /* st->q_inp */
./lib_enc/ivas_core_pre_proc.c:848:                size_modified = modify_Fs_ivas_fx( signal_in_fx - lMemRecalc + input_frame, lMemRecalc, input_Fs, new_inp_16k_fx + NS2SA( sr_core, FRAME_SIZE_NS ) - ( lMemRecalc * sr_core ) / st->input_Fs, sr_core, mem_decim16k_dummy_fx, 0, &Q_tmp, &mem_decim16k_size ); /* Q0 */
./lib_enc/ivas_core_pre_proc.c:849:                Scale_sig( new_inp_16k_fx + NS2SA( sr_core, FRAME_SIZE_NS ) - ( lMemRecalc * sr_core ) / st->input_Fs, size_modified, negate( Q_tmp ) );                                                                                                                       /* scaling back to Q_old_inp_16k */
./lib_enc/ivas_core_pre_proc.c:853:            size_modified = modify_Fs_ivas_fx( temp1F_icatdmResampBuf_fx, NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_16k_fx + NS2SA( sr_core, FRAME_SIZE_NS ), sr_core, mem_decim16k_dummy_fx, 0, &Q_tmp, &mem_decim16k_size ); /* Q0 */
./lib_enc/ivas_core_pre_proc.c:854:            Scale_sig( new_inp_16k_fx + NS2SA( sr_core, FRAME_SIZE_NS ), size_modified, negate( Q_tmp ) );                                                                                                                                      /* scaling back to Q_old_inp_16k */
./lib_enc/ivas_core_pre_proc.c:860:        Copy( signal_in_fx + input_frame - NS2SA( input_Fs, L_MEM_RECALC_NS ) - 2 * NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ), st->mem_decim16k_fx, 2 * NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ) ); /* st->q_inp */
./lib_enc/ivas_core_pre_proc_front.c:316:            tmpF[isample] = (int16_t) ( (float) in_buff_temp[isample - NS2SA( st->input_Fs, ACELP_LOOK_NS )] / ( (float) ( 1 << in_q_temp ) ) );
./lib_enc/ivas_core_pre_proc_front.c:600:        Copy( signal_in_fx + sub( input_frame, add( NS2SA_FX2( input_Fs, L_MEM_RECALC_NS ), 2 * NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ) ) ), st->mem_decim_fx, 2 * NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ) ); /* hSCE->hCoreCoder[n]->q_inp */
./lib_enc/ivas_corecoder_enc_reconfig.c:89:        len_inp_memory = add( len_inp_memory, NS2SA( hEncoderConfig->input_Fs, IVAS_FB_ENC_DELAY_NS ) ); /* Q0  */
./lib_enc/ivas_cpe_enc.c:842:        Word16 fir_delay_len = NS2SA( sts[0]->input_Fs, DELAY_FIR_RESAMPL_NS );
./lib_enc/ivas_cpe_enc.c:1375:            IF( ( hCPE->input_mem_fx[n] = (Word16 *) malloc( sizeof( Word16 ) * NS2SA( input_Fs, STEREO_DFT_OVL_NS ) ) ) == NULL )
./lib_enc/ivas_cpe_enc.c:1380:            set16_zero_fx( hCPE->input_mem_fx[n], NS2SA( input_Fs, STEREO_DFT_OVL_NS ) );
./lib_enc/ivas_front_vad.c:420:    hFrontVad->delay_samples = NS2SA( hEncoderConfig->input_Fs, IVAS_FB_ENC_DELAY_NS );
./lib_enc/ivas_lfe_enc.c:540:    IF( ( hLFE->old_wtda_audio_fx = (Word32 *) malloc( sizeof( hLFE->old_wtda_audio_fx[0] ) * NS2SA( input_Fs, IVAS_LFE_FADE_NS ) ) ) == NULL )
./lib_enc/ivas_lfe_enc.c:545:    set32_fx( hLFE->old_wtda_audio_fx, 0, NS2SA( input_Fs, IVAS_LFE_FADE_NS ) );
./lib_enc/ivas_mc_paramupmix_enc.c:204:    fb_cfg->prior_input_length = (int16_t) ( NS2SA( input_Fs, 12000000L ) + NS2SA( input_Fs, DELAY_FB_4_NS / 2 ) - input_frame / 2 - NS2SA( input_Fs, DELAY_FB_1_NS / 2 ) );
./lib_enc/ivas_mcmasa_enc.c:203:    hMcMasa->num_samples_delay_comp = NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS );
./lib_enc/ivas_mcmasa_enc.c:208:    tmp_f = idiv1616( hMcMasa->num_samples_delay_comp, ( NS2SA( input_Fs, DIRAC_SLOT_ENC_NS ) ) );
./lib_enc/ivas_mcmasa_enc.c:212:    IF( GT_16( hMcMasa->num_samples_delay_comp, ( NS2SA( input_Fs, DIRAC_SLOT_ENC_NS ) ) ) )
./lib_enc/ivas_mcmasa_enc.c:218:        hMcMasa->num_samples_delay_comp = i_mult( hMcMasa->num_slots_delay_comp, NS2SA( input_Fs, DIRAC_SLOT_ENC_NS ) );
./lib_enc/ivas_mcmasa_enc.c:244:        IF( ( hMcMasa->delay_buffer_lfe[0] = (Word32 *) malloc( NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) * sizeof( Word32 ) ) ) == NULL )
./lib_enc/ivas_mcmasa_enc.c:248:        set_zero_fx( hMcMasa->delay_buffer_lfe[0], NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) );
./lib_enc/ivas_mcmasa_enc.c:250:        IF( ( hMcMasa->delay_buffer_lfe[1] = (Word32 *) malloc( NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) * sizeof( Word32 ) ) ) == NULL )
./lib_enc/ivas_mcmasa_enc.c:254:        set_zero_fx( hMcMasa->delay_buffer_lfe[1], NS2SA( input_Fs, DELAY_DIRAC_ENC_CMP_NS + DIRAC_SLOT_ENC_NS ) );
./lib_enc/ivas_osba_enc.c:117:    len = NS2SA( st_ivas->hEncoderConfig->input_Fs, IVAS_FB_ENC_DELAY_NS );
./lib_enc/ivas_osba_enc.c:424:    delay_s = NS2SA( input_Fs, IVAS_FB_ENC_DELAY_NS );
./lib_enc/ivas_sce_enc.c:238:    dbgwrite( st->input_fx - NS2SA( st->input_Fs, ACELP_LOOK_NS ), sizeof( Word16 ), input_frame, 1, "res/input_DMX" );
./lib_enc/ivas_stereo_ica_enc.c:1518:        i = NS2SA( sts[0]->input_Fs, L_MEM_RECALC_TBE_NS );
./lib_enc/ivas_stereo_ica_enc.c:1586:    lMemRecalc = NS2SA( input_Fs, L_MEM_RECALC_NS );
./lib_enc/ivas_stereo_ica_enc.c:1588:    lMemRecalc_SCh = NS2SA( input_Fs, L_MEM_RECALC_SCH_NS );
./lib_enc/ivas_stereo_ica_enc.c:2080:        Word16 l_ica_ovl = NS2SA( input_Fs, STEREO_L_TCA_OVLP_NS );
./lib_enc/ivas_stereo_switching_enc.c:825:                sts[0]->cldfbAnaEnc->cldfb_state_fx[i] = L_deposit_h( old_input_signal_pri[input_frame - offset - NS2SA( input_frame * FRAMES_PER_SEC, L_MEM_RECALC_TBE_NS ) + i] ); /* Q16+q_inp */
./lib_enc/ivas_stereo_switching_enc.c:847:                v_multc_fixed_32_16( hCPE->hCoreCoder[1]->old_input_signal_fx + sub( input_frame, add( offset, NS2SA( input_frame * FRAMES_PER_SEC, L_MEM_RECALC_TBE_NS ) ) ), -MAX_32, sts[1]->cldfbAnaEnc->cldfb_state_fx, offset ); /* Q16+q_inp */
./lib_enc/ivas_stereo_switching_enc.c:855:                    sts[1]->cldfbAnaEnc->cldfb_state_fx[i] = L_shr( L_deposit_h( hCPE->hCoreCoder[1]->old_input_signal_fx[input_frame - offset - NS2SA( input_frame * FRAMES_PER_SEC, L_MEM_RECALC_TBE_NS ) + i] ), 5 ); /* Q11+q_inp */
./lib_enc/lib_enc.c:1450:    *delay = NS2SA( hEncoderConfig->input_Fs, get_delay_fx( ENC, hEncoderConfig->input_Fs, hEncoderConfig->ivas_format, NULL ) );
./lib_enc/swb_bwe_enc_fx.c:354:    set16_fx( old_input_fx, 0, add( NS2SA( inner_Fs, DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS ), inner_frame ) );
./lib_enc/swb_bwe_enc_fx.c:368:            Sample_Delay_SWB_BWE = sub( Sample_Delay_SWB_BWE, NS2SA( inner_Fs, DELAY_FIR_RESAMPL_NS ) );
./lib_enc/swb_bwe_enc_fx.c:392:            Sample_Delay_SWB_BWE = sub( Sample_Delay_SWB_BWE, NS2SA( inner_Fs, DELAY_FIR_RESAMPL_NS ) );
./lib_enc/swb_bwe_enc_fx.c:680:    set16_fx( old_input_fx, 0, add( NS2SA( inner_Fs, DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS ), inner_frame ) );
./lib_enc/swb_bwe_enc_fx.c:684:        Sample_Delay_SWB_BWE = NS2SA( inner_Fs, DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS );
./lib_enc/swb_bwe_enc_fx.c:692:        Sample_Delay_SWB_BWE = NS2SA( inner_Fs, DELAY_FD_BWE_ENC_16k_NS + DELAY_FIR_RESAMPL_NS );
./lib_enc/swb_pre_proc_fx.c:761:        delay = NS2SA( st_fx->input_Fs, DELAY_FIR_RESAMPL_NS );