diff --git a/lib_com/options.h b/lib_com/options.h index 51594b2b4557728390c3b65d5cd56aa0e9153283..0a0e38e5fdd51fee2b0b6fe39fd803b527569e3b 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -121,6 +121,7 @@ #define NONBE_FIX_1052_SBA_EXT /* Dlb: SBA external output support */ #define NONBE_FIX_MC_LFE_LPF /* Dlb: Adding the LFE LPF filter back for MC content. */ #define NONBE_FIX_1074_NOBJ_SIGNAL_OMASA_LBR /* Nok: issue 1074 fixing number of objects signaling in OMASA low rate */ +#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_masa_dec_fx.c b/lib_dec/ivas_masa_dec_fx.c index ba90382ae389485e34760619f5c1cbb0762c4c79..669a5da2fb302d71f2337b6eb6f22cfd313e7704 100644 --- a/lib_dec/ivas_masa_dec_fx.c +++ b/lib_dec/ivas_masa_dec_fx.c @@ -2028,7 +2028,11 @@ ivas_error ivas_masa_dec_reconfigure_fx( { IF( EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) { +#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS + tc_nchan_to_allocate = add( BINAURAL_CHANNELS, st_ivas->nchan_ism ); +#else tc_nchan_to_allocate = add( shl( BINAURAL_CHANNELS, 1 ), 2 ); +#endif } ELSE { diff --git a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c index 80a114052569461b05a35f215314b34d81b12e60..6485313179665516235179c6d0678a2dbc34e5fa 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c @@ -406,8 +406,12 @@ ivas_error ivas_dirac_dec_init_binaural_data_fx( move16(); if ( EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) { +#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS + nchan_to_allocate = add( BINAURAL_CHANNELS, st_ivas->nchan_ism ); +#else nchan_to_allocate = 2 * BINAURAL_CHANNELS + 2; move16(); +#endif } n_samples_granularity = NS2SA_FX2( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); diff --git a/lib_rend/ivas_output_init_fx.c b/lib_rend/ivas_output_init_fx.c index b30ce1fd1b24877df94a6311208ff67e29bff0b7..a57b9bca1b785b40d34704fcbc3dfaae17db0242 100644 --- a/lib_rend/ivas_output_init_fx.c +++ b/lib_rend/ivas_output_init_fx.c @@ -403,10 +403,20 @@ Word16 ivas_get_nchan_buffers_dec_fx( { nchan_out_buff = add( st_ivas->nchan_ism, CPE_CHANNELS ); +#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS + test(); + test(); +#endif IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) ) { nchan_out_buff = s_max( nchan_out_buff, add( st_ivas->hOutSetup.nchan_out_woLFE, st_ivas->hOutSetup.num_lfe ) ); } +#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS + ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) || EQ_32( st_ivas->renderer_type, RENDERER_STEREO_PARAMETRIC ) ) + { + nchan_out_buff = s_max( nchan_out_buff, add( BINAURAL_CHANNELS, st_ivas->nchan_ism ) ); + } +#endif ELSE IF( NE_32( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) ) { nchan_out_buff = s_max( nchan_out_buff, audioCfg2channels( st_ivas->intern_config ) );