Commit 6e8d5a16 authored by vaclav's avatar vaclav
Browse files

Merge branch '1159-split-rendering-config-executed-in-non-split-rendering-cases' into 'main'

Resolve "Split rendering config executed in non-split rendering cases"

See merge request !1728
parents 8ab9642b f86fbcdd
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@
#define FIX_1152_UNINIT_VAL_IN_ITD_VAD_COMPUTATION      /* FhG: fix uninitialized value being used in ITD VAD mid signal computation that does not affect synthesis, but crashes BASOPs */
#define FIX_1157_OBSOLETE_DMX_TABLE                     /* FhG: remove obsolte ParamMC DMX table ivas_param_mc_dmx_fac_CICP19_4tc[] */
#define FIX_1135_EXT_RENDERER_HANDLES                   /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */
#define FIX_1159_SPLIT_RENDERING_CONFIG                 /* VA: issue 1159: Execute split rendering config only for split rendering outputs. */

/* #################### End BE switches ################################## */

+9 −2
Original line number Diff line number Diff line
@@ -2230,10 +2230,17 @@ ivas_error IVAS_DEC_FeedRenderConfig(
        hRenderConfig->split_rend_config.poseCorrectionMode = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE;
    }

#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    if ( is_split_rendering_enabled( hIvasDec->st_ivas->hDecoderConfig, hRenderConfig ) )
    {
#endif
        if ( ( error = isar_split_rend_validate_config( &hRenderConfig->split_rend_config, ( hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    }
#endif

    return IVAS_ERR_OK;
}
+19 −10
Original line number Diff line number Diff line
@@ -609,7 +609,9 @@ static ivas_error validateOutputSampleRate(
        /* Otherwise rendering to binaural, support the same set as IVAS decoder */
        switch ( sampleRate )
        {
#ifndef FIX_1159_SPLIT_RENDERING_CONFIG
            case 8000:
#endif
            case 16000:
            case 32000:
            case 48000:
@@ -2930,7 +2932,7 @@ ivas_error IVAS_REND_Open(
    {
        if ( ( hIvasRend->splitRendWrapper = (SPLIT_REND_WRAPPER *) malloc( sizeof( SPLIT_REND_WRAPPER ) ) ) == NULL )
        {
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS decoder handle" );
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS renderer handle" );
        }

        isar_init_split_rend_handles( hIvasRend->splitRendWrapper );
@@ -4253,7 +4255,7 @@ ivas_error IVAS_REND_InitConfig(
 *-------------------------------------------------------------------*/

ivas_error IVAS_REND_GetRenderConfig(
    IVAS_REND_HANDLE hIvasRend,            /* i/o: IVAS decoder handle         */
    IVAS_REND_HANDLE hIvasRend,            /* i/o: IVAS renderer handle        */
    const IVAS_RENDER_CONFIG_HANDLE hRCout /* o  : Render configuration handle */
)
{
@@ -4316,7 +4318,7 @@ ivas_error IVAS_REND_GetRenderConfig(
 *-------------------------------------------------------------------*/

ivas_error IVAS_REND_FeedRenderConfig(
    IVAS_REND_HANDLE hIvasRend,                /* i/o: IVAS decoder handle         */
    IVAS_REND_HANDLE hIvasRend,                /* i/o: IVAS renderer handle        */
    const IVAS_RENDER_CONFIG_DATA renderConfig /* i  : Render configuration struct */
)
{
@@ -4466,10 +4468,17 @@ ivas_error IVAS_REND_FeedRenderConfig(

    hRenderConfig->split_rend_config.codec = renderConfig.split_rend_config.codec;

#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    if ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
#endif
        if ( ( error = isar_split_rend_validate_config( &hRenderConfig->split_rend_config, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#ifdef FIX_1159_SPLIT_RENDERING_CONFIG
    }
#endif

    /* Must re-initialize split rendering config in case renderer config is updated after adding renderer inputs */
    /* if its not initialized yet then no need to re-initialize, initialization will happen while adding inputs*/
@@ -7975,7 +7984,7 @@ int32_t IVAS_REND_GetCntFramesLimited(
 *---------------------------------------------------------------------*/

ivas_error IVAS_REND_GetHrtfHandle(
    IVAS_REND_HANDLE hIvasRend,    /* i/o: IVAS decoder handle      */
    IVAS_REND_HANDLE hIvasRend,    /* i/o: IVAS renderer handle     */
    IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o  : HRTF handle              */
)
{
@@ -7997,7 +8006,7 @@ ivas_error IVAS_REND_GetHrtfHandle(
 *---------------------------------------------------------------------*/

ivas_error IVAS_REND_GetHrtfCRendHandle(
    IVAS_REND_HANDLE hIvasRend,             /* i/o: IVAS decoder handle      */
    IVAS_REND_HANDLE hIvasRend,             /* i/o: IVAS renderer handle     */
    IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o  : Set of HRTF handle       */
)
{
@@ -8019,7 +8028,7 @@ ivas_error IVAS_REND_GetHrtfCRendHandle(
 *---------------------------------------------------------------------*/

ivas_error IVAS_REND_GetHrtfFastConvHandle(
    IVAS_REND_HANDLE hIvasRend,                   /* i/o: IVAS decoder handle    */
    IVAS_REND_HANDLE hIvasRend,                   /* i/o: IVAS renderer handle   */
    IVAS_DEC_HRTF_FASTCONV_HANDLE **hHrtfFastConv /* o  : FASTCONV HRTF handle   */
)
{
@@ -8041,7 +8050,7 @@ ivas_error IVAS_REND_GetHrtfFastConvHandle(
 *---------------------------------------------------------------------*/

ivas_error IVAS_REND_GetHrtfParamBinHandle(
    IVAS_REND_HANDLE hIvasRend,                   /* i/o: IVAS decoder handle                 */
    IVAS_REND_HANDLE hIvasRend,                   /* i/o: IVAS renderer handle                */
    IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin /* o  : Parametric binauralizer HRTF handle */
)
{
@@ -8062,7 +8071,7 @@ ivas_error IVAS_REND_GetHrtfParamBinHandle(
 *---------------------------------------------------------------------*/

ivas_error IVAS_REND_GetHrtfStatisticsHandle(
    IVAS_REND_HANDLE hIvasRend,                       /* i/o: IVAS decoder handle     */
    IVAS_REND_HANDLE hIvasRend,                       /* i/o: IVAS renderer handle    */
    IVAS_DEC_HRTF_STATISTICS_HANDLE **hHrtfStatistics /* o  : HRTF statistics handle  */
)
{
+2 −2
Original line number Diff line number Diff line
@@ -243,12 +243,12 @@ ivas_error IVAS_REND_InitConfig(
);

ivas_error IVAS_REND_GetRenderConfig(
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS decoder handle                                 */
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS renderer handle                                */
    const IVAS_RENDER_CONFIG_HANDLE hRCout          /* o  : Render configuration handle                         */
);

ivas_error IVAS_REND_FeedRenderConfig(
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS decoder handle                                 */
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS renderer handle                                */
    const IVAS_RENDER_CONFIG_DATA renderConfig      /* i  : Render configuration struct                         */
);