diff --git a/lib_com/options.h b/lib_com/options.h index 1ac25c892fd804bcd30fe835e1f6cb17047288fb..67f7d8cc9a5081f50b9b2d48aa5a7b51ffb7fe53 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -107,6 +107,7 @@ #define NONBE_FIX_2205_SATURATE_ALTERNATIVE #define NONBE_FIX_2206_SATURATE_ALTERNATIVE +#define FIX_2226_ISAR_PRE_CRASH_CLDFB_NO_CHANNELS /* Dolby: Fix crash of ISAR pre-renderer due to an attempt of re-scaling uninitialized values in the CLDFB filter bank */ /* ################### End FIXES switches ########################### */ diff --git a/lib_isar/lib_isar_pre_rend.c b/lib_isar/lib_isar_pre_rend.c index 1447658a1601e839be0a7be6521f97d7bddc391c..11bb0f808ea2390979d88800246db7e3034eb1e2 100644 --- a/lib_isar/lib_isar_pre_rend.c +++ b/lib_isar/lib_isar_pre_rend.c @@ -391,7 +391,11 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( q_final = sub( s_min( Q_buff_re, Q_buff_im ), 2 ); FOR( i = 0; i < hSplitBin->hSplitBinLCLDEnc->iChannels; i++ ) { +#ifdef FIX_2226_ISAR_PRE_CRASH_CLDFB_NO_CHANNELS + FOR( j = 0; j < hSplitBin->hSplitBinLCLDEnc->iNumBlocks; j++ ) +#else FOR( j = 0; j < CLDFB_NO_COL_MAX; j++ ) +#endif { Scale_sig32( Cldfb_In_BinReal_fx[i][j], CLDFB_NO_CHANNELS_MAX, sub( q_final, Q_buff_re ) ); Scale_sig32( Cldfb_In_BinImag_fx[i][j], CLDFB_NO_CHANNELS_MAX, sub( q_final, Q_buff_im ) );