From 87406433e6e9d0e86c5be7e1da44c58cdd396617 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Fri, 7 Nov 2025 10:35:34 +0100 Subject: [PATCH 1/3] fix bug in SPAR active W channel cross-fade process, modify stv to trigger this fcn --- lib_com/options.h | 1 + lib_enc/ivas_spar_encoder.c | 4 ++++ scripts/testv/stvFOA48c_cut.wav | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index cb3dd907e9..c765b334e9 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -193,6 +193,7 @@ #define FIX_1330_JBM_MEMORY_FIX /* VA: basop issue: 2179 fix non-BE difference in FIX_1330_JBM_MEMORY */ #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 */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 79b00113fc..0cb0cf6e60 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 ) { diff --git a/scripts/testv/stvFOA48c_cut.wav b/scripts/testv/stvFOA48c_cut.wav index 7f3c6231ec..98fecdbf5f 100644 --- a/scripts/testv/stvFOA48c_cut.wav +++ b/scripts/testv/stvFOA48c_cut.wav @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d86c4f8fcd8de2395cbe83a9d7846c107bf4a34c4878c6731827ff2acf6f9a7 +oid sha256:7a0a1925ddcc6c0d3a6fbfe727386a9c3ff902b0cb4f23a12f88a1747cc751c4 size 1920044 -- GitLab From 73f5e48cb50e1961b50e777e92d8c706fbf313d1 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Fri, 7 Nov 2025 10:38:36 +0100 Subject: [PATCH 2/3] fix annoying warning in a debug util --- lib_debug/debug.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib_debug/debug.c b/lib_debug/debug.c index 012183c5ac..6ea62a4a46 100644 --- a/lib_debug/debug.c +++ b/lib_debug/debug.c @@ -774,8 +774,13 @@ char *fname( { 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 ); strcat( tmp_fname, file ); -- GitLab From 2d736cc26d758f3135742df1714c4faa9811bbd6 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Fri, 7 Nov 2025 10:45:06 +0100 Subject: [PATCH 3/3] add a test case triggering SPAR W Dynamic channel fcn. --- scripts/config/self_test.prm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index af39f6b5c2..588495b783 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -738,6 +738,10 @@ eid-xor -fer -vbr -bs g192 -ep g192 bit ../scripts/dly_error_profiles/ep_5pct.g1 ../IVAS_cod -dtx -sba 1 64000 48 testv/stvFOA48n.wav bit ../IVAS_dec BINAURAL_ROOM_IR 48 bit testv/stvFOA48n.wav_SBA_64000_48-48_DTX_BINAURAL_ROOM.tst +// SBA at 64 kpbs, 48kHz in, 48kHz out, EXT out +../IVAS_cod -sba 1 64000 48 testv/stvFOA48c_cut.wav bit +../IVAS_dec EXT 48 bit testv/stvFOA48c_cut.wav_SBA_64000_48-48_EXT.tst + // SBA at 80 kbps, 32kHz in, 32kHz out, HOA3 out ../IVAS_cod -sba 3 80000 32 testv/stv3OA32c.wav bit ../IVAS_dec HOA3 32 bit testv/stv3OA32c.wav_SBA_80000_32-32_HOA3.tst -- GitLab