diff --git a/lib_com/options.h b/lib_com/options.h index c89a248523c74e65af1066e010bed50f31522194..102346ef189a42013f7a762b86af49b500222360 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -123,7 +123,7 @@ #define FIX_NCHAN_BUFFERS /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */ #define FIX_RENDERER_STACK /* VA: issue 1322: reduction of renderers' buffers size */ #define JBM_MEMORY_OPT /* VA: issue 916: optimization of RAM in the JBM decoder */ -/*#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP*/ /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ +#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ #define FIX_1370_EXTERNAL_ORIENTATION_CHECK /* Nokia: add sanity check for Euler angles for external orientations */ #define FIX_1413_IGF_INIT_PRINTOUT /* FhG: use correct variable for IGF initiliazation */ #define CODE_IMPROVEMENTS diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 6489dadb4c1f43cffb5a4fc5dfdde17717420832..5ff092d963778e3be16f8efda595a8962275ac9d 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -804,6 +804,10 @@ ivas_error ivas_jbm_dec_tc_fx( { Scale_sig32( p_output_fx[n], output_frame, sub( Q11, output_q ) ); // Q11 } +#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP + st_ivas->hCPE[0]->q_output_mem_fx[0] = output_q; + st_ivas->hCPE[0]->q_output_mem_fx[1] = output_q; +#endif } } ELSE IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) ) diff --git a/lib_dec/ivas_omasa_dec_fx.c b/lib_dec/ivas_omasa_dec_fx.c index b1435fe775f87c518fa881796d9a36bbe79615a6..30f307731929f1f28f8c7ad8f9ff2fad660f5219 100644 --- a/lib_dec/ivas_omasa_dec_fx.c +++ b/lib_dec/ivas_omasa_dec_fx.c @@ -757,6 +757,19 @@ ivas_error ivas_omasa_dec_config_fx( /* ISM renderer handle + ISM data handle */ ivas_omasa_separate_object_renderer_close( st_ivas ); } +#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP + + IF( EQ_32( old_renderer_type, RENDERER_MONO_DOWNMIX ) ) + { + DECODER_TC_BUFFER_HANDLE hTcBuffer = st_ivas->hTcBuffer; + Word16 n_samples_still_available = sub( hTcBuffer->n_samples_buffered, hTcBuffer->n_samples_rendered ); + + FOR( k = 0; k < hTcBuffer->nchan_transport_internal; k++ ) + { + Scale_sig32( hTcBuffer->tc_buffer_old_fx[k], n_samples_still_available, st_ivas->hCPE[0]->q_output_mem_fx[0] - Q11 ); + } + } +#endif } IF( EQ_32( st_ivas->renderer_type, RENDERER_OMASA_MIX_EXT ) )