From 0d7753db5b6f946a6c9210ace6571b62d76e684b Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Tue, 11 Nov 2025 12:52:22 +0100 Subject: [PATCH] fix bug in SPAR active W channel cross-fade process --- lib_com/options.h | 1 + lib_debug/debug.c | 5 +++++ lib_enc/ivas_spar_encoder.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 830d779e6..043c0e4d4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -206,6 +206,7 @@ #define FIX_GAIN_EDIT_LIMITS /* Harmonize gain edit limits for all opertation points. For all modes, limit to max +12dB. For parametric modes, limit to min -24dB. */ #define NONBE_1380_OMASA_BUILD_DIFF /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */ #define NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL /* Nokia: Adjustments in remaining stereo panning functions to make them BE between Debug and Release */ +#define BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL /* Dolby: Fix coverage of SBA SPAR Dynamic active W not getting hit by the tests */ // object-editing feature porting #define FIX_HRTF_LOAD_API // solves API conflicts between HRTF and object-editing features diff --git a/lib_debug/debug.c b/lib_debug/debug.c index 77823632b..5a1fc78ab 100644 --- a/lib_debug/debug.c +++ b/lib_debug/debug.c @@ -784,8 +784,13 @@ char *fname( #endif char idd[6]; +#ifdef BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL + assert( id >= 0 && id < 100 ); + snprintf( idd, sizeof( idd ), ".id%d", id ); +#else assert( id < 100 ); sprintf( idd, ".id%d", id ); +#endif strcpy( tmp_fname, dir ); #ifdef DEBUG_FORCE_DIR diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 79b00113f..0cb0cf6e6 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -838,7 +838,11 @@ static ivas_error ivas_spar_enc_process( { /*cross fade between new active W channels and old passive W channel*/ +#ifdef BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL + if ( dyn_active_w_flag == 1 || hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag == 1 ) +#else if ( dyn_active_w_flag == 1 ) +#endif { if ( hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag != dyn_active_w_flag ) { -- GitLab