Review usage of Copy_Scale_sig_16_32_DEPREC()
Basic info
Bug description
The scaling-function Copy_Scale_sig_16_32_DEPREC() was marked as deprecated and as far as I remember, the idea was to keep it in EVS legacy code, but not it anymore in "new" IVAS code.
This is a list of locations where Copy_Scale_sig_16_32_DEPREC() is still in use. According to the filenames, there might be IVAS only functions affected. At least the function stereo_mdct_core_dec_fx() (./lib_dec/ivas_stereo_mdct_core_dec_fx.c) is an IVAS-only function...
./lib_dec/FEC_HQ_phase_ecu_fx.c: Copy_Scale_sig_16_32_DEPREC( Tfr16, Tfr32, *Nfft, loctmp ); /*Qin+exp; */ /*Even with limiting loctmp, if Copy_Scale_sig_16_32_no_sat() is used, can lead to 1 difference */
./lib_dec/acelp_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( bpf_error_signal_16fx, bpf_error_signal_fx, st->L_frame, -1 ); // Q_syn-1
./lib_dec/acelp_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( bpf_error_signal_16fx, bpf_error_signal_fx, st->L_frame, -1 ); // Q_syn-1
./lib_dec/acelp_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( synth_fx16, synth_fx, output_frame, 0 );
./lib_dec/core_switching_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx, old_syn_12k8_16k_tmp_32fx, st_fx->L_frame, Q11 - ( -Q1 ) ); // Q(11 - (-1))
./lib_dec/core_switching_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( hTcxDec->syn_Overl, syn_Overl_fx, 320, 15 );
./lib_dec/core_switching_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( hHQ_core->fer_samples_fx, fer_samples_fx, 960, 15 );
./lib_dec/hf_synth_fx.c: Copy_Scale_sig_16_32_DEPREC( exc, exc32, L_FRAME, qdct ); /* Qexc + qdct */
./lib_dec/hf_synth_fx.c: Copy_Scale_sig_16_32_DEPREC( dct_hb, dct_hb32, L_FRAME16k, qhf ); /* qhf + qdct */
./lib_dec/hq_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( wtda_audio_16, wtda_audio, 2 * L_FRAME48k, 12 ); /* q_wtda + 12 */
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( st->previoussynth_fx, st->previoussynth_fx_32, L_FRAME48k, 0 ); // Q0
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( save_hb_synth_16_fx, save_hb_synth_32_fx, output_frame, Q11 ); // Q11
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( output_16_fx[n], output_32_fx[n], output_frame, sub( Q11, st->Q_syn_factor ) ); // Q11
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, Q_output ) ); // Q11
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( st->delay_buf_out_fx, st->delay_buf_out32_fx, ( HQ_DELTA_MAX * HQ_DELAY_COMP ), Q11 ); // Q11
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( hb_synth_16_fx[n], hb_synth_32_fx[n], output_frame, ( Q11 ) ); // Q11
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( hb_synth_16_fx[n], hb_synth_32_fx[n], L_FRAME48k, ( Q11 ) ); // Q11
./lib_dec/ivas_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( st->hb_prev_synth_buffer_fx, hb_prev_synth_buffer_fx_32, 111, 11 ); // Q11
./lib_dec/ivas_cpe_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( hCPE->hCoreCoder[0]->old_pitch_buf_16_fx, hCPE->hCoreCoder[0]->old_pitch_buf_fx, ( ( 2 * NB_SUBFR16k ) + 2 ), 10 ); // Q6->Q16
./lib_dec/ivas_lfe_plc_fx.c: Copy_Scale_sig_16_32_DEPREC( rec_frame_us_16_fx, rec_frame_us_fx, LFE_PLC_RECLEN_48K, 10 ); // Q10 = rec_frame_q + 5
./lib_dec/ivas_mct_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( Aq_fx[cpe_id][n], Aq_fx_32[cpe_id][n], 102, Q16 - Q12 ); // Q16
./lib_dec/ivas_stereo_cng_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( st->hTdCngDec->shb_lpcCNG_fx, shb_shape, LPC_SHB_ORDER + 1, Q15 ); // Q30
./lib_dec/ivas_stereo_dft_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( bpf_error_signal_8k_16, bpf_error_signal_8k, L_FRAME8k, Q15 ); /* Q15 */
./lib_dec/ivas_stereo_mdct_core_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( Aq_fx[ch], Aq_fx_32[ch], ( NB_SUBFR16k + 1 ) * ( M + 1 ), sub( Q16, Q12 ) ); /* Q16 */
./lib_dec/swb_tbe_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx16, old_syn_12k8_16k_fx, st->L_frame, Q11 - ( -Q1 ) ); // Q(11 - (-1))
./lib_dec/swb_tbe_dec_fx.c: Copy_Scale_sig_16_32_DEPREC( lpc_shb_fx, hStereoICBWE->lpSHBRef_fx, LPC_SHB_ORDER + 1, 0 );
./lib_dec/tonalMDCTconcealment_fx.c: Copy_Scale_sig_16_32_DEPREC( hTonalMDCTConc->secondLastPowerSpectrum, powerSpectrum, nSamples, Q15 );
./lib_enc/FEC_enc_fx.c: Copy_Scale_sig_16_32_DEPREC( synth, synth32, L_FRAME16k, 0 ); /* Qsynth */
./lib_enc/cod_tcx_fx.c: Copy_Scale_sig_16_32_DEPREC( A_fx, A_fx32, M + 1, add( norm_s( A_fx[0] ), 2 ) ); // Copying the Word16 A_fx buffer to a temporary Word32 buffer in Q16
./lib_enc/ext_sig_ana_fx.c: Copy_Scale_sig_16_32_DEPREC( tcx20Win, windowed_samples + add( imult1616( frameno, L_FRAME_MAX ), 2 ), add( L_subframe, shr( add( left_overlap, right_overlap ), 1 ) ), negate( q_tcx20Win ) );
./lib_enc/ivas_core_pre_proc_front_fx.c: Copy_Scale_sig_16_32_DEPREC( inp_12k8_fx - M, speech_buff, L_FRAME + M, Q12 ); /* Q_new + 12 */
./lib_enc/ivas_corecoder_enc_reconfig_fx.c: Copy_Scale_sig_16_32_DEPREC( st_ivas->hSCE[k]->hCoreCoder[0]->input_buff_fx, st_ivas->hSCE[k]->hCoreCoder[0]->input_buff32_fx, shl( input_frame, 1 ), Q6 ); /* Q6 + q_com */
./lib_enc/ivas_corecoder_enc_reconfig_fx.c: Copy_Scale_sig_16_32_DEPREC( st_ivas->hSCE[k]->hCoreCoder[0]->input_buff_fx, st_ivas->hSCE[k]->hCoreCoder[0]->input_buff32_fx, L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS ) + L_FRAME48k, Q6 ); /* Q6 + q_com */
./lib_enc/ivas_corecoder_enc_reconfig_fx.c: Copy_Scale_sig_16_32_DEPREC( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff_fx, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff32_fx, shl( input_frame, 1 ), Q6 ); /* Q6 + q_com */
./lib_enc/ivas_corecoder_enc_reconfig_fx.c: Copy_Scale_sig_16_32_DEPREC( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff_fx, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff32_fx, L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS ) + L_FRAME48k, Q6 ); /* Q6 + q_com */
./lib_enc/ivas_stereo_icbwe_enc_fx.c: Copy_Scale_sig_16_32_DEPREC( hStereoICBWE->mem_shb_speech_ref_fx, shb_frame_ref_fx, L_LOOK_16k, 0 ); // Q = 15 - mem_shb_speech_ref_e
./lib_enc/lsf_msvq_ma_enc_fx.c: Copy_Scale_sig_16_32_DEPREC( cb_stage + ( indices[1][c * stages + s] ) * maxn, Tmp, N, 0 );
./lib_enc/swb_pre_proc_fx.c: Copy_Scale_sig_16_32_DEPREC( (const Word16 *) &old_input_fx[0], &old_input_fx_32[0], NS2SA( 48000, DELAY_FD_BWE_ENC_NS + DELAY_FIR_RESAMPL_NS ) + L_FRAME48k, Q15 ); // Q15
./lib_enc/swb_tbe_enc_fx.c: Copy_Scale_sig_16_32_DEPREC( lpc_shb_fx, hStereoICBWE->lpSHBRef_fx, LPC_SHB_ORDER + 1, 0 );