From ec8f88dc5e91646b110a2449cfe1303df024aae5 Mon Sep 17 00:00:00 2001 From: malenov Date: Tue, 15 Apr 2025 12:42:10 +0200 Subject: [PATCH] align the usage of IND_SHB_RES_GS with the float code --- lib_com/cnst.h | 4 ++++ lib_com/options.h | 1 + lib_enc/swb_tbe_enc_fx.c | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/lib_com/cnst.h b/lib_com/cnst.h index 379dd7c85..ae84dbd2c 100644 --- a/lib_com/cnst.h +++ b/lib_com/cnst.h @@ -532,12 +532,16 @@ enum IND_STEREO_ICBWE_MSFLAG, IND_SHB_ENER_SF, IND_SHB_RES_GS, +#ifndef FIX_1486_IND_SHB_RES IND_SHB_RES_GS1, IND_SHB_RES_GS2, IND_SHB_RES_GS3, IND_SHB_RES_GS4, IND_SHB_RES_GS5, IND_SHB_VF, +#else + IND_SHB_VF = IND_SHB_RES_GS + 5, +#endif IND_SHB_LSF, IND_SHB_MIRROR = IND_SHB_LSF + 5, IND_SHB_GRID, diff --git a/lib_com/options.h b/lib_com/options.h index daa609ed4..3f158a8e8 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -91,6 +91,7 @@ #define FIX_1439_SPEEDUP_ivas_swb_tbe_dec_fx /*FhG: reduces WMOPS - bit-exact*/ #define FIX_1439_SPEEDUP_synthesise_fb_high_band_fx /*FhG: reduces WMOPS - bit-exact*/ #define FIX_1481_HARDCODE_DIV /* FhG: hardcode division results in stereo_dmx_evs_init_encoder_fx() */ +#define FIX_1486_IND_SHB_RES /* VA: Fix for issue 1486: align the usage of IND_SHB_RES_GS indices with float code */ #define TEST_HR diff --git a/lib_enc/swb_tbe_enc_fx.c b/lib_enc/swb_tbe_enc_fx.c index 633ede535..acfc5043c 100644 --- a/lib_enc/swb_tbe_enc_fx.c +++ b/lib_enc/swb_tbe_enc_fx.c @@ -5683,7 +5683,11 @@ static void Quant_shb_res_gshape_fx( move16(); IF( NE_16( st_fx->codec_mode, MODE2 ) ) { +#ifdef FIX_1486_IND_SHB_RES + push_indice( st_fx->hBstr, IND_SHB_RES_GS + i, idxSubGain_fx[i], NUM_BITS_SHB_RES_GS ); +#else push_indice( st_fx->hBstr, IND_SHB_RES_GS1 + i, idxSubGain_fx[i], NUM_BITS_SHB_RES_GS ); +#endif } } } @@ -5719,7 +5723,11 @@ static void Quant_shb_res_gshape_ivas_fx( } ELSE { +#ifdef FIX_1486_IND_SHB_RES + push_indice( st->hBstr, IND_SHB_RES_GS + i, idxSubGain_fx[i], NUM_BITS_SHB_RES_GS ); +#else push_indice( st->hBstr, IND_SHB_RES_GS1 + i, idxSubGain_fx[i], NUM_BITS_SHB_RES_GS ); +#endif } } } -- GitLab