diff --git a/lib_com/options.h b/lib_com/options.h index 27a2da35ade0d9a99b346322b936ee7ff7cd8ae0..a7c2f1b53d191993429ce11fd99e8025e64ab09d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -138,9 +138,9 @@ #define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ /* #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF */ /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */ - #define FIX_1008_EXTORIENT_TARGET_INTERPOLATION /* FhG: issue #1008, external orientation init was wrong for 5ms */ #define FIX_1009_ISM_NONDIEGETIC_PANNING /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan */ +#define NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER /* FhG: issues #1012, 1013: JBM flush function uses wrong output buffer */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 57063e7b7158e969cd4ffc41d1bd1f3822db9b53..f2a7f6549b0876511fb15dc78fbaa8c9721fe068 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -2672,8 +2672,12 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( Word16 n_slots_still_available; Word16 n_samples_to_render; DECODER_TC_BUFFER_HANDLE hTcBuffer; +#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER + Word32 *p_output_fx[MAX_CICP_CHANNELS + MAX_NUM_OBJECTS]; +#else Word32 output_fx[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES]; Word32 *p_output_fx[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; +#endif Word16 nchan_in, nchan_out; #ifndef SPLIT_REND_WITH_HEAD_ROT Word16 gd_bits, shift, n_chan_inp, i; @@ -2736,10 +2740,17 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( move16(); move16(); +#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER + 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]; + } +#else FOR( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) { p_output_fx[ch_idx] = output_fx[ch_idx]; } +#endif test(); IF( EQ_16( st_ivas->ivas_format, ISM_FORMAT ) ) @@ -2980,9 +2991,15 @@ ivas_error ivas_jbm_dec_flush_renderer_fx( #ifndef DISABLE_LIMITER Word16 ch_idx, exp = 11; move16(); +#ifdef NONBE_FIX_1012_1013_JBM_FLUSH_BUFFER + 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]; +#else FOR( ch_idx = 0; ch_idx < MAX_CICP_CHANNELS; ch_idx++ ) { p_output_fx[ch_idx] = output_fx[ch_idx]; +#endif } ivas_limiter_dec_fx( st_ivas->hLimiter, p_output_fx, st_ivas->hDecoderConfig->nchan_out, *nSamplesRendered, st_ivas->BER_detect, exp ); #endif