Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,7 @@ #define FIX_292_VBAP_CALLOC_REMOVAL /* Nokia: Fixes issue 292 by removing the remnant callocs */ #define FIX_293_EXT_RENDERER_CLI /* FhG: Fix bugs in external renderer CLI */ #define FIX_268 /* Issue 268: Add low cost dry-run of memory analysis */ #define LOW_RATE_TRANS_FIX /* Eri: Fix for critical item during transitions */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_enc/ivas_cpe_enc.c +11 −0 Original line number Diff line number Diff line Loading @@ -656,6 +656,17 @@ ivas_error ivas_cpe_enc( hCPE->hFrontVad[0]->ini_frame = min( hCPE->hFrontVad[0]->ini_frame, MAX_FRAME_COUNTER ); } #ifdef LOW_RATE_TRANS_FIX /* Store previous attack detection flag */ for ( n = 0; n < CPE_CHANNELS; n++ ) { if ( sts[n]->mct_chan_mode != MCT_CHAN_MODE_LFE ) { sts[n]->hTranDet->transientDetector.prev_bIsAttackPresent = sts[n]->hTranDet->transientDetector.bIsAttackPresent; } } #endif #ifdef DEBUG_MODE_INFO if ( hCPE->element_mode == IVAS_CPE_DFT ) { Loading lib_enc/ivas_ism_enc.c +5 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,11 @@ ivas_error ivas_ism_enc( /* update input samples buffer */ mvr2r( st->input, st->old_input_signal, input_frame ); #ifdef LOW_RATE_TRANS_FIX /* Store previous attack detection flag */ st->hTranDet->transientDetector.prev_bIsAttackPresent = st->hTranDet->transientDetector.bIsAttackPresent; #endif } pop_wmops(); Loading lib_enc/stat_enc.h +4 −2 Original line number Diff line number Diff line Loading @@ -140,8 +140,10 @@ typedef struct TransientDetector TCheckSubblocksForAttack CheckSubblocksForAttack; /* Function for checking a presence of an attack. */ float attackRatioThreshold; /* Attack ratio threshold. */ int16_t bIsAttackPresent; /* True when an attack was detected. */ #ifdef LOW_RATE_TRANS_FIX int16_t prev_bIsAttackPresent; /* True if an attack was detected in the previous frame. */ #endif int16_t attackIndex; /* The index of an attack. */ } TransientDetector; /* Transient detection: Holds all transient detectors and buffers used by them. */ Loading lib_enc/transient_detection.c +7 −1 Original line number Diff line number Diff line Loading @@ -577,6 +577,9 @@ static void InitTransientDetector( pTransientDetector->CheckSubblocksForAttack = pCheckSubblocksForAttack; pTransientDetector->attackRatioThreshold = attackRatioThreshold; pTransientDetector->bIsAttackPresent = FALSE; #ifdef LOW_RATE_TRANS_FIX pTransientDetector->prev_bIsAttackPresent = FALSE; #endif pTransientDetector->attackIndex = -1; pTransientDetector->pSubblockEnergies->ramp_up_flag = 0x0; Loading Loading @@ -897,8 +900,11 @@ int16_t transient_analysis( prel_force_td |= 0x0001; } } #ifdef LOW_RATE_TRANS_FIX if ( prel_force_td == 0 && hTranDet->transientDetector.prev_bIsAttackPresent == 1 ) #else if ( prel_force_td == 0 ) #endif { /* release analysis */ pSubblockNrg = hTranDet->transientDetector.pSubblockEnergies->subblockNrg; Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,7 @@ #define FIX_292_VBAP_CALLOC_REMOVAL /* Nokia: Fixes issue 292 by removing the remnant callocs */ #define FIX_293_EXT_RENDERER_CLI /* FhG: Fix bugs in external renderer CLI */ #define FIX_268 /* Issue 268: Add low cost dry-run of memory analysis */ #define LOW_RATE_TRANS_FIX /* Eri: Fix for critical item during transitions */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_enc/ivas_cpe_enc.c +11 −0 Original line number Diff line number Diff line Loading @@ -656,6 +656,17 @@ ivas_error ivas_cpe_enc( hCPE->hFrontVad[0]->ini_frame = min( hCPE->hFrontVad[0]->ini_frame, MAX_FRAME_COUNTER ); } #ifdef LOW_RATE_TRANS_FIX /* Store previous attack detection flag */ for ( n = 0; n < CPE_CHANNELS; n++ ) { if ( sts[n]->mct_chan_mode != MCT_CHAN_MODE_LFE ) { sts[n]->hTranDet->transientDetector.prev_bIsAttackPresent = sts[n]->hTranDet->transientDetector.bIsAttackPresent; } } #endif #ifdef DEBUG_MODE_INFO if ( hCPE->element_mode == IVAS_CPE_DFT ) { Loading
lib_enc/ivas_ism_enc.c +5 −0 Original line number Diff line number Diff line Loading @@ -273,6 +273,11 @@ ivas_error ivas_ism_enc( /* update input samples buffer */ mvr2r( st->input, st->old_input_signal, input_frame ); #ifdef LOW_RATE_TRANS_FIX /* Store previous attack detection flag */ st->hTranDet->transientDetector.prev_bIsAttackPresent = st->hTranDet->transientDetector.bIsAttackPresent; #endif } pop_wmops(); Loading
lib_enc/stat_enc.h +4 −2 Original line number Diff line number Diff line Loading @@ -140,8 +140,10 @@ typedef struct TransientDetector TCheckSubblocksForAttack CheckSubblocksForAttack; /* Function for checking a presence of an attack. */ float attackRatioThreshold; /* Attack ratio threshold. */ int16_t bIsAttackPresent; /* True when an attack was detected. */ #ifdef LOW_RATE_TRANS_FIX int16_t prev_bIsAttackPresent; /* True if an attack was detected in the previous frame. */ #endif int16_t attackIndex; /* The index of an attack. */ } TransientDetector; /* Transient detection: Holds all transient detectors and buffers used by them. */ Loading
lib_enc/transient_detection.c +7 −1 Original line number Diff line number Diff line Loading @@ -577,6 +577,9 @@ static void InitTransientDetector( pTransientDetector->CheckSubblocksForAttack = pCheckSubblocksForAttack; pTransientDetector->attackRatioThreshold = attackRatioThreshold; pTransientDetector->bIsAttackPresent = FALSE; #ifdef LOW_RATE_TRANS_FIX pTransientDetector->prev_bIsAttackPresent = FALSE; #endif pTransientDetector->attackIndex = -1; pTransientDetector->pSubblockEnergies->ramp_up_flag = 0x0; Loading Loading @@ -897,8 +900,11 @@ int16_t transient_analysis( prel_force_td |= 0x0001; } } #ifdef LOW_RATE_TRANS_FIX if ( prel_force_td == 0 && hTranDet->transientDetector.prev_bIsAttackPresent == 1 ) #else if ( prel_force_td == 0 ) #endif { /* release analysis */ pSubblockNrg = hTranDet->transientDetector.pSubblockEnergies->subblockNrg; Loading