Loading lib_com/ivas_prot_fx.h +1 −1 Original line number Diff line number Diff line Loading @@ -4746,7 +4746,7 @@ ivas_error stereo_memory_enc_fx( void stereo_switching_enc_fx( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ Word16 old_input_signal_pri[], /* i : old input signal of primary channel */ Word32 old_input_signal_pri[], /* i : old input signal of primary channel */ const Word16 input_frame, /* i : input frame length */ const Word16 q_inp ); Loading lib_enc/init_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -1421,7 +1421,10 @@ ivas_error init_encoder_ivas_fx( set32_fx( st->input_buff32_fx, 0, add( L_FRAME48k, add( L_FRAME48k, NS2SA( 48000, DELAY_FIR_RESAMPL_NS ) ) ) ); st->q_inp32 = Q31; move16(); st->q_old_inp32 = Q31; move16(); st->old_input_signal_fx = st->input_buff_fx; st->old_input_signal32_fx = st->input_buff32_fx; /* st->input_Fs / FRAMES_PER_SEC */ Word16 frame_length = extract_l( Mpy_32_32( st->input_Fs, ONE_BY_FRAMES_PER_SEC_Q31 ) ); Loading @@ -1432,7 +1435,8 @@ ivas_error init_encoder_ivas_fx( } ELSE { st->input32_fx = st->input_buff32_fx + Mpy_32_32( st->input_Fs, 42949673 ) /* 1/50 in Q31*/; // st->input_Fs / FRAMES_PER_SEC // st->input32_fx = st->input_buff32_fx + Mpy_32_32( st->input_Fs, 42949673 ) /* 1/50 in Q31*/; // st->input_Fs / FRAMES_PER_SEC st->input32_fx = st->input_buff32_fx + frame_length; st->input_fx = st->input_buff_fx + frame_length; } } Loading lib_enc/ivas_corecoder_enc_reconfig_fx.c +54 −22 Original line number Diff line number Diff line Loading @@ -213,24 +213,37 @@ ivas_error ivas_corecoder_enc_reconfig_fx( move16(); } Word16 q_com_sce = Q15; Word16 q_com_sce = Q15, q_com_sce32 = Q31; move16(); move16(); Word16 q_com_cpe = Q15, q_com_cpe32 = Q31; move16(); Word16 q_com_cpe = Q15; move16(); IF( nSCE_old > 0 ) { FOR( k = 0; k < nSCE_old; k++ ) { shift = sub( getScaleFactor16( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame ), Q1 ); Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp + shift */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp, shift ); move16(); q_com_sce = s_min( q_com_sce, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp ); shift = sub( getScaleFactor16( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_inp + shift */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_inp, shift ); move16(); q_com_sce = s_min( q_com_sce, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp ); shift = sub( getScaleFactor32( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal32_fx, input_frame ), Q1 ); scale_sig32( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal32_fx, input_frame, shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32 = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32, shift ); move16(); q_com_sce32 = s_min( q_com_sce32, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32 ); shift = sub( getScaleFactor32( st_ivas->hSCE[k]->hCoreCoder[0]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); scale_sig32( st_ivas->hSCE[k]->hCoreCoder[0]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32 = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32, shift ); move16(); q_com_sce32 = s_min( q_com_sce32, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32 ); } } Loading @@ -242,15 +255,26 @@ ivas_error ivas_corecoder_enc_reconfig_fx( FOR( n = 0; n < CPE_CHANNELS; n++ ) { shift = sub( getScaleFactor16( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame ), Q1 ); Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp + shift */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp, shift ); move16(); q_com_cpe = s_min( q_com_cpe, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp ); shift = sub( getScaleFactor16( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp + shift */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp, shift ); move16(); q_com_cpe = s_min( q_com_cpe, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp ); shift = sub( getScaleFactor32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal32_fx, input_frame ), Q1 ); scale_sig32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal32_fx, input_frame, shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32, shift ); move16(); q_com_cpe32 = s_min( q_com_cpe32, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 ); shift = sub( getScaleFactor32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); scale_sig32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32, shift ); move16(); q_com_cpe32 = s_min( q_com_cpe32, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 ); } } } Loading @@ -259,14 +283,16 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { FOR( k = 0; k < nSCE_old; k++ ) { Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp ) ); /* q_com */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp ) ); /* q_com */ st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp = q_com; move16(); Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp ) ); /* q_com */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp ) ); /* q_com */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp = q_com; move16(); 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 */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32 = add( Q6, q_com ); st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32 = add( Q6, q_com ); move16(); move16(); } } Loading @@ -277,14 +303,16 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { FOR( n = 0; n < CPE_CHANNELS; n++ ) { Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp ) ); /* q_com */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp ) ); /* q_com */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp = q_com; move16(); Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp ) ); /* q_com */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp ) ); /* q_com */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp = q_com; move16(); 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 */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 = add( Q6, q_com ); st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 = add( Q6, q_com ); move16(); move16(); } } Loading @@ -301,7 +329,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { set32_fx( input_buff_fx[0], 0, len_inp_memory ); Copy32( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, input_buff_fx[0], len_inp_memory ); /* st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 */ q_input_buff[0] = st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32; q_input_buff[0] = st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32; move16(); } Loading @@ -311,7 +339,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( nCPE_old > 0 ) { Copy32( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, input_buff_fx[n + 1], len_inp_memory ); /* st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 */ q_input_buff[n + 1] = st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32; q_input_buff[n + 1] = st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32; move16(); } } Loading @@ -334,7 +362,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( GT_16( n_CoreCoder_existing, sce_id ) ) { Copy32( st_ivas->hSCE[sce_id]->hCoreCoder[0]->input_buff32_fx, input_buff_fx[sce_id], len_inp_memory ); /* st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_inp32 */ q_input_buff[sce_id] = st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_inp32; q_input_buff[sce_id] = st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_old_inp32; move16(); } destroy_sce_enc_fx( st_ivas->hSCE[sce_id], ( EQ_16( st_ivas->hEncoderConfig->element_mode_init, EVS_MONO ) && !st_ivas->hEncoderConfig->stereo_dmx_evs ) ); Loading @@ -349,7 +377,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( n_CoreCoder_existing > cpe_id * CPE_CHANNELS + n ) { Copy32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff32_fx, input_buff_fx[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n], len_inp_memory ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 */ q_input_buff[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n] = st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32; q_input_buff[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n] = st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32; move16(); } } Loading Loading @@ -398,7 +426,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( GT_16( n_CoreCoder_existing, sce_id ) && NE_16( hEncoderConfig->ivas_format, MASA_ISM_FORMAT ) ) { Copy32( input_buff_fx[sce_id], st_ivas->hSCE[sce_id]->hCoreCoder[0]->input_buff32_fx, len_inp_memory ); /* q_input_buff[sce_id] */ st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_inp32 = q_input_buff[sce_id]; st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_old_inp32 = q_input_buff[sce_id]; move16(); } test(); Loading Loading @@ -475,7 +503,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( GT_16( n_CoreCoder_existing, add( i_mult( cpe_id, CPE_CHANNELS ), n ) ) ) { Copy32( input_buff_fx[n], st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff32_fx, len_inp_memory ); /* q_input_buff */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 = q_input_buff[n]; st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 = q_input_buff[n]; move16(); } } Loading Loading @@ -560,7 +588,9 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( st_ivas->nSCE ) { Copy32( input_buff_fx[0], st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, len_inp_memory ); /* q_input_buff */ st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 = q_input_buff[0]; // st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 = q_input_buff[0]; st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32 = q_input_buff[0]; move16(); move16(); } Loading @@ -569,7 +599,9 @@ ivas_error ivas_corecoder_enc_reconfig_fx( FOR( n = 0; n < CPE_CHANNELS; n++ ) { Copy32( input_buff_fx[n + 1], st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, len_inp_memory ); /* q_input_buff */ st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 = q_input_buff[n + 1]; // st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 = q_input_buff[n + 1]; st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32 = q_input_buff[n + 1]; move16(); move16(); } } Loading @@ -579,7 +611,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { IF( NE_16( input_frame, len_inp_memory ) ) { Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp = 0; move16(); Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx + sub( len_inp_memory, input_frame ), st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx + sub( len_inp_memory, input_frame ), sub( len_inp_memory, input_frame ), sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Loading @@ -588,7 +620,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( } ELSE { Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp = 0; move16(); } Loading @@ -600,7 +632,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { IF( NE_16( input_frame, len_inp_memory ) ) { Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp = 0; move16(); Loading @@ -610,7 +642,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( } ELSE { Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp = 0; move16(); } Loading lib_enc/ivas_cpe_enc_fx.c +92 −89 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_enc/ivas_ism_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -167,6 +167,8 @@ ivas_error ivas_ism_enc_fx( *-----------------------------------------------------------------*/ Word16 Q_min = s_min( q_data, add( st->q_inp32, L_norm_arr( st->input32_fx - input_frame, input_frame ) ) ); scale_sig32( st->input32_fx - input_frame, input_frame, sub( Q_min, st->q_inp32 ) ); st->q_old_inp32 = Q_min; move16(); Copy_Scale_sig32( data[sce_id], st->input32_fx, input_frame, sub( Q_min, q_data ) ); // Q(Q_min) st->q_inp32 = Q_min; move16(); Loading Loading @@ -474,7 +476,9 @@ ivas_error ivas_ism_enc_fx( Copy( st->input_fx, st->old_input_signal_fx, input_frame ); /* st->q_inp */ st->q_old_inp = st->q_inp; move16(); Copy32( st->input32_fx, st->input32_fx - input_frame, input_frame ); /* st->q_inp32 */ Copy32( st->input32_fx, st->old_input_signal32_fx, input_frame ); /* st->q_inp32 */ st->q_old_inp32 = st->q_inp32; move16(); hSCE->last_element_brate = hSCE->element_brate; /* Q0 */ move32(); Loading Loading
lib_com/ivas_prot_fx.h +1 −1 Original line number Diff line number Diff line Loading @@ -4746,7 +4746,7 @@ ivas_error stereo_memory_enc_fx( void stereo_switching_enc_fx( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ Word16 old_input_signal_pri[], /* i : old input signal of primary channel */ Word32 old_input_signal_pri[], /* i : old input signal of primary channel */ const Word16 input_frame, /* i : input frame length */ const Word16 q_inp ); Loading
lib_enc/init_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -1421,7 +1421,10 @@ ivas_error init_encoder_ivas_fx( set32_fx( st->input_buff32_fx, 0, add( L_FRAME48k, add( L_FRAME48k, NS2SA( 48000, DELAY_FIR_RESAMPL_NS ) ) ) ); st->q_inp32 = Q31; move16(); st->q_old_inp32 = Q31; move16(); st->old_input_signal_fx = st->input_buff_fx; st->old_input_signal32_fx = st->input_buff32_fx; /* st->input_Fs / FRAMES_PER_SEC */ Word16 frame_length = extract_l( Mpy_32_32( st->input_Fs, ONE_BY_FRAMES_PER_SEC_Q31 ) ); Loading @@ -1432,7 +1435,8 @@ ivas_error init_encoder_ivas_fx( } ELSE { st->input32_fx = st->input_buff32_fx + Mpy_32_32( st->input_Fs, 42949673 ) /* 1/50 in Q31*/; // st->input_Fs / FRAMES_PER_SEC // st->input32_fx = st->input_buff32_fx + Mpy_32_32( st->input_Fs, 42949673 ) /* 1/50 in Q31*/; // st->input_Fs / FRAMES_PER_SEC st->input32_fx = st->input_buff32_fx + frame_length; st->input_fx = st->input_buff_fx + frame_length; } } Loading
lib_enc/ivas_corecoder_enc_reconfig_fx.c +54 −22 Original line number Diff line number Diff line Loading @@ -213,24 +213,37 @@ ivas_error ivas_corecoder_enc_reconfig_fx( move16(); } Word16 q_com_sce = Q15; Word16 q_com_sce = Q15, q_com_sce32 = Q31; move16(); move16(); Word16 q_com_cpe = Q15, q_com_cpe32 = Q31; move16(); Word16 q_com_cpe = Q15; move16(); IF( nSCE_old > 0 ) { FOR( k = 0; k < nSCE_old; k++ ) { shift = sub( getScaleFactor16( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame ), Q1 ); Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp + shift */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp, shift ); move16(); q_com_sce = s_min( q_com_sce, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp ); shift = sub( getScaleFactor16( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_inp + shift */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_inp, shift ); move16(); q_com_sce = s_min( q_com_sce, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp ); shift = sub( getScaleFactor32( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal32_fx, input_frame ), Q1 ); scale_sig32( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal32_fx, input_frame, shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32 = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32, shift ); move16(); q_com_sce32 = s_min( q_com_sce32, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32 ); shift = sub( getScaleFactor32( st_ivas->hSCE[k]->hCoreCoder[0]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); scale_sig32( st_ivas->hSCE[k]->hCoreCoder[0]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hSCE[k]->hCoreCoder[0]->q_inp + shift */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32 = add( st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32, shift ); move16(); q_com_sce32 = s_min( q_com_sce32, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32 ); } } Loading @@ -242,15 +255,26 @@ ivas_error ivas_corecoder_enc_reconfig_fx( FOR( n = 0; n < CPE_CHANNELS; n++ ) { shift = sub( getScaleFactor16( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame ), Q1 ); Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp + shift */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp, shift ); move16(); q_com_cpe = s_min( q_com_cpe, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp ); shift = sub( getScaleFactor16( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp + shift */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp, shift ); move16(); q_com_cpe = s_min( q_com_cpe, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp ); shift = sub( getScaleFactor32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal32_fx, input_frame ), Q1 ); scale_sig32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal32_fx, input_frame, shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32, shift ); move16(); q_com_cpe32 = s_min( q_com_cpe32, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 ); shift = sub( getScaleFactor32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ) ), Q1 ); scale_sig32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input32_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), shift ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp + shift */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 = add( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32, shift ); move16(); q_com_cpe32 = s_min( q_com_cpe32, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 ); } } } Loading @@ -259,14 +283,16 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { FOR( k = 0; k < nSCE_old; k++ ) { Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp ) ); /* q_com */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp ) ); /* q_com */ st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp = q_com; move16(); Scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp ) ); /* q_com */ scale_sig( st_ivas->hSCE[k]->hCoreCoder[0]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hSCE[k]->hCoreCoder[0]->q_inp ) ); /* q_com */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp = q_com; move16(); 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 */ st_ivas->hSCE[k]->hCoreCoder[0]->q_inp32 = add( Q6, q_com ); st_ivas->hSCE[k]->hCoreCoder[0]->q_old_inp32 = add( Q6, q_com ); move16(); move16(); } } Loading @@ -277,14 +303,16 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { FOR( n = 0; n < CPE_CHANNELS; n++ ) { Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp ) ); /* q_com */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->old_input_signal_fx, input_frame, sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp ) ); /* q_com */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp = q_com; move16(); Scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp ) ); /* q_com */ scale_sig( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_fx, sub( L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), input_frame ), sub( q_com, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp ) ); /* q_com */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp = q_com; move16(); 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 */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 = add( Q6, q_com ); st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 = add( Q6, q_com ); move16(); move16(); } } Loading @@ -301,7 +329,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { set32_fx( input_buff_fx[0], 0, len_inp_memory ); Copy32( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, input_buff_fx[0], len_inp_memory ); /* st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 */ q_input_buff[0] = st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32; q_input_buff[0] = st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32; move16(); } Loading @@ -311,7 +339,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( nCPE_old > 0 ) { Copy32( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, input_buff_fx[n + 1], len_inp_memory ); /* st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 */ q_input_buff[n + 1] = st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32; q_input_buff[n + 1] = st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32; move16(); } } Loading @@ -334,7 +362,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( GT_16( n_CoreCoder_existing, sce_id ) ) { Copy32( st_ivas->hSCE[sce_id]->hCoreCoder[0]->input_buff32_fx, input_buff_fx[sce_id], len_inp_memory ); /* st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_inp32 */ q_input_buff[sce_id] = st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_inp32; q_input_buff[sce_id] = st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_old_inp32; move16(); } destroy_sce_enc_fx( st_ivas->hSCE[sce_id], ( EQ_16( st_ivas->hEncoderConfig->element_mode_init, EVS_MONO ) && !st_ivas->hEncoderConfig->stereo_dmx_evs ) ); Loading @@ -349,7 +377,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( n_CoreCoder_existing > cpe_id * CPE_CHANNELS + n ) { Copy32( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff32_fx, input_buff_fx[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n], len_inp_memory ); /* st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 */ q_input_buff[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n] = st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32; q_input_buff[( cpe_id - st_ivas->nCPE ) * CPE_CHANNELS + n] = st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32; move16(); } } Loading Loading @@ -398,7 +426,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( GT_16( n_CoreCoder_existing, sce_id ) && NE_16( hEncoderConfig->ivas_format, MASA_ISM_FORMAT ) ) { Copy32( input_buff_fx[sce_id], st_ivas->hSCE[sce_id]->hCoreCoder[0]->input_buff32_fx, len_inp_memory ); /* q_input_buff[sce_id] */ st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_inp32 = q_input_buff[sce_id]; st_ivas->hSCE[sce_id]->hCoreCoder[0]->q_old_inp32 = q_input_buff[sce_id]; move16(); } test(); Loading Loading @@ -475,7 +503,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( GT_16( n_CoreCoder_existing, add( i_mult( cpe_id, CPE_CHANNELS ), n ) ) ) { Copy32( input_buff_fx[n], st_ivas->hCPE[cpe_id]->hCoreCoder[n]->input_buff32_fx, len_inp_memory ); /* q_input_buff */ st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_inp32 = q_input_buff[n]; st_ivas->hCPE[cpe_id]->hCoreCoder[n]->q_old_inp32 = q_input_buff[n]; move16(); } } Loading Loading @@ -560,7 +588,9 @@ ivas_error ivas_corecoder_enc_reconfig_fx( IF( st_ivas->nSCE ) { Copy32( input_buff_fx[0], st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, len_inp_memory ); /* q_input_buff */ st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 = q_input_buff[0]; // st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 = q_input_buff[0]; st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32 = q_input_buff[0]; move16(); move16(); } Loading @@ -569,7 +599,9 @@ ivas_error ivas_corecoder_enc_reconfig_fx( FOR( n = 0; n < CPE_CHANNELS; n++ ) { Copy32( input_buff_fx[n + 1], st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, len_inp_memory ); /* q_input_buff */ st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 = q_input_buff[n + 1]; // st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 = q_input_buff[n + 1]; st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32 = q_input_buff[n + 1]; move16(); move16(); } } Loading @@ -579,7 +611,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { IF( NE_16( input_frame, len_inp_memory ) ) { Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp = 0; move16(); Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx + sub( len_inp_memory, input_frame ), st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx + sub( len_inp_memory, input_frame ), sub( len_inp_memory, input_frame ), sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Loading @@ -588,7 +620,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( } ELSE { Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hSCE[0]->hCoreCoder[0]->input_buff32_fx, st_ivas->hSCE[0]->hCoreCoder[0]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hSCE[0]->hCoreCoder[0]->q_old_inp = 0; move16(); } Loading @@ -600,7 +632,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( { IF( NE_16( input_frame, len_inp_memory ) ) { Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp = 0; move16(); Loading @@ -610,7 +642,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( } ELSE { Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_inp32 ) ); // Q(q_data_fx) -> Q(q_input) Copy_Scale_sig32_16( st_ivas->hCPE[0]->hCoreCoder[n]->input_buff32_fx, st_ivas->hCPE[0]->hCoreCoder[n]->input_buff_fx, len_inp_memory, sub( add( Q16, 0 ), st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp32 ) ); // Q(q_data_fx) -> Q(q_input) st_ivas->hCPE[0]->hCoreCoder[n]->q_old_inp = 0; move16(); } Loading
lib_enc/ivas_cpe_enc_fx.c +92 −89 File changed.Preview size limit exceeded, changes collapsed. Show changes
lib_enc/ivas_ism_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -167,6 +167,8 @@ ivas_error ivas_ism_enc_fx( *-----------------------------------------------------------------*/ Word16 Q_min = s_min( q_data, add( st->q_inp32, L_norm_arr( st->input32_fx - input_frame, input_frame ) ) ); scale_sig32( st->input32_fx - input_frame, input_frame, sub( Q_min, st->q_inp32 ) ); st->q_old_inp32 = Q_min; move16(); Copy_Scale_sig32( data[sce_id], st->input32_fx, input_frame, sub( Q_min, q_data ) ); // Q(Q_min) st->q_inp32 = Q_min; move16(); Loading Loading @@ -474,7 +476,9 @@ ivas_error ivas_ism_enc_fx( Copy( st->input_fx, st->old_input_signal_fx, input_frame ); /* st->q_inp */ st->q_old_inp = st->q_inp; move16(); Copy32( st->input32_fx, st->input32_fx - input_frame, input_frame ); /* st->q_inp32 */ Copy32( st->input32_fx, st->old_input_signal32_fx, input_frame ); /* st->q_inp32 */ st->q_old_inp32 = st->q_inp32; move16(); hSCE->last_element_brate = hSCE->element_brate; /* Q0 */ move32(); Loading