Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ #define FIX_419_ISM_BRATE_SW_DTX /* VA: issue 419: fix ISM Bitrate Switching with dtx */ #define FIX_422 /* FhG: Issue 422: re-introduce fix for noisy speech buffer in ParamISM */ #define ERI_FDCNGVQ_LOW_ROM /* Eri: Contribution #31 Table ROM saving for IVAS FDCNG-VQ modes */ #define ERI_MSVQ_CLEANUP /* Eri: Contribution #31 BE modularization of msvq encoder side DCT21&DCT24 within msvq_enc() */ Loading lib_com/prot.h +2 −1 Original line number Diff line number Diff line Loading @@ -8113,6 +8113,7 @@ void extend_dctN_input( const int16_t n_cols, /* i: number of columns == truncation length */ DCTTYPE dcttype ); /* i: matrix type */ #ifdef ERI_MSVQ_CLEANUP int16_t msvq_stage1_dct_search( /* o : (p_max , best candidate sofar ) */ const float *u, /* i : target */ const int16_t N, /* i : target length and IDCT synthesis length */ Loading Loading @@ -8146,7 +8147,7 @@ int16_t msvq_stage1_dct_recalc_candidates_fdcng_wb( const int16_t maxC_st1, /* i : number of candidates in stage1 */ float *dist_ptr /* i/o: updated MSE vector for stage1 */ ); #endif void PulseResynchronization( const float *src_exc, /* i : Input excitation buffer */ Loading lib_enc/fd_cng_enc.c +1 −6 Original line number Diff line number Diff line Loading @@ -1260,15 +1260,10 @@ void FdCngEncodeDiracMDCTStereoSID( } /* M/S transform on log envelopes */ #ifdef ERI_FDCNGVQ_LOW_ROM convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ E[0] = sum_f( ms_ptr[0], NPART ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ #else convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); E[0] = sum_f( ms_ptr[0], NPART ); #endif /* Quantize M noise shape */ /* Normalize MSVQ input */ Loading lib_enc/lsf_msvq_ma_enc.c +4 −8 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ //void dctT2_N_apply_matrix( const float *input, float *output, const int16_t dct_dim, int16_t fdcngvq_dim, const float *idctT2_24_X_matrixQ16, const int16_t matrix_1st_dim, DCTTYPE dcttype ); #ifdef ERI_FDCNGVQ_LOW_ROM #ifdef ERI_MSVQ_CLEANUP int16_t msvq_stage1_dct_search( Loading Loading @@ -304,7 +304,7 @@ int16_t msvq_stage1_dct_recalc_candidates_fdcng_wb( } #endif #endif /*--------------------------------------------------------------------------* * msvq_enc() Loading Loading @@ -336,7 +336,6 @@ void msvq_enc( float resid_buf[2 * LSFMBEST_MAX * M_MAX], dist_buf[2 * LSFMBEST_MAX], Tmp[M_MAX]; int16_t idx_buf[2 * LSFMBEST_MAX * MAX_VQ_STAGES_USED], parents[LSFMBEST_MAX]; int16_t n, maxn, start; #ifdef ERI_FDCNGVQ_LOW_ROM #ifndef ERI_MSVQ_CLEANUP /* buffers */ float dct_target[FDCNG_VQ_DCT_MAXTRUNC]; Loading Loading @@ -370,8 +369,7 @@ void msvq_enc( assert( maxC <= LSFMBEST_MAX ); assert( ( LSFMBEST_MAX * M_MAX ) > ( N * maxC ) ); /* top of resid_buf is resid[1] and used for stage#1 residuals (input target u), we here reuse resid[0] part of the buffer for stage#1 DCT dynamic RAM needs */ we here reuse resid[0] part of the buffer for stage#1 DCT dynamic RAM needs */ st1_mse_ptr = &( resid_buf[1 * LSFMBEST_MAX * M_MAX] ) - ( levels[0] ); /* reuse top of residual resid[0] scratch RAM for stage1 MSEs */ st1_syn_vec_ptr = &( resid_buf[1 * LSFMBEST_MAX * M_MAX] ) - FDCNG_VQ_MAX_LEN * maxC; /* reuse top of resid[0] scratch RAM for residual */ Loading @@ -380,7 +378,7 @@ void msvq_enc( dcttype = DCT_T2_24_XX; #endif #endif /*----------------------------------------------------------------* * Allocate memory for previous (parent) and current nodes. * Parent node is indexed [0], current node is indexed [1]. Loading Loading @@ -463,7 +461,6 @@ void msvq_enc( dist[1][j] = FLT_MAX; } #ifdef ERI_FDCNGVQ_LOW_ROM #ifdef ERI_MSVQ_CLEANUP if ( !s && applyDCT_flag != 0 ) /* means: m==1 */ { Loading Loading @@ -807,7 +804,6 @@ void msvq_enc( /* update p_max, as it may potentially change, due to the core DCT24 search originally optimizing over longer basis vectors than 21 */ p_max = maximum( dist[1], maxC, NULL ); } #endif #endif m = maxC; } /* for (m=1, s=0; s<stages; s++) */ Loading Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ #define FIX_419_ISM_BRATE_SW_DTX /* VA: issue 419: fix ISM Bitrate Switching with dtx */ #define FIX_422 /* FhG: Issue 422: re-introduce fix for noisy speech buffer in ParamISM */ #define ERI_FDCNGVQ_LOW_ROM /* Eri: Contribution #31 Table ROM saving for IVAS FDCNG-VQ modes */ #define ERI_MSVQ_CLEANUP /* Eri: Contribution #31 BE modularization of msvq encoder side DCT21&DCT24 within msvq_enc() */ Loading
lib_com/prot.h +2 −1 Original line number Diff line number Diff line Loading @@ -8113,6 +8113,7 @@ void extend_dctN_input( const int16_t n_cols, /* i: number of columns == truncation length */ DCTTYPE dcttype ); /* i: matrix type */ #ifdef ERI_MSVQ_CLEANUP int16_t msvq_stage1_dct_search( /* o : (p_max , best candidate sofar ) */ const float *u, /* i : target */ const int16_t N, /* i : target length and IDCT synthesis length */ Loading Loading @@ -8146,7 +8147,7 @@ int16_t msvq_stage1_dct_recalc_candidates_fdcng_wb( const int16_t maxC_st1, /* i : number of candidates in stage1 */ float *dist_ptr /* i/o: updated MSE vector for stage1 */ ); #endif void PulseResynchronization( const float *src_exc, /* i : Input excitation buffer */ Loading
lib_enc/fd_cng_enc.c +1 −6 Original line number Diff line number Diff line Loading @@ -1260,15 +1260,10 @@ void FdCngEncodeDiracMDCTStereoSID( } /* M/S transform on log envelopes */ #ifdef ERI_FDCNGVQ_LOW_ROM convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ E[0] = sum_f( ms_ptr[0], NPART ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ #else convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); E[0] = sum_f( ms_ptr[0], NPART ); #endif /* Quantize M noise shape */ /* Normalize MSVQ input */ Loading
lib_enc/lsf_msvq_ma_enc.c +4 −8 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ //void dctT2_N_apply_matrix( const float *input, float *output, const int16_t dct_dim, int16_t fdcngvq_dim, const float *idctT2_24_X_matrixQ16, const int16_t matrix_1st_dim, DCTTYPE dcttype ); #ifdef ERI_FDCNGVQ_LOW_ROM #ifdef ERI_MSVQ_CLEANUP int16_t msvq_stage1_dct_search( Loading Loading @@ -304,7 +304,7 @@ int16_t msvq_stage1_dct_recalc_candidates_fdcng_wb( } #endif #endif /*--------------------------------------------------------------------------* * msvq_enc() Loading Loading @@ -336,7 +336,6 @@ void msvq_enc( float resid_buf[2 * LSFMBEST_MAX * M_MAX], dist_buf[2 * LSFMBEST_MAX], Tmp[M_MAX]; int16_t idx_buf[2 * LSFMBEST_MAX * MAX_VQ_STAGES_USED], parents[LSFMBEST_MAX]; int16_t n, maxn, start; #ifdef ERI_FDCNGVQ_LOW_ROM #ifndef ERI_MSVQ_CLEANUP /* buffers */ float dct_target[FDCNG_VQ_DCT_MAXTRUNC]; Loading Loading @@ -370,8 +369,7 @@ void msvq_enc( assert( maxC <= LSFMBEST_MAX ); assert( ( LSFMBEST_MAX * M_MAX ) > ( N * maxC ) ); /* top of resid_buf is resid[1] and used for stage#1 residuals (input target u), we here reuse resid[0] part of the buffer for stage#1 DCT dynamic RAM needs */ we here reuse resid[0] part of the buffer for stage#1 DCT dynamic RAM needs */ st1_mse_ptr = &( resid_buf[1 * LSFMBEST_MAX * M_MAX] ) - ( levels[0] ); /* reuse top of residual resid[0] scratch RAM for stage1 MSEs */ st1_syn_vec_ptr = &( resid_buf[1 * LSFMBEST_MAX * M_MAX] ) - FDCNG_VQ_MAX_LEN * maxC; /* reuse top of resid[0] scratch RAM for residual */ Loading @@ -380,7 +378,7 @@ void msvq_enc( dcttype = DCT_T2_24_XX; #endif #endif /*----------------------------------------------------------------* * Allocate memory for previous (parent) and current nodes. * Parent node is indexed [0], current node is indexed [1]. Loading Loading @@ -463,7 +461,6 @@ void msvq_enc( dist[1][j] = FLT_MAX; } #ifdef ERI_FDCNGVQ_LOW_ROM #ifdef ERI_MSVQ_CLEANUP if ( !s && applyDCT_flag != 0 ) /* means: m==1 */ { Loading Loading @@ -807,7 +804,6 @@ void msvq_enc( /* update p_max, as it may potentially change, due to the core DCT24 search originally optimizing over longer basis vectors than 21 */ p_max = maximum( dist[1], maxC, NULL ); } #endif #endif m = maxC; } /* for (m=1, s=0; s<stages; s++) */ Loading