Loading lib_dec/ivas_pca_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -260,8 +260,9 @@ void ivas_pca_dec( return; } #ifdef DEBUGGING assert( ivas_total_brate == PCA_BRATE ); /* the remaining code is defined at 256k where there are 4 dmx channel */ #endif if ( !bfi ) { /* set PCA by-pass mode indicator */ Loading Loading @@ -312,6 +313,5 @@ void ivas_pca_dec( pca_dec_update_dquat( hPCA, ql, qr ); hPCA->prev_pca_bypass = 0; return; } lib_enc/ivas_pca_enc.c +14 −7 Original line number Diff line number Diff line Loading @@ -139,19 +139,17 @@ static void pca_enc_transform( quat_shortestpath( hPCA->prev_ql, ql, hPCA->prev_qr, qr ); pca_interp_preproc( hPCA->prev_ql, hPCA->prev_qr, ql, qr, IVAS_PCA_N_SLOTS, ql_interp, qr_interp ); slot_len = (int16_t) ( input_frame / IVAS_PCA_N_SLOTS ); for ( time_slot = 0; time_slot < IVAS_PCA_N_SLOTS; time_slot++ ) { /* convert from double quaternion to 4D matrix */ dquat2mat( &ql_interp[IVAS_PCA_INTERP * time_slot], &qr_interp[IVAS_PCA_INTERP * time_slot], eigVec_interp ); dquat2mat( &ql_interp[IVAS_PCA_INTERP * time_slot], &qr_interp[IVAS_PCA_INTERP * time_slot], eigVec_interp ); pca_transform_sub( eigVec_interp, transformed_data, slot_len * time_slot, slot_len, n_channels ); } return; } Loading Loading @@ -307,7 +305,6 @@ void ivas_pca_enc( return; } /* handle bitrate switching */ if ( ivas_total_brate != PCA_BRATE ) { Loading @@ -319,6 +316,7 @@ void ivas_pca_enc( /* copy input data into output directly as previous frame was already in by-pass mode */ for ( k = 0; k < n_channels; k++ ) { // ToDo: TBV } } else Loading @@ -334,8 +332,9 @@ void ivas_pca_enc( return; } #ifdef DEBUGGING assert( ivas_total_brate == PCA_BRATE ); /* the remaining code is defined at 256k where there are 4 dmx channel */ #endif /*-----------------------------------------------------------------* * Covariance *-----------------------------------------------------------------*/ Loading Loading @@ -510,14 +509,22 @@ void ivas_pca_enc( dotl = dotp( hPCA->prev_ql, ql, 4 ); dotr = dotp( hPCA->prev_qr, qr, 4 ); if ( dotl < dotr ) { min_dot = dotl; } else { min_dot = dotr; } if ( ql[0] < qr[0] ) { min_dot2 = ql[0]; } else { min_dot2 = qr[0]; } bypass_decision = PCA_MODE_ACTIVE; if ( dist_alt < IVAS_PCA_THRES_DIST_ALT ) Loading Loading @@ -556,6 +563,7 @@ void ivas_pca_enc( pca_update_state( hPCA, ql, qr, eigVec, n_channels ); hPCA->prev_bypass_decision = PCA_MODE_INACTIVE; return; } Loading Loading @@ -589,6 +597,5 @@ void ivas_pca_enc( hPCA->prev_bypass_decision = bypass_decision; pca_update_state( hPCA, ql, qr, eigVec, n_channels ); return; } Loading
lib_dec/ivas_pca_dec.c +2 −2 Original line number Diff line number Diff line Loading @@ -260,8 +260,9 @@ void ivas_pca_dec( return; } #ifdef DEBUGGING assert( ivas_total_brate == PCA_BRATE ); /* the remaining code is defined at 256k where there are 4 dmx channel */ #endif if ( !bfi ) { /* set PCA by-pass mode indicator */ Loading Loading @@ -312,6 +313,5 @@ void ivas_pca_dec( pca_dec_update_dquat( hPCA, ql, qr ); hPCA->prev_pca_bypass = 0; return; }
lib_enc/ivas_pca_enc.c +14 −7 Original line number Diff line number Diff line Loading @@ -139,19 +139,17 @@ static void pca_enc_transform( quat_shortestpath( hPCA->prev_ql, ql, hPCA->prev_qr, qr ); pca_interp_preproc( hPCA->prev_ql, hPCA->prev_qr, ql, qr, IVAS_PCA_N_SLOTS, ql_interp, qr_interp ); slot_len = (int16_t) ( input_frame / IVAS_PCA_N_SLOTS ); for ( time_slot = 0; time_slot < IVAS_PCA_N_SLOTS; time_slot++ ) { /* convert from double quaternion to 4D matrix */ dquat2mat( &ql_interp[IVAS_PCA_INTERP * time_slot], &qr_interp[IVAS_PCA_INTERP * time_slot], eigVec_interp ); dquat2mat( &ql_interp[IVAS_PCA_INTERP * time_slot], &qr_interp[IVAS_PCA_INTERP * time_slot], eigVec_interp ); pca_transform_sub( eigVec_interp, transformed_data, slot_len * time_slot, slot_len, n_channels ); } return; } Loading Loading @@ -307,7 +305,6 @@ void ivas_pca_enc( return; } /* handle bitrate switching */ if ( ivas_total_brate != PCA_BRATE ) { Loading @@ -319,6 +316,7 @@ void ivas_pca_enc( /* copy input data into output directly as previous frame was already in by-pass mode */ for ( k = 0; k < n_channels; k++ ) { // ToDo: TBV } } else Loading @@ -334,8 +332,9 @@ void ivas_pca_enc( return; } #ifdef DEBUGGING assert( ivas_total_brate == PCA_BRATE ); /* the remaining code is defined at 256k where there are 4 dmx channel */ #endif /*-----------------------------------------------------------------* * Covariance *-----------------------------------------------------------------*/ Loading Loading @@ -510,14 +509,22 @@ void ivas_pca_enc( dotl = dotp( hPCA->prev_ql, ql, 4 ); dotr = dotp( hPCA->prev_qr, qr, 4 ); if ( dotl < dotr ) { min_dot = dotl; } else { min_dot = dotr; } if ( ql[0] < qr[0] ) { min_dot2 = ql[0]; } else { min_dot2 = qr[0]; } bypass_decision = PCA_MODE_ACTIVE; if ( dist_alt < IVAS_PCA_THRES_DIST_ALT ) Loading Loading @@ -556,6 +563,7 @@ void ivas_pca_enc( pca_update_state( hPCA, ql, qr, eigVec, n_channels ); hPCA->prev_bypass_decision = PCA_MODE_INACTIVE; return; } Loading Loading @@ -589,6 +597,5 @@ void ivas_pca_enc( hPCA->prev_bypass_decision = bypass_decision; pca_update_state( hPCA, ql, qr, eigVec, n_channels ); return; }