Commit e9d2b0ae authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

render OSBA objects to BINAURAL_ROOM_IR using crend

parent b15d981f
Loading
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -1960,6 +1960,16 @@ ivas_error ivas_init_decoder(
                }
            }
		}
#ifdef NONBE_FIX_1141_OSBA_ROOM_RENDERING
		else if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_7_1_4 )
		{
			if ((error = ivas_rend_openCrend(&(st_ivas->hCrendWrapper), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config,
				st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hHrtfStatistics, st_ivas->hDecoderConfig->output_Fs, (st_ivas->hSplitBinRend == NULL) ? 1 : st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses)) != IVAS_ERR_OK)
			{
				return error;
			}
		}
#endif
    }

    /*-----------------------------------------------------------------*
+5 −1
Original line number Diff line number Diff line
@@ -749,7 +749,11 @@ void ivas_ism_dec_digest_tc(

                if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING ||
                       st_ivas->renderer_type == RENDERER_OSBA_LS ||
                       st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) &&
                       st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM
#ifdef NONBE_FIX_1141_OSBA_ROOM_RENDERING
					|| ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
#endif
					) &&
                     st_ivas->hCombinedOrientationData == NULL )
                {
                    if ( st_ivas->hIntSetup.is_planar_setup )
+5 −1
Original line number Diff line number Diff line
@@ -281,7 +281,11 @@ void ivas_ism_render_sf(
        n_samples_rendered_loop += n_samples_in_subframe;
        /* update rendered subframe and slots info for all cases apart from a following crend call, the update will
           then happen in the crend call*/
        if ( renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM )
        if ( renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM 
#ifdef NONBE_FIX_1141_OSBA_ROOM_RENDERING
			&& !(renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
#endif
			)
        {
            st_ivas->hTcBuffer->subframes_rendered += 1;
            st_ivas->hTcBuffer->slots_rendered += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx];
+14 −0
Original line number Diff line number Diff line
@@ -289,9 +289,23 @@ ivas_error ivas_osba_render_sf(
        ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output_ism, *nSamplesRendered );
    }

	if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
	{
		if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, IVAS_AUDIO_CONFIG_7_1_4, 
		   IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, NULL, NULL, 
		   st_ivas->hTcBuffer, p_output_ism, p_output_ism, *nSamplesRendered, st_ivas->hDecoderConfig->output_Fs, 0
	       ) ) != IVAS_ERR_OK)
		{
			return error;
		}
	}


    for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ )
    {
#ifndef NONBE_FIX_1141_OSBA_ROOM_RENDERING
        if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM )
#endif
        {
            v_add( p_output[n], p_output_ism[n], p_output[n], *nSamplesRendered );
        }