From 92be6fec8e8688fd7feb730c7ff660720e1d9c25 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 11 May 2026 14:38:34 +0200 Subject: [PATCH 1/2] Revert commits dee49a29 and 26e2c28d - bug in VS code --- lib_com/options.h | 1 - lib_dec/ivas_rom_dec.h | 2 -- lib_dec/ivas_rom_dec_fx.c | 7 +------ lib_isar/isar_rom_lcld_tables.c | 14 -------------- lib_isar/isar_rom_lcld_tables.h | 4 ---- 5 files changed, 1 insertion(+), 27 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index fe16a0ce7..6e5cdefb1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -101,7 +101,6 @@ #define FIX_BASOP_2095_REMOVE_TABLES_PT01 /* FhG: BASOP issue 2095: remove unused tables, part 01 */ #define FIX_2346_DUPLICATED_IGF_FUNCTIONS_2 /* FhG: part 2 of basop issue 2346: Review potentially duplicated IGF functions */ #define FIX_BASOP_2563_CRASH_HQ_GENERIC_DEC /* Eri: BASOP issue 2563: Crash in hq_generic decoding. EVS code --> solve with _sat operator */ -#define FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Dolby: remove unused ISAR */ #define FIX_BASOP_2560_STEREO_DFT_DEC_RESET /* FhG: BASOP issue 2560: align reset of hStereoDft->res_gains_ind_fx[][] between BASOP and float */ #define HARMONIZE_2539_cng_energy /* FhG: basop issue 2539: harmonize cng_energy with its ivas derivate */ #define FIX_1585_ASAN_FORMAT_SW_ALT /* VA,FhG: float issues 1585,1593: alternative fix memory leaks with format switching */ diff --git a/lib_dec/ivas_rom_dec.h b/lib_dec/ivas_rom_dec.h index f79e95cef..aafe3bce9 100644 --- a/lib_dec/ivas_rom_dec.h +++ b/lib_dec/ivas_rom_dec.h @@ -96,8 +96,6 @@ extern const Word16 dirac_dithering_ele_scale_fx[DIRAC_DIFFUSE_LEVELS]; extern const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df0; extern const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES extern const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_dt; -#endif #endif /* IVAS_ROM_DEC_H */ diff --git a/lib_dec/ivas_rom_dec_fx.c b/lib_dec/ivas_rom_dec_fx.c index 0f1b4108a..4a42e2cca 100644 --- a/lib_dec/ivas_rom_dec_fx.c +++ b/lib_dec/ivas_rom_dec_fx.c @@ -476,7 +476,6 @@ static const Word16 huff_nodes_alpha_1D_DF[64][2] = { -2, -62 } }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Alpha Fine Huffman table dt */ static const Word16 huff_nodes_alpha_1D_DT[64][2] = { @@ -545,7 +544,6 @@ static const Word16 huff_nodes_alpha_1D_DT[64][2] = { -3, -64 }, { -2, -63 } }; -#endif /* Beta Fine Huffman table df0 */ static const Word16 huff_nodes_first_band_beta[8][2] = @@ -559,13 +557,11 @@ static const Word16 huff_nodes_beta_1D_DF[16][2] = { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { 9, 8 }, { -5, -13 }, { 11, 10 }, { -4, -14 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Beta Fine Huffman table dt */ static const Word16 huff_nodes_beta_1D_DT[16][2] = { { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { -13, 8 }, { -5, 9 }, { -14, 10 }, { -4, 11 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } }; -#endif const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df0 = { @@ -579,12 +575,11 @@ const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df = huff_nodes_beta_1D_DF }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_dt = { huff_nodes_alpha_1D_DT, huff_nodes_beta_1D_DT }; -#endif + /* clang-format on */ diff --git a/lib_isar/isar_rom_lcld_tables.c b/lib_isar/isar_rom_lcld_tables.c index 287d3f70c..15bdb6b84 100644 --- a/lib_isar/isar_rom_lcld_tables.c +++ b/lib_isar/isar_rom_lcld_tables.c @@ -294,7 +294,6 @@ const Word32 c_aiQuantMaxValues_fx[ALLOC_TABLE_SIZE] = { 377487360, }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE] = { 0, 3, @@ -329,7 +328,6 @@ const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE] = { 152, 180, }; -#endif const Word32 c_aiHuffmanDim_fx[ALLOC_TABLE_SIZE] = { 2, @@ -471,7 +469,6 @@ const Word32 c_aiHuffmanMod[ALLOC_TABLE_SIZE] = { 1, }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE] = { 1, 16, @@ -506,7 +503,6 @@ const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE] = { 153, 181, }; -#endif const UWord32 c_aaiRMSEnvHuffEnc[64][2] = { { 0x0014, 0x0000 }, @@ -19213,7 +19209,6 @@ const Word16 c_aiLogAddTable_fx[LOG_ADD_TABLE_LENGTH] = { 0x00, }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH] = { 0x40, 0x40, @@ -19728,7 +19723,6 @@ const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH] = { 0x00, 0x00, }; -#endif const Word16 c_aiBandwidthAdjust48_fx[MAX_BANDS_48] = { 0, @@ -19756,7 +19750,6 @@ const Word16 c_aiBandwidthAdjust48_fx[MAX_BANDS_48] = { 213, }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48] = { 0, @@ -19783,7 +19776,6 @@ const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48] = { 180, 213, }; -#endif const Word16 c_aiAbsoluteThresh48_fx[MAX_BANDS_48] = { -1787, @@ -19811,7 +19803,6 @@ const Word16 c_aiAbsoluteThresh48_fx[MAX_BANDS_48] = { -401, }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48] = { -1787, -1787, @@ -19837,7 +19828,6 @@ const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48] = { -409, -401, }; -#endif #if PERCEPTUAL_MODEL_SLGAIN_SHIFT == 4 const Word32 c_aiDefaultTheta48[MAX_BANDS_48] = { @@ -20451,7 +20441,6 @@ const Word16 c_aaiSpreadFunction48_fx[MAX_BANDS_48 * MAX_BANDS_48] = { -114, }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48] = { 0, -1561, @@ -20984,7 +20973,6 @@ const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48] = { -114, }; -#endif const Word32 c_pfMagLUT[8] = /* Q31 */ { 0, 394599072, 775760576, 1130504448, 1446750336, 1713728896, 1922348544, 2065504896 @@ -21008,8 +20996,6 @@ const Word32 c_pfP2RImagLUT[32] = /* Q31 */ { 821806080, 418953248 }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_pfWindowLUT[LCLD_PRED_WIN_LEN] = /* Q31 */ { 190779840, 338280192, 610825408, 966922816, 1352359680, 1708457216, 1981002240, 2128502656, 2128502528, 1981002240, 1708456960, 1352359808, 966922624, 610825152, 338280192, 190779776 }; -#endif diff --git a/lib_isar/isar_rom_lcld_tables.h b/lib_isar/isar_rom_lcld_tables.h index 278ca2d74..14264b855 100644 --- a/lib_isar/isar_rom_lcld_tables.h +++ b/lib_isar/isar_rom_lcld_tables.h @@ -130,14 +130,12 @@ extern const Word16 c_aiDefaultTheta48_fx[MAX_BANDS_48]; extern const Word16 c_aaiSpreadFunction48_fx[MAX_BANDS_48 * MAX_BANDS_48]; extern const Word32 c_aiDefaultTheta48[MAX_BANDS_48]; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES extern const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE]; extern const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH]; extern const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE]; extern const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48]; extern const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48]; extern const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48]; -#endif #define PRED_QUNAT_FILTER_MAG_BITS ( 3 ) #define PRED_QUANT_FILTER_PHASE_BITS ( 5 ) @@ -238,8 +236,6 @@ extern const UWord32 c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE]; extern const Word32 c_pfMagLUT[8]; /* Q31 */ extern const Word32 c_pfP2RRealLUT[32]; /* Q31 */ extern const Word32 c_pfP2RImagLUT[32]; /* Q31 */ -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES extern const Word32 c_pfWindowLUT[LCLD_PRED_WIN_LEN]; /* Q31 */ -#endif #endif /* ISAR_ROM_LCLD_TABLES_H_ */ -- GitLab From bd97f1405f6bc6269e93af5e898cd74740602798 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Mon, 11 May 2026 14:44:58 +0200 Subject: [PATCH 2/2] Remove unused Huffman tables --- lib_com/options.h | 1 + lib_dec/ivas_rom_dec.h | 2 ++ lib_dec/ivas_rom_dec_fx.c | 7 ++++++- lib_isar/isar_rom_lcld_tables.c | 14 ++++++++++++++ lib_isar/isar_rom_lcld_tables.h | 4 ++++ 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6e5cdefb1..fe16a0ce7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -101,6 +101,7 @@ #define FIX_BASOP_2095_REMOVE_TABLES_PT01 /* FhG: BASOP issue 2095: remove unused tables, part 01 */ #define FIX_2346_DUPLICATED_IGF_FUNCTIONS_2 /* FhG: part 2 of basop issue 2346: Review potentially duplicated IGF functions */ #define FIX_BASOP_2563_CRASH_HQ_GENERIC_DEC /* Eri: BASOP issue 2563: Crash in hq_generic decoding. EVS code --> solve with _sat operator */ +#define FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Dolby: remove unused ISAR */ #define FIX_BASOP_2560_STEREO_DFT_DEC_RESET /* FhG: BASOP issue 2560: align reset of hStereoDft->res_gains_ind_fx[][] between BASOP and float */ #define HARMONIZE_2539_cng_energy /* FhG: basop issue 2539: harmonize cng_energy with its ivas derivate */ #define FIX_1585_ASAN_FORMAT_SW_ALT /* VA,FhG: float issues 1585,1593: alternative fix memory leaks with format switching */ diff --git a/lib_dec/ivas_rom_dec.h b/lib_dec/ivas_rom_dec.h index aafe3bce9..f79e95cef 100644 --- a/lib_dec/ivas_rom_dec.h +++ b/lib_dec/ivas_rom_dec.h @@ -96,6 +96,8 @@ extern const Word16 dirac_dithering_ele_scale_fx[DIRAC_DIFFUSE_LEVELS]; extern const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df0; extern const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES extern const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_dt; +#endif #endif /* IVAS_ROM_DEC_H */ diff --git a/lib_dec/ivas_rom_dec_fx.c b/lib_dec/ivas_rom_dec_fx.c index 4a42e2cca..0f1b4108a 100644 --- a/lib_dec/ivas_rom_dec_fx.c +++ b/lib_dec/ivas_rom_dec_fx.c @@ -476,6 +476,7 @@ static const Word16 huff_nodes_alpha_1D_DF[64][2] = { -2, -62 } }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Alpha Fine Huffman table dt */ static const Word16 huff_nodes_alpha_1D_DT[64][2] = { @@ -544,6 +545,7 @@ static const Word16 huff_nodes_alpha_1D_DT[64][2] = { -3, -64 }, { -2, -63 } }; +#endif /* Beta Fine Huffman table df0 */ static const Word16 huff_nodes_first_band_beta[8][2] = @@ -557,11 +559,13 @@ static const Word16 huff_nodes_beta_1D_DF[16][2] = { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { 9, 8 }, { -5, -13 }, { 11, 10 }, { -4, -14 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Beta Fine Huffman table dt */ static const Word16 huff_nodes_beta_1D_DT[16][2] = { { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { -13, 8 }, { -5, 9 }, { -14, 10 }, { -4, 11 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } }; +#endif const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df0 = { @@ -575,11 +579,12 @@ const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df = huff_nodes_beta_1D_DF }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_dt = { huff_nodes_alpha_1D_DT, huff_nodes_beta_1D_DT }; - +#endif /* clang-format on */ diff --git a/lib_isar/isar_rom_lcld_tables.c b/lib_isar/isar_rom_lcld_tables.c index 15bdb6b84..287d3f70c 100644 --- a/lib_isar/isar_rom_lcld_tables.c +++ b/lib_isar/isar_rom_lcld_tables.c @@ -294,6 +294,7 @@ const Word32 c_aiQuantMaxValues_fx[ALLOC_TABLE_SIZE] = { 377487360, }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE] = { 0, 3, @@ -328,6 +329,7 @@ const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE] = { 152, 180, }; +#endif const Word32 c_aiHuffmanDim_fx[ALLOC_TABLE_SIZE] = { 2, @@ -469,6 +471,7 @@ const Word32 c_aiHuffmanMod[ALLOC_TABLE_SIZE] = { 1, }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE] = { 1, 16, @@ -503,6 +506,7 @@ const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE] = { 153, 181, }; +#endif const UWord32 c_aaiRMSEnvHuffEnc[64][2] = { { 0x0014, 0x0000 }, @@ -19209,6 +19213,7 @@ const Word16 c_aiLogAddTable_fx[LOG_ADD_TABLE_LENGTH] = { 0x00, }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH] = { 0x40, 0x40, @@ -19723,6 +19728,7 @@ const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH] = { 0x00, 0x00, }; +#endif const Word16 c_aiBandwidthAdjust48_fx[MAX_BANDS_48] = { 0, @@ -19750,6 +19756,7 @@ const Word16 c_aiBandwidthAdjust48_fx[MAX_BANDS_48] = { 213, }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48] = { 0, @@ -19776,6 +19783,7 @@ const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48] = { 180, 213, }; +#endif const Word16 c_aiAbsoluteThresh48_fx[MAX_BANDS_48] = { -1787, @@ -19803,6 +19811,7 @@ const Word16 c_aiAbsoluteThresh48_fx[MAX_BANDS_48] = { -401, }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48] = { -1787, -1787, @@ -19828,6 +19837,7 @@ const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48] = { -409, -401, }; +#endif #if PERCEPTUAL_MODEL_SLGAIN_SHIFT == 4 const Word32 c_aiDefaultTheta48[MAX_BANDS_48] = { @@ -20441,6 +20451,7 @@ const Word16 c_aaiSpreadFunction48_fx[MAX_BANDS_48 * MAX_BANDS_48] = { -114, }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48] = { 0, -1561, @@ -20973,6 +20984,7 @@ const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48] = { -114, }; +#endif const Word32 c_pfMagLUT[8] = /* Q31 */ { 0, 394599072, 775760576, 1130504448, 1446750336, 1713728896, 1922348544, 2065504896 @@ -20996,6 +21008,8 @@ const Word32 c_pfP2RImagLUT[32] = /* Q31 */ { 821806080, 418953248 }; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES const Word32 c_pfWindowLUT[LCLD_PRED_WIN_LEN] = /* Q31 */ { 190779840, 338280192, 610825408, 966922816, 1352359680, 1708457216, 1981002240, 2128502656, 2128502528, 1981002240, 1708456960, 1352359808, 966922624, 610825152, 338280192, 190779776 }; +#endif diff --git a/lib_isar/isar_rom_lcld_tables.h b/lib_isar/isar_rom_lcld_tables.h index 14264b855..278ca2d74 100644 --- a/lib_isar/isar_rom_lcld_tables.h +++ b/lib_isar/isar_rom_lcld_tables.h @@ -130,12 +130,14 @@ extern const Word16 c_aiDefaultTheta48_fx[MAX_BANDS_48]; extern const Word16 c_aaiSpreadFunction48_fx[MAX_BANDS_48 * MAX_BANDS_48]; extern const Word32 c_aiDefaultTheta48[MAX_BANDS_48]; +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES extern const Word32 c_aiQuantMaxValues[ALLOC_TABLE_SIZE]; extern const Word32 c_aiLogAddTable[LOG_ADD_TABLE_LENGTH]; extern const Word32 c_aiHuffmanSize[ALLOC_TABLE_SIZE]; extern const Word32 c_aiBandwidthAdjust48[MAX_BANDS_48]; extern const Word32 c_aiAbsoluteThresh48[MAX_BANDS_48]; extern const Word32 c_aaiSpreadFunction48[MAX_BANDS_48 * MAX_BANDS_48]; +#endif #define PRED_QUNAT_FILTER_MAG_BITS ( 3 ) #define PRED_QUANT_FILTER_PHASE_BITS ( 5 ) @@ -236,6 +238,8 @@ extern const UWord32 c_aaiRMSEnvHuffDec[13][HUFF_DEC_TABLE_SIZE]; extern const Word32 c_pfMagLUT[8]; /* Q31 */ extern const Word32 c_pfP2RRealLUT[32]; /* Q31 */ extern const Word32 c_pfP2RImagLUT[32]; /* Q31 */ +#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES extern const Word32 c_pfWindowLUT[LCLD_PRED_WIN_LEN]; /* Q31 */ +#endif #endif /* ISAR_ROM_LCLD_TABLES_H_ */ -- GitLab