From b4057c0d7d43338f2581a3e25e13986410c9588a Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 21 Jan 2026 15:16:37 +0100 Subject: [PATCH 1/4] FIX_1500_ISM_MD_DTX --- lib_com/options.h | 1 + lib_dec/ivas_ism_metadata_dec_fx.c | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index a1ac29acd..2b60cb6a3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -133,6 +133,7 @@ #define FIX_2261_REMOVE_LP_RESCALING /* VA: Remove of unnecessary lpc coefficient rescaling */ #define FIX_2320_OOB_SCE_SWITCHING /* VA: basop issue 2320: Correct the length of the buffer to be scaled in SCE/CPE switching */ #define FIX_2302_LSF_CDBK_THRESHOLD /* VA: basop issue 2302: fix threshold for LSF Q codebook-type decision */ +#define FIX_1500_ISM_MD_DTX /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_ism_metadata_dec_fx.c b/lib_dec/ivas_ism_metadata_dec_fx.c index 4fe9e5767..993117abe 100644 --- a/lib_dec/ivas_ism_metadata_dec_fx.c +++ b/lib_dec/ivas_ism_metadata_dec_fx.c @@ -54,8 +54,8 @@ static Word16 decode_radius_fx( DEC_CORE_HANDLE st0, Word16 *last_radius_idx, Wo #define IVAS_ISM_DTX_HO_MAX 5 -#define CNG_MD_MAX_DIFF_AZIMUTH 5 -#define CNG_MD_MAX_DIFF_ELEVATION 5 +#define CNG_MD_MAX_DIFF_AZIMUTH_FX ( 5 << Q22 ) +#define CNG_MD_MAX_DIFF_ELEVATION_FX ( 5 << Q22 ) #define MAX_BITS_ISM_METADATA ( 2 * ISM_EXTENDED_METADATA_BITS + MAX_NUM_OBJECTS * ( 1 /*number of objects*/ + ISM_METADATA_MD_FLAG_BITS + 2 * ISM_METADATA_FLAG_BITS + ISM_METADATA_IS_NDP_BITS + 1 /*abs.flag*/ + ISM_AZIMUTH_NBITS + ISM_ELEVATION_NBITS + 1 /*abs.flag*/ + ISM_RADIUS_NBITS + 1 /*abs.flag*/ + ISM_AZIMUTH_NBITS + ISM_ELEVATION_NBITS ) + 10 /* margin */ ) /* max. bit-budget of ISM metadata */ @@ -95,20 +95,20 @@ static void ism_metadata_smooth_fx( } test(); - IF( GT_32( ism_total_brate, IVAS_SID_5k2 ) && GT_32( L_abs( diff_fx ), L_shl( IVAS_ISM_DTX_HO_MAX * CNG_MD_MAX_DIFF_AZIMUTH, Q22 ) ) ) + IF( GT_32( ism_total_brate, IVAS_SID_5k2 ) && GT_32( L_abs( diff_fx ), IVAS_ISM_DTX_HO_MAX * CNG_MD_MAX_DIFF_AZIMUTH_FX ) ) { /* skip the smoothing */ } - ELSE IF( GT_32( L_abs( diff_fx ), L_shl( CNG_MD_MAX_DIFF_AZIMUTH, Q22 ) ) ) + ELSE IF( GT_32( L_abs( diff_fx ), CNG_MD_MAX_DIFF_AZIMUTH_FX ) ) { Word32 temp; IF( ( diff_fx > 0 ) ) { - temp = L_shl( CNG_MD_MAX_DIFF_AZIMUTH, Q22 ); + temp = CNG_MD_MAX_DIFF_AZIMUTH_FX; } ELSE { - temp = L_negate( L_shl( CNG_MD_MAX_DIFF_AZIMUTH, Q22 ) ); + temp = CNG_MD_MAX_DIFF_AZIMUTH_FX; } hIsmMetaData->azimuth_fx = L_add( hIsmMetaData->last_azimuth_fx, temp ); move32(); @@ -129,20 +129,24 @@ static void ism_metadata_smooth_fx( diff_fx = L_sub( hIsmMetaData->last_true_elevation_fx, hIsmMetaData->last_elevation_fx ); test(); - IF( GT_32( ism_total_brate, IVAS_SID_5k2 ) && GT_32( diff_fx, L_shl( IVAS_ISM_DTX_HO_MAX * CNG_MD_MAX_DIFF_ELEVATION, Q22 ) ) ) +#ifdef FIX_1500_ISM_MD_DTX + IF( GT_32( ism_total_brate, IVAS_SID_5k2 ) && GT_32( L_abs( diff_fx ), IVAS_ISM_DTX_HO_MAX * CNG_MD_MAX_DIFF_ELEVATION_FX ) ) +#else + IF( GT_32( ism_total_brate, IVAS_SID_5k2 ) && GT_32( diff_fx, IVAS_ISM_DTX_HO_MAX * CNG_MD_MAX_DIFF_ELEVATION_FX ) ) +#endif { /* skip the smoothing */ } - ELSE IF( GT_32( L_abs( diff_fx ), L_shl( CNG_MD_MAX_DIFF_ELEVATION, Q22 ) ) ) + ELSE IF( GT_32( L_abs( diff_fx ), CNG_MD_MAX_DIFF_ELEVATION_FX ) ) { Word32 temp; IF( ( diff_fx > 0 ) ) { - temp = L_shl( CNG_MD_MAX_DIFF_ELEVATION, Q22 ); + temp = CNG_MD_MAX_DIFF_ELEVATION_FX; } ELSE { - temp = L_negate( L_shl( CNG_MD_MAX_DIFF_ELEVATION, Q22 ) ); + temp = L_negate( CNG_MD_MAX_DIFF_ELEVATION_FX ); } hIsmMetaData->elevation_fx = L_add( hIsmMetaData->last_elevation_fx, temp ); move32(); -- GitLab From 2ae09e853b8292d642a7b8302163773586e80dae Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 21 Jan 2026 15:58:07 +0100 Subject: [PATCH 2/4] comment --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 2b60cb6a3..180b43c40 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -133,7 +133,7 @@ #define FIX_2261_REMOVE_LP_RESCALING /* VA: Remove of unnecessary lpc coefficient rescaling */ #define FIX_2320_OOB_SCE_SWITCHING /* VA: basop issue 2320: Correct the length of the buffer to be scaled in SCE/CPE switching */ #define FIX_2302_LSF_CDBK_THRESHOLD /* VA: basop issue 2302: fix threshold for LSF Q codebook-type decision */ -#define FIX_1500_ISM_MD_DTX /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */ +#define FIX_1500_ISM_MD_DTX /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */ /* ##################### End NON-BE switches ########################### */ -- GitLab From a9c3fc13751addffb5b8d1159481c25065335a59 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 21 Jan 2026 15:59:47 +0100 Subject: [PATCH 3/4] fix accidentally removed operation --- lib_dec/ivas_ism_metadata_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_ism_metadata_dec_fx.c b/lib_dec/ivas_ism_metadata_dec_fx.c index 993117abe..063f089d0 100644 --- a/lib_dec/ivas_ism_metadata_dec_fx.c +++ b/lib_dec/ivas_ism_metadata_dec_fx.c @@ -108,7 +108,7 @@ static void ism_metadata_smooth_fx( } ELSE { - temp = CNG_MD_MAX_DIFF_AZIMUTH_FX; + temp = L_negate( CNG_MD_MAX_DIFF_AZIMUTH_FX ); } hIsmMetaData->azimuth_fx = L_add( hIsmMetaData->last_azimuth_fx, temp ); move32(); -- GitLab From 2e264743c6ed1cb286a5a4dc7bc45230288bc956 Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 22 Jan 2026 18:50:24 +0100 Subject: [PATCH 4/4] comment - just to restart the CI pipeline --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index c76aeb719..ce06089a0 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -114,7 +114,7 @@ #define FIX_2250_LARGE_DIFFERENCES_BETWEEN_BASOP_AND_FLOAT /* Dolby: Issue 2250: random vector generation in GenShapedSHBExcitation() */ #define FIX_2320_OOB_SCE_SWITCHING /* VA: basop issue 2320: Correct the length of the buffer to be scaled in SCE/CPE switching */ #define FIX_2302_LSF_CDBK_THRESHOLD /* VA: basop issue 2302: fix threshold for LSF Q codebook-type decision */ -#define FIX_1500_ISM_MD_DTX /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */ +#define FIX_1500_ISM_MD_DTX /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */ /* ##################### End NON-BE switches ########################### */ -- GitLab