Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ /*#define MD_SMOOTH_PARAM_BE*/ /*#define DTX_PARAM_BE*/ #define UNIFY_MD_QUANTIZER #define DISC_CNG /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/fd_cng_dec.c +12 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,7 @@ void ApplyFdCng( hFdCngCom->sid_frame_counter = 0; /* set noise estimation inactive during concealment, as no update with noise generated by concealment should be performed. */ /* set noise estimation inactive when we have bit errors, as no update with noise generated by corrupt frame (biterror) should be performed. */ #ifndef DISC_CNG if ( concealWholeFrame == 0 && ( timeDomainInput == NULL || ( *timeDomainInput<FLT_MAX && * timeDomainInput>( -FLT_MAX ) && Loading @@ -423,6 +424,17 @@ void ApplyFdCng( !( st->cng_type == LP_CNG && hFdCngDec->flag_dtx_mode ) && ( is_music == 0 ) ) || ( st->element_mode == IVAS_CPE_TD ) ) && ( !st->BER_detect ) ) #else /* ensure that the noise estimation is always performed outside of a CNG part (ISM only) */ if ( concealWholeFrame == 0 && ( timeDomainInput == NULL || ( *timeDomainInput<FLT_MAX && * timeDomainInput>( -FLT_MAX ) && *( timeDomainInput + hFdCngCom->frameSize - 1 ) < FLT_MAX && *( timeDomainInput + hFdCngCom->frameSize - 1 ) > ( -FLT_MAX ) ) ) && ( ( ( ( st->element_mode != IVAS_CPE_TD && st->element_mode != IVAS_CPE_DFT && hFdCngDec->flag_dtx_mode ) || !st->VAD || !st->cng_paramISM_flag ) && !( st->cng_type == LP_CNG && hFdCngDec->flag_dtx_mode ) && ( is_music == 0 ) ) || ( st->element_mode == IVAS_CPE_TD ) ) && ( !st->BER_detect ) ) #endif { /* Perform noise estimation at the decoder */ perform_noise_estimation_dec( timeDomainInput, powerSpectrum, hFdCngDec, st->element_mode, st->bwidth, L_frame, last_L_frame, st->last_core_brate, st->VAD ); Loading lib_dec/ivas_sce_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -78,7 +78,11 @@ ivas_error ivas_sce_dec( last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; #ifdef PARAM_ISM_DTX_CNG #ifdef DISC_CNG if ( st_ivas->ivas_format == ISM_FORMAT ) #else if ( st_ivas->ism_mode == ISM_MODE_PARAM ) #endif { st->cng_type = FD_CNG; /* TODO: move to init if possible */ } Loading lib_dec/ivas_tcx_core_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -730,7 +730,11 @@ void stereo_tcx_core_dec( if ( st->element_mode != IVAS_CPE_TD ) { #ifdef PARAM_ISM_DTX_CNG #ifndef DISC_CNG if ( ivas_format == ISM_FORMAT && ism_mode == ISM_MODE_PARAM ) #else if ( ivas_format == ISM_FORMAT ) #endif { float buffer[L_FRAME16k]; lerp( signal_outFB, buffer, st->L_frame, hTcxDec->L_frameTCX ); Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,7 @@ /*#define MD_SMOOTH_PARAM_BE*/ /*#define DTX_PARAM_BE*/ #define UNIFY_MD_QUANTIZER #define DISC_CNG /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/fd_cng_dec.c +12 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,7 @@ void ApplyFdCng( hFdCngCom->sid_frame_counter = 0; /* set noise estimation inactive during concealment, as no update with noise generated by concealment should be performed. */ /* set noise estimation inactive when we have bit errors, as no update with noise generated by corrupt frame (biterror) should be performed. */ #ifndef DISC_CNG if ( concealWholeFrame == 0 && ( timeDomainInput == NULL || ( *timeDomainInput<FLT_MAX && * timeDomainInput>( -FLT_MAX ) && Loading @@ -423,6 +424,17 @@ void ApplyFdCng( !( st->cng_type == LP_CNG && hFdCngDec->flag_dtx_mode ) && ( is_music == 0 ) ) || ( st->element_mode == IVAS_CPE_TD ) ) && ( !st->BER_detect ) ) #else /* ensure that the noise estimation is always performed outside of a CNG part (ISM only) */ if ( concealWholeFrame == 0 && ( timeDomainInput == NULL || ( *timeDomainInput<FLT_MAX && * timeDomainInput>( -FLT_MAX ) && *( timeDomainInput + hFdCngCom->frameSize - 1 ) < FLT_MAX && *( timeDomainInput + hFdCngCom->frameSize - 1 ) > ( -FLT_MAX ) ) ) && ( ( ( ( st->element_mode != IVAS_CPE_TD && st->element_mode != IVAS_CPE_DFT && hFdCngDec->flag_dtx_mode ) || !st->VAD || !st->cng_paramISM_flag ) && !( st->cng_type == LP_CNG && hFdCngDec->flag_dtx_mode ) && ( is_music == 0 ) ) || ( st->element_mode == IVAS_CPE_TD ) ) && ( !st->BER_detect ) ) #endif { /* Perform noise estimation at the decoder */ perform_noise_estimation_dec( timeDomainInput, powerSpectrum, hFdCngDec, st->element_mode, st->bwidth, L_frame, last_L_frame, st->last_core_brate, st->VAD ); Loading
lib_dec/ivas_sce_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -78,7 +78,11 @@ ivas_error ivas_sce_dec( last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate; #ifdef PARAM_ISM_DTX_CNG #ifdef DISC_CNG if ( st_ivas->ivas_format == ISM_FORMAT ) #else if ( st_ivas->ism_mode == ISM_MODE_PARAM ) #endif { st->cng_type = FD_CNG; /* TODO: move to init if possible */ } Loading
lib_dec/ivas_tcx_core_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -730,7 +730,11 @@ void stereo_tcx_core_dec( if ( st->element_mode != IVAS_CPE_TD ) { #ifdef PARAM_ISM_DTX_CNG #ifndef DISC_CNG if ( ivas_format == ISM_FORMAT && ism_mode == ISM_MODE_PARAM ) #else if ( ivas_format == ISM_FORMAT ) #endif { float buffer[L_FRAME16k]; lerp( signal_outFB, buffer, st->L_frame, hTcxDec->L_frameTCX ); Loading