Commit 3ddbba0a authored by norvell's avatar norvell
Browse files

Add id in renderer configuration struct

parent 24ff31c3
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -325,6 +325,11 @@ 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;

typedef struct
+2 −6
Original line number Diff line number Diff line
@@ -661,7 +661,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 )
@@ -672,9 +672,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;
@@ -706,7 +703,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
@@ -642,8 +642,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
+3 −0
Original line number Diff line number Diff line
@@ -134,6 +134,9 @@ ivas_error ivas_render_config_init_from_rom(
    ( *hRenderConfig )->distAtt[1] = 1.0f;   /* Default ref dist */
    ( *hRenderConfig )->distAtt[2] = 1.0f;   /* Default rolloff factor */
    ( *hRenderConfig )->split_rend_config.splitRendBitRate = SPLIT_REND_768k;
#ifdef NONBE_1377_REND_DIRATT_CONF
    ( *hRenderConfig )->number_of_objects = 0;
#endif
    ( *hRenderConfig )->split_rend_config.dof = 3;
    ( *hRenderConfig )->split_rend_config.hq_mode = 0;
    ( *hRenderConfig )->split_rend_config.codec_delay_ms = 0;
+14 −3
Original line number Diff line number Diff line
@@ -1288,6 +1288,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;
@@ -1327,7 +1330,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
@@ -1339,7 +1346,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
@@ -1361,7 +1368,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