Commit 24d62793 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge branch 'b_20230817_jbm-for-osba' of...

Merge branch 'b_20230817_jbm-for-osba' of git01.iis.fhg.de:ame/ivas_development/ivas-3gpp-forge-mirror into b_20230817_jbm-for-osba
parents daf47c50 47989d1c
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -512,6 +512,17 @@ ivas_error ivas_jbm_dec_tc(
            /* loudness correction */
            ivas_dirac_dec_binaural_sba_gain( &output[sba_ch_idx], nchan_remapped, output_frame );
        }
        else if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {

            ivas_mono_downmix_render_passive( st_ivas, output, output_frame );

            /* add W */
            for ( n = 0; n < nchan_out; n++ )
            {
                v_add( output[n], output[n + max( nchan_out, nchan_ism )], output[n], output_frame );
            }
        }
    }
#endif
    else if ( st_ivas->ivas_format == MC_FORMAT )
@@ -1172,8 +1183,7 @@ ivas_error ivas_jbm_dec_render(
                    return error;
                }
            }
            else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO ||
                      st_ivas->renderer_type == RENDERER_MONO_DOWNMIX )
            else if ( st_ivas->renderer_type == RENDERER_OSBA_STEREO )
            {
                *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal );
                /* render objects */
+3 −21
Original line number Diff line number Diff line
@@ -248,14 +248,10 @@ ivas_error ivas_spar_dec_open(
        granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS );
#endif

        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO 
#ifndef JBM_FOR_OSBA
			|| st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO
#endif		
			) )
        if ( ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO ) )
        {
#ifdef JBM_FOR_OSBA
            if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) )
            if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) )
            {
                nchan_tc = st_ivas->hDecoderConfig->nchan_out + st_ivas->nchan_ism;
                nchan_to_allocate = nchan_tc + st_ivas->nchan_ism;
@@ -268,21 +264,7 @@ ivas_error ivas_spar_dec_open(
                nchan_to_allocate = nchan_tc;
            }
        }
#ifdef JBM_FOR_OSBA
        else if ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO )
		{
            if ( ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) )
            {
                nchan_tc += st_ivas->nchan_ism;
            }
            else
            {
                buffer_mode = TC_BUFFER_MODE_BUFFER;
                nchan_tc = st_ivas->hDecoderConfig->nchan_out;
                nchan_to_allocate = nchan_tc;
            }
		}
#endif

        else if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
        {
            nchan_to_allocate = 2 * BINAURAL_CHANNELS;