Commit ca7b3a43 authored by norvell's avatar norvell
Browse files

Add id in renderer configuration struct

parent d54356db
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -337,6 +337,10 @@ typedef struct _IVAS_RENDER_CONFIG
    ISAR_SPLIT_REND_CONFIG_DATA split_rend_config;
    float directivity[IVAS_MAX_NUM_OBJECTS * 3];
    float distAtt[3];
#ifdef NONBE_1377_REND_DIRATT_CONF
    int16_t object_id[IVAS_MAX_NUM_OBJECTS];
    int16_t number_of_objects;
#endif

} IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE;

+2 −6
Original line number Diff line number Diff line
@@ -681,7 +681,7 @@ ivas_error ivas_td_binaural_open_ext(
    LSSETUP_CUSTOM_STRUCT *customLsInput,
#ifdef NONBE_1377_REND_DIRATT_CONF
    const int32_t outFs,     /* i: output sampling rate */
    const IVAS_REND_InputId id /* i: ISM ID */
    const int16_t ism_number /* i: ISM number */
)
#else
    const int32_t outFs )
@@ -692,9 +692,6 @@ ivas_error ivas_td_binaural_open_ext(
    IVAS_FORMAT ivas_format;
    IVAS_OUTPUT_SETUP hTransSetup;
    ivas_error error;
#ifdef NONBE_1377_REND_DIRATT_CONF
    int16_t ism_number;
#endif

    float *distAtt = NULL;
    float *directivity = NULL;
@@ -726,7 +723,6 @@ ivas_error ivas_td_binaural_open_ext(
    if ( NULL != hRendCfg )
    {
#ifdef NONBE_1377_REND_DIRATT_CONF
        ism_number = ( id & 0x00FF ) - 1; /* Extract ISM number from ID */
        directivity = hRendCfg->directivity + 3 * ism_number;
#else
        directivity = hRendCfg->directivity;
+2 −2
Original line number Diff line number Diff line
@@ -662,8 +662,8 @@ ivas_error ivas_td_binaural_open_ext(
    RENDER_CONFIG_DATA *hRendCfg,                               /* i  : Renderer configuration                  */
    LSSETUP_CUSTOM_STRUCT *customLsInput,
#ifdef NONBE_1377_REND_DIRATT_CONF
    const int32_t outFs,                                        /* i: output sampling rate                      */
    const IVAS_REND_InputId id                                  /* i: ISM ID                                    */
    const int32_t output_Fs,                                    /* i: output sampling rate                      */
    const int16_t ism_number                                    /* i: ISM number                                */
#else
    const int32_t output_Fs 
#endif
+4 −0
Original line number Diff line number Diff line
@@ -136,6 +136,10 @@ ivas_error ivas_render_config_init_from_rom(
    ( *hRenderConfig )->distAtt[1] = 1.0f;   /* Default ref dist */
    ( *hRenderConfig )->distAtt[2] = 1.0f;   /* Default rolloff factor */

#ifdef NONBE_1377_REND_DIRATT_CONF
    ( *hRenderConfig )->number_of_objects = 0;
#endif

    /* ISAR-related parameters */
    ( *hRenderConfig )->split_rend_config.splitRendBitRate = ISAR_MAX_SPLIT_REND_BITRATE;
    ( *hRenderConfig )->split_rend_config.dof = 3;
+14 −3
Original line number Diff line number Diff line
@@ -1569,6 +1569,9 @@ static ivas_error setRendInputActiveIsm(
    AUDIO_CONFIG outConfig;
    input_ism *inputIsm;
    int16_t i;
#ifdef NONBE_1377_REND_DIRATT_CONF
    int16_t ism_number;
#endif

    inputIsm = (input_ism *) input;
    rendCtx = inputIsm->base.ctx;
@@ -1609,7 +1612,11 @@ static ivas_error setRendInputActiveIsm(
    if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
#ifdef NONBE_1377_REND_DIRATT_CONF
        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate, id ) ) != IVAS_ERR_OK )
        ism_number = hRendCfg->number_of_objects;
        hRendCfg->object_id[ism_number] = id;
        hRendCfg->number_of_objects++;

        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate, ism_number ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
#endif
@@ -1621,7 +1628,7 @@ static ivas_error setRendInputActiveIsm(
        for ( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i )
        {
#ifdef NONBE_1377_REND_DIRATT_CONF
            if ( ( error = ivas_td_binaural_open_ext( &inputIsm->splitTdRendWrappers[i], inConfig, hRendCfg, NULL, *inputIsm->base.ctx.pOutSampleRate, id ) ) != IVAS_ERR_OK )
            if ( ( error = ivas_td_binaural_open_ext( &inputIsm->splitTdRendWrappers[i], inConfig, hRendCfg, NULL, *inputIsm->base.ctx.pOutSampleRate, ism_number ) ) != IVAS_ERR_OK )
#else
            if ( ( error = ivas_td_binaural_open_ext( &inputIsm->splitTdRendWrappers[i], inConfig, hRendCfg, NULL, *inputIsm->base.ctx.pOutSampleRate ) ) != IVAS_ERR_OK )
#endif
@@ -1643,7 +1650,11 @@ static ivas_error setRendInputActiveIsm(
    else
    {
#ifdef NONBE_1377_REND_DIRATT_CONF
        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate, id ) ) != IVAS_ERR_OK )
        ism_number = hRendCfg->number_of_objects;
        hRendCfg->object_id[ism_number] = id;
        hRendCfg->number_of_objects++;

        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate, ism_number ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_td_binaural_open_ext( &inputIsm->tdRendWrapper, inConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
#endif