Loading lib_com/ivas_pca_tools.c +19 −22 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ void cov_subfr( static void house_refl( float *px, const float *px, const int16_t sizex, float *pu, float *normu ) Loading Loading @@ -254,8 +254,9 @@ static void house_qr( * * Compute eigenvalue decomposition by QR method *---------------------------------------------------------------------*/ void eig_qr( float *A, const float *A, const int16_t num_iter, float *EV, float *Vals, Loading Loading @@ -389,6 +390,7 @@ void exhst_4x4( * * Convert 4D matrix -> double quaternion *---------------------------------------------------------------------*/ void mat2dquat( const float *a, float *ql, Loading Loading @@ -481,6 +483,7 @@ void mat2dquat( * * Convert double quaternion -> 4D matrix *---------------------------------------------------------------------*/ void dquat2mat( const float *ql, const float *qr, Loading Loading @@ -543,6 +546,7 @@ void dquat2mat( * * Shortest path verification (prior to quaternion interpolation) *---------------------------------------------------------------------*/ void quat_shortestpath( const float *q00, float *q01, Loading Loading @@ -600,7 +604,8 @@ void quat_shortestpath( * Compute determinant of 4D matrix - brute-force version *---------------------------------------------------------------------*/ float mat_det4( float *m ) float mat_det4( const float *m ) { float d; Loading Loading @@ -635,17 +640,14 @@ float mat_det4( float *m ) static void norm_quat( float *q ) { float norm_q = 0.0f; float norm_q; int16_t i; for ( i = 0; i < 4; i++ ) { norm_q += q[i] * q[i]; } norm_q = dotp( q, q, IVAS_PCA_INTERP ); norm_q = 1 / sqrtf( norm_q ); norm_q = 1 / sqrtf( norm_q ); // VE: TBV: possible division by 0 for ( i = 0; i < 4; i++ ) for ( i = 0; i < IVAS_PCA_INTERP; i++ ) { q[i] *= norm_q; } Loading @@ -662,7 +664,7 @@ static void quat_nlerp_preproc( { int16_t i; for ( i = 0; i < 4; i++ ) for ( i = 0; i < IVAS_PCA_INTERP; i++ ) { q_slerp[i] = alpha * q0[i] + ( 1.0f - alpha ) * q1[i]; } Loading Loading @@ -703,14 +705,8 @@ static float acos_clip( { float ph; if ( v > 1.0 ) { v = 1.0; } if ( v < -1.0 ) { v = -1.0; } check_bounds( &v, -1.0f, 1.0f ); ph = acosf( v ); return ph; Loading Loading @@ -835,7 +831,7 @@ static void q_ang_2surv( static void q_ang_circ( float a, const float a, const int16_t N, float *a_q, int16_t *index ) Loading Loading @@ -881,11 +877,12 @@ static void q_ang_circ( static int16_t sel_q( const float *q, float *q_cand, const float *q_cand, const int16_t n ) { int16_t i, i_min, j; float d, d_min, *p, temp; float d, d_min, temp; const float *p; i_min = -1; d_min = 1e30f; Loading lib_com/ivas_prot.h +3 −3 Original line number Diff line number Diff line Loading @@ -4147,7 +4147,7 @@ void ivas_pca_read_bits( PCA_DEC_STATE *hPCA /* i/o: PCA encoder structure */ ); void ivas_pca_dec_int( void ivas_pca_dec_init( PCA_DEC_STATE *hPCA /* i/o: PCA decoder structure */ ); Loading Loading @@ -4176,7 +4176,7 @@ void cov_subfr( ); void eig_qr( float *A, const float *A, const int16_t num_iter, float *EV, float *Vals, const int16_t n Loading @@ -4189,7 +4189,7 @@ void exhst_4x4( ); float mat_det4( float *m const float *m ); /* quaternion utilities */ Loading lib_dec/ivas_pca_dec.c +3 −3 Original line number Diff line number Diff line Loading @@ -167,12 +167,12 @@ static void pca_dec_update_dquat( /*------------------------------------------------------------------------- * ivas_pca_dec_int() * ivas_pca_dec_init() * * Initialize PCA decoder *------------------------------------------------------------------------*/ void ivas_pca_dec_int( void ivas_pca_dec_init( PCA_DEC_STATE *hPCA /* i/o: PCA decoder structure */ ) { Loading Loading @@ -227,7 +227,7 @@ void ivas_pca_dec( float pcm_out[][L_FRAME48k] /* o : output audio channels */ ) { float ql[4], qr[4]; float ql[IVAS_PCA_INTERP], qr[IVAS_PCA_INTERP]; int16_t pca_bypass; mvr2r( &hPCA->mem_eigVec_interp[IVAS_PCA_N_SLOTS * 16], hPCA->mem_eigVec_interp, IVAS_PCA_DELAY_CMP * 16 ); Loading lib_dec/ivas_spar_foa_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ ivas_error ivas_spar_foa_dec_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for PCA decoder" ); } ivas_pca_dec_int( pState->hPCA ); ivas_pca_dec_init( pState->hPCA ); } /* mixer_mat intitialization */ Loading Loading
lib_com/ivas_pca_tools.c +19 −22 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ void cov_subfr( static void house_refl( float *px, const float *px, const int16_t sizex, float *pu, float *normu ) Loading Loading @@ -254,8 +254,9 @@ static void house_qr( * * Compute eigenvalue decomposition by QR method *---------------------------------------------------------------------*/ void eig_qr( float *A, const float *A, const int16_t num_iter, float *EV, float *Vals, Loading Loading @@ -389,6 +390,7 @@ void exhst_4x4( * * Convert 4D matrix -> double quaternion *---------------------------------------------------------------------*/ void mat2dquat( const float *a, float *ql, Loading Loading @@ -481,6 +483,7 @@ void mat2dquat( * * Convert double quaternion -> 4D matrix *---------------------------------------------------------------------*/ void dquat2mat( const float *ql, const float *qr, Loading Loading @@ -543,6 +546,7 @@ void dquat2mat( * * Shortest path verification (prior to quaternion interpolation) *---------------------------------------------------------------------*/ void quat_shortestpath( const float *q00, float *q01, Loading Loading @@ -600,7 +604,8 @@ void quat_shortestpath( * Compute determinant of 4D matrix - brute-force version *---------------------------------------------------------------------*/ float mat_det4( float *m ) float mat_det4( const float *m ) { float d; Loading Loading @@ -635,17 +640,14 @@ float mat_det4( float *m ) static void norm_quat( float *q ) { float norm_q = 0.0f; float norm_q; int16_t i; for ( i = 0; i < 4; i++ ) { norm_q += q[i] * q[i]; } norm_q = dotp( q, q, IVAS_PCA_INTERP ); norm_q = 1 / sqrtf( norm_q ); norm_q = 1 / sqrtf( norm_q ); // VE: TBV: possible division by 0 for ( i = 0; i < 4; i++ ) for ( i = 0; i < IVAS_PCA_INTERP; i++ ) { q[i] *= norm_q; } Loading @@ -662,7 +664,7 @@ static void quat_nlerp_preproc( { int16_t i; for ( i = 0; i < 4; i++ ) for ( i = 0; i < IVAS_PCA_INTERP; i++ ) { q_slerp[i] = alpha * q0[i] + ( 1.0f - alpha ) * q1[i]; } Loading Loading @@ -703,14 +705,8 @@ static float acos_clip( { float ph; if ( v > 1.0 ) { v = 1.0; } if ( v < -1.0 ) { v = -1.0; } check_bounds( &v, -1.0f, 1.0f ); ph = acosf( v ); return ph; Loading Loading @@ -835,7 +831,7 @@ static void q_ang_2surv( static void q_ang_circ( float a, const float a, const int16_t N, float *a_q, int16_t *index ) Loading Loading @@ -881,11 +877,12 @@ static void q_ang_circ( static int16_t sel_q( const float *q, float *q_cand, const float *q_cand, const int16_t n ) { int16_t i, i_min, j; float d, d_min, *p, temp; float d, d_min, temp; const float *p; i_min = -1; d_min = 1e30f; Loading
lib_com/ivas_prot.h +3 −3 Original line number Diff line number Diff line Loading @@ -4147,7 +4147,7 @@ void ivas_pca_read_bits( PCA_DEC_STATE *hPCA /* i/o: PCA encoder structure */ ); void ivas_pca_dec_int( void ivas_pca_dec_init( PCA_DEC_STATE *hPCA /* i/o: PCA decoder structure */ ); Loading Loading @@ -4176,7 +4176,7 @@ void cov_subfr( ); void eig_qr( float *A, const float *A, const int16_t num_iter, float *EV, float *Vals, const int16_t n Loading @@ -4189,7 +4189,7 @@ void exhst_4x4( ); float mat_det4( float *m const float *m ); /* quaternion utilities */ Loading
lib_dec/ivas_pca_dec.c +3 −3 Original line number Diff line number Diff line Loading @@ -167,12 +167,12 @@ static void pca_dec_update_dquat( /*------------------------------------------------------------------------- * ivas_pca_dec_int() * ivas_pca_dec_init() * * Initialize PCA decoder *------------------------------------------------------------------------*/ void ivas_pca_dec_int( void ivas_pca_dec_init( PCA_DEC_STATE *hPCA /* i/o: PCA decoder structure */ ) { Loading Loading @@ -227,7 +227,7 @@ void ivas_pca_dec( float pcm_out[][L_FRAME48k] /* o : output audio channels */ ) { float ql[4], qr[4]; float ql[IVAS_PCA_INTERP], qr[IVAS_PCA_INTERP]; int16_t pca_bypass; mvr2r( &hPCA->mem_eigVec_interp[IVAS_PCA_N_SLOTS * 16], hPCA->mem_eigVec_interp, IVAS_PCA_DELAY_CMP * 16 ); Loading
lib_dec/ivas_spar_foa_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -430,7 +430,7 @@ ivas_error ivas_spar_foa_dec_open( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for PCA decoder" ); } ivas_pca_dec_int( pState->hPCA ); ivas_pca_dec_init( pState->hPCA ); } /* mixer_mat intitialization */ Loading