From f59a6fc050207aa58e974b57aced0a8d148edae9 Mon Sep 17 00:00:00 2001 From: Fredrik Jansson Date: Thu, 15 Jun 2023 14:48:39 +0200 Subject: [PATCH 1/2] Fix for issue 560 added --- lib_com/options.h | 2 +- lib_enc/ivas_core_pre_proc_front.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 63f528e346..fbad2f6937 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -157,7 +157,7 @@ #define FIX_529_BWD_ISSUE /* VA: issue 529: fix Bandwidth Detector not working reliably for Music and Generic Audio */ - +#define FIX_560_VAD_FLAG /* Eri: Issue 560 - VAD flag issue for unified stereo */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index b9e5061ed5..bba4966a4c 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -462,8 +462,10 @@ ivas_error pre_proc_front_ivas( /* Add down mix stereo activity to LR vad_flag_dtx */ *vad_flag_dtx = *vad_flag_dtx || st->vad_flag; +#ifndef FIX_560_VAD_FLAG /* Combine the LR VAD flag and stereo downmix VAD flag */ st->vad_flag = ( LR_vad_flag || st->vad_flag ); +#endif /* Determine hangover flag status based on LR localVAD and downmix localVAD */ *vad_hover_flag = *vad_flag_dtx && !( LR_localVAD || st->localVAD ); -- GitLab From a4a64ba0d2843dd4a87a41ca3a85078a330943c1 Mon Sep 17 00:00:00 2001 From: Fredrik Jansson Date: Mon, 19 Jun 2023 11:37:45 +0200 Subject: [PATCH 2/2] Compiler warning fixed --- lib_enc/ivas_core_pre_proc_front.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index bba4966a4c..879062ff3d 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -163,7 +163,9 @@ ivas_error pre_proc_front_ivas( float temp1F_icatdmResampBuf[L_FILT_MAX]; /* temp buffers for ICA TDM resamplers */ int16_t old_pitch1; /* previous frame OL pitch[1] @12.8 kHz */ int16_t LR_localVAD; +#ifndef FIX_560_VAD_FLAG int16_t LR_vad_flag; +#endif ivas_error error; push_wmops( "pre_proc_front" ); @@ -180,7 +182,9 @@ ivas_error pre_proc_front_ivas( res_cod_SNR_M = tmpF; LR_localVAD = 0; +#ifndef FIX_560_VAD_FLAG LR_vad_flag = 0; +#endif if ( hSCE != NULL ) { @@ -208,7 +212,9 @@ ivas_error pre_proc_front_ivas( { /* Combine localVAD and vad_flag from LR processing */ LR_localVAD = hCPE->hCoreCoder[0]->localVAD || hCPE->hCoreCoder[1]->localVAD; +#ifndef FIX_560_VAD_FLAG LR_vad_flag = hCPE->hFrontVad[0]->hVAD->vad_flag || hCPE->hFrontVad[1]->hVAD->vad_flag; +#endif } if ( hCPE->hStereoTD != NULL ) -- GitLab