diff --git a/lib_com/options.h b/lib_com/options.h index a713d2520f1f88fac14936439dce827ed554fefa..1b664c5a4887cc6c8449eb83f1e7ee6f7fa14cba 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -113,6 +113,7 @@ #define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR /* Dolby: Remove unused psNoiseGen from ISAR */ #define FIX_1478_UNINIT_ON_BFI /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */ #define FIX_1487_ACCESS_OF_UNINIT_VAL_FROM_ARR_ISM_DTX /* FhG/VA: init nb_bits_metadata to zero */ +#define FIX_1486_INIT_OUTPUT_POINTERS /* FhG: always initialize pointers in renderer flush */ #define FIX_2290_COPY_OF_UNINIT_DATA /* VA: prevent the copy of un-initialized data */ #define CLEANUP_ACELP_ENC /* VA: basop issue 2304: Remove duplicated code in excitation encoding in the ACELP core */ #define CLEANUP_VBR_CAM_ENC /* VA: basop issue 2299: Remove unused core-encoder VBR and CAM code */ diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 6bb9e4b6a33b19102ec9934a211dca861df6ed19..5af98d17ca3186debaa4362850f5d7757d736b28 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -2473,12 +2473,23 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( DECODER_TC_BUFFER_HANDLE hTcBuffer; Word32 *p_output_fx[MAX_LS_CHANNELS + MAX_NUM_OBJECTS]; Word16 nchan_in, nchan_out; +#ifdef FIX_1486_INIT_OUTPUT_POINTERS + Word16 ch_idx; +#endif + IF( !st_ivas->hDecoderConfig->Opt_tsm ) { return IVAS_ERR_OK; } +#ifdef FIX_1486_INIT_OUTPUT_POINTERS + FOR( ch_idx = 0; ch_idx < ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ); ch_idx++ ) + { + p_output_fx[ch_idx] = st_ivas->p_output_fx[ch_idx]; + } +#endif + *nSamplesRendered = 0; move16(); hTcBuffer = st_ivas->hTcBuffer; @@ -2504,7 +2515,9 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( IF( n_slots_still_available ) { +#ifndef FIX_1486_INIT_OUTPUT_POINTERS Word16 ch_idx; +#endif /* render available full slots (with new lower granularity) */ FOR( ch_idx = 0; ch_idx < s_max( hTcBuffer->nchan_transport_rend, hTcBuffer->nchan_buffer_full ); ch_idx++ ) @@ -2534,10 +2547,12 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( move16(); move16(); +#ifndef FIX_1486_INIT_OUTPUT_POINTERS FOR( ch_idx = 0; ch_idx < ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ); ch_idx++ ) { p_output_fx[ch_idx] = st_ivas->p_output_fx[ch_idx]; } +#endif test(); IF( EQ_16( st_ivas->ivas_format, ISM_FORMAT ) ) @@ -2788,7 +2803,11 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( IF( NE_16( st_ivas->ivas_format, MONO_FORMAT ) ) { #ifndef DISABLE_LIMITER +#ifndef FIX_1486_INIT_OUTPUT_POINTERS Word16 ch_idx, exp = 11; +#else + Word16 exp = 11; +#endif move16(); FOR( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ ) {