Commit 6a488819 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

merge cases of RENDERER_OSBA_AMBI and RENDERER_OSBA_LS in ivas_dec

parent 5210f3da
Loading
Loading
Loading
Loading
Loading
+8 −30
Original line number Diff line number Diff line
@@ -773,7 +773,7 @@ ivas_error ivas_dec(
        }
#endif
#ifdef SBA_AND_OBJECTS
        else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI )
        else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS )
        {
            float tmp_ism_out[MAX_OUTPUT_CHANNELS][L_FRAME48k];
            float *p_tmp_ism_out[MAX_OUTPUT_CHANNELS];
@@ -789,36 +789,14 @@ ivas_error ivas_dec(
                delay_signal( tmp_ism_out[n], output_frame, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size );
            }

            ivas_ism2sba( p_tmp_ism_out, st_ivas->hIsmRendererData, st_ivas->hIsmMetaData, st_ivas->nchan_ism, output_frame, st_ivas->hIntSetup.ambisonics_order );

            ivas_sba_upmixer_renderer( st_ivas, &output[st_ivas->nchan_ism], output_frame );

            for ( n = 0; n < nchan_out; n++ )
			if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI )
            {
                v_add( output[n + nchan_ism], tmp_ism_out[n], output[n], output_frame );
                v_multc( output[n], 0.5f, output[n], output_frame );
            }
        }
#endif
#ifdef SBA_AND_OBJECTS
        /* todo: almost the same path as for Ambisonics output. Should be merged at some point. */
        else if ( st_ivas->renderer_type == RENDERER_OSBA_LS )
        {
            float tmp_ism_out[MAX_CICP_CHANNELS][L_FRAME48k];
            float *p_tmp_ism_out[MAX_CICP_CHANNELS];

            for ( n = 0; n < nchan_out; n++ )
            {
                p_tmp_ism_out[n] = &tmp_ism_out[n][0];
                ivas_ism2sba( p_tmp_ism_out, st_ivas->hIsmRendererData, st_ivas->hIsmMetaData, st_ivas->nchan_ism, output_frame, st_ivas->hIntSetup.ambisonics_order );
			}

            for ( n = 0; n < nchan_ism; n++ )
			else
			{
                mvr2r( output[n], tmp_ism_out[n], output_frame );
                delay_signal( tmp_ism_out[n], output_frame, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size );
            }

                ivas_ism_render( st_ivas, p_tmp_ism_out, output_frame );
			}

            ivas_sba_upmixer_renderer( st_ivas, &output[st_ivas->nchan_ism], output_frame );