Commit ed10ba41 authored by vaclav's avatar vaclav
Browse files

port MR

parent 2dba6296
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@

#define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR          /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/
/*#define NONBE_FIX_MC_LFE_LPF */                                  /* Dlb: Adding the LFE LPF filter back for MC content. */
#define FIX_1222_OMASA_DEC_CHANNEL_BUFFERS              /* VA: issue 1222: Reduction of the number of channel buffers in OMASA decoder */

/* #################### End BASOP porting switches ############################ */

+4 −0
Original line number Diff line number Diff line
@@ -1967,7 +1967,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
            {
+4 −0
Original line number Diff line number Diff line
@@ -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 );
+20 −0
Original line number Diff line number Diff line
@@ -389,10 +389,20 @@ Word16 ivas_get_nchan_buffers_dec(
    {
        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 ) );
@@ -552,10 +562,20 @@ Word16 ivas_get_nchan_buffers_dec_ivas_fx(
    {
        nchan_out_buff = add( st_ivas->nchan_ism, CPE_CHANNELS );

#ifdef FIX_1222_OMASA_DEC_CHANNEL_BUFFERS
        test();
        test();
#endif
        IF( EQ_16( 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_16( output_config, IVAS_AUDIO_CONFIG_EXTERNAL ) )
        {
            nchan_out_buff = s_max( nchan_out_buff, audioCfg2channels( st_ivas->intern_config ) );