Loading apps/decoder.c +9 −0 Original line number Original line Diff line number Diff line Loading @@ -534,6 +534,15 @@ static ivas_error IVAS_RTP_ApplyPiData( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, } } break; break; #ifdef RTP_S4_251135_CR26253_0016_REV1 case IVAS_PI_DIEGETIC_TYPE: { DEBUG_PRINT( stdout, "PI_DIEGETIC_TYPE : %d, %d, %d, %d, %d\n", piData->data.digeticIndicator.isDiegetic[0], piData->data.digeticIndicator.isDiegetic[1], piData->data.digeticIndicator.isDiegetic[2], piData->data.digeticIndicator.isDiegetic[3], piData->data.digeticIndicator.isDiegetic[4] ); IVAS_DEC_setDiegeticInputPI( hIvasDec, piData->data.digeticIndicator.isDiegetic ); } break; #endif default: default: { { fprintf( stderr, "Unhandled PI data of type : %s\n", PiDataNames[piDataType] ); fprintf( stderr, "Unhandled PI data of type : %s\n", PiDataNames[piDataType] ); Loading lib_dec/ivas_objectRenderer_internal.c +12 −0 Original line number Original line Diff line number Diff line Loading @@ -206,14 +206,26 @@ ivas_error ivas_td_binaural_renderer_sf( hIsmMetaData[nS] = &ismMetaData[nS]; hIsmMetaData[nS] = &ismMetaData[nS]; } } #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, hIsmMetaData, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPI : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPISet : false ) ) != IVAS_ERR_OK ) #else if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) #endif { { return error; return error; } } } } else else { { #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, st_ivas->hIsmMetaData, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPI : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPISet : false ) ) != IVAS_ERR_OK ) #else if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, st_ivas->hIsmMetaData ) ) != IVAS_ERR_OK ) if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, st_ivas->hIsmMetaData ) ) != IVAS_ERR_OK ) #endif { { return error; return error; } } Loading lib_dec/lib_dec.c +25 −0 Original line number Original line Diff line number Diff line Loading @@ -3827,6 +3827,31 @@ void IVAS_DEC_resetExternalOrientations( } } #endif #ifdef RTP_S4_251135_CR26253_0016_REV1 /*---------------------------------------------------------------------* * IVAS_DEC_setDiegeticInput( ) * * Set isDiegeticInput flag for combined orientation handle based on PI data. *---------------------------------------------------------------------*/ void IVAS_DEC_setDiegeticInputPI( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const bool *diegeticPIValues /* i : diegetic values for the input stream */ ) { if ( hIvasDec->st_ivas->hCombinedOrientationData != NULL ) { int8_t i; for ( i = 0; i < 4; i++ ) { hIvasDec->st_ivas->hCombinedOrientationData->isDiegeticInputPI[i] = diegeticPIValues[i]; } hIvasDec->st_ivas->hCombinedOrientationData->isDiegeticInputPISet = true; } } #endif #endif /*---------------------------------------------------------------------* /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_IsEmpty( ) * IVAS_DEC_VoIP_IsEmpty( ) Loading lib_dec/lib_dec.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -349,6 +349,13 @@ void IVAS_DEC_resetExternalOrientations( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ ); ); #endif #ifdef RTP_S4_251135_CR26253_0016_REV1 void IVAS_DEC_setDiegeticInputPI( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const bool *diegeticPIValues /* i : diegetic values for the input stream */ ); #endif #endif /* Setter functions - apply changes to decoder configuration */ /* Setter functions - apply changes to decoder configuration */ Loading lib_rend/ivas_objectRenderer.c +27 −0 Original line number Original line Diff line number Diff line Loading @@ -363,7 +363,13 @@ ivas_error ivas_td_binaural_renderer_unwrap( if ( subframe_idx == ism_md_subframe_update ) if ( subframe_idx == ism_md_subframe_update ) { { /* Update object position(s) */ /* Update object position(s) */ #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData, ( hCombinedOrientationData != NULL ) ? hCombinedOrientationData->isDiegeticInputPI : NULL, ( hCombinedOrientationData != NULL ) ? hCombinedOrientationData->isDiegeticInputPISet : false ) ) != IVAS_ERR_OK ) #else if ( ( error = TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) if ( ( error = TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) #endif { { return error; return error; } } Loading Loading @@ -531,7 +537,13 @@ ivas_error TDREND_Update_object_positions( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD Renderer handle */ BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD Renderer handle */ const int16_t num_src, /* i : number of sources to render */ const int16_t num_src, /* i : number of sources to render */ const IVAS_FORMAT in_format, /* i : Format of input sources */ const IVAS_FORMAT in_format, /* i : Format of input sources */ #ifdef RTP_S4_251135_CR26253_0016_REV1 const ISM_METADATA_HANDLE *hIsmMetaData, /* i : Input metadata for ISM objects */ const bool *isDiegeticInputPI, /* i : diegetic values for the input streams from the PI data */ const bool isDiegeticInputPISet /* i : is diegetic values obtained from PI data */ #else const ISM_METADATA_HANDLE *hIsmMetaData /* i : Input metadata for ISM objects */ const ISM_METADATA_HANDLE *hIsmMetaData /* i : Input metadata for ISM objects */ #endif ) ) { { #ifndef NONBE_1377_REND_DIRATT_CONF #ifndef NONBE_1377_REND_DIRATT_CONF Loading @@ -544,6 +556,9 @@ ivas_error TDREND_Update_object_positions( #ifndef NONBE_1377_REND_DIRATT_CONF #ifndef NONBE_1377_REND_DIRATT_CONF DirAtten_p = hBinRendererTd->DirAtten_p; DirAtten_p = hBinRendererTd->DirAtten_p; #endif #endif #ifdef RTP_S4_251135_CR26253_0016_REV1 bool isDiegeticSrcPI; #endif /* For each source, write the frame data to the source object*/ /* For each source, write the frame data to the source object*/ for ( nS = 0; nS < num_src; nS++ ) for ( nS = 0; nS < num_src; nS++ ) Loading Loading @@ -571,7 +586,19 @@ ivas_error TDREND_Update_object_positions( return error; return error; } } #ifdef RTP_S4_251135_CR26253_0016_REV1 isDiegeticSrcPI = false; if ( isDiegeticInputPISet && isDiegeticInputPI != NULL ) { if ( isDiegeticInputPI[nS] ) { isDiegeticSrcPI = true; } } if ( hIsmMetaData[nS]->non_diegetic_flag || !isDiegeticSrcPI ) #else if ( hIsmMetaData[nS]->non_diegetic_flag ) if ( hIsmMetaData[nS]->non_diegetic_flag ) #endif { { Pos[0] = 0; Pos[0] = 0; Pos[1] = hIsmMetaData[nS]->azimuth / 90.f; Pos[1] = hIsmMetaData[nS]->azimuth / 90.f; Loading Loading
apps/decoder.c +9 −0 Original line number Original line Diff line number Diff line Loading @@ -534,6 +534,15 @@ static ivas_error IVAS_RTP_ApplyPiData( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, } } break; break; #ifdef RTP_S4_251135_CR26253_0016_REV1 case IVAS_PI_DIEGETIC_TYPE: { DEBUG_PRINT( stdout, "PI_DIEGETIC_TYPE : %d, %d, %d, %d, %d\n", piData->data.digeticIndicator.isDiegetic[0], piData->data.digeticIndicator.isDiegetic[1], piData->data.digeticIndicator.isDiegetic[2], piData->data.digeticIndicator.isDiegetic[3], piData->data.digeticIndicator.isDiegetic[4] ); IVAS_DEC_setDiegeticInputPI( hIvasDec, piData->data.digeticIndicator.isDiegetic ); } break; #endif default: default: { { fprintf( stderr, "Unhandled PI data of type : %s\n", PiDataNames[piDataType] ); fprintf( stderr, "Unhandled PI data of type : %s\n", PiDataNames[piDataType] ); Loading
lib_dec/ivas_objectRenderer_internal.c +12 −0 Original line number Original line Diff line number Diff line Loading @@ -206,14 +206,26 @@ ivas_error ivas_td_binaural_renderer_sf( hIsmMetaData[nS] = &ismMetaData[nS]; hIsmMetaData[nS] = &ismMetaData[nS]; } } #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, hIsmMetaData, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPI : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPISet : false ) ) != IVAS_ERR_OK ) #else if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) #endif { { return error; return error; } } } } else else { { #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, st_ivas->hIsmMetaData, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPI : NULL, ( st_ivas->hCombinedOrientationData != NULL ) ? st_ivas->hCombinedOrientationData->isDiegeticInputPISet : false ) ) != IVAS_ERR_OK ) #else if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, st_ivas->hIsmMetaData ) ) != IVAS_ERR_OK ) if ( ( error = TDREND_Update_object_positions( st_ivas->hBinRendererTd, nchan_ism, st_ivas->ivas_format, st_ivas->hIsmMetaData ) ) != IVAS_ERR_OK ) #endif { { return error; return error; } } Loading
lib_dec/lib_dec.c +25 −0 Original line number Original line Diff line number Diff line Loading @@ -3827,6 +3827,31 @@ void IVAS_DEC_resetExternalOrientations( } } #endif #ifdef RTP_S4_251135_CR26253_0016_REV1 /*---------------------------------------------------------------------* * IVAS_DEC_setDiegeticInput( ) * * Set isDiegeticInput flag for combined orientation handle based on PI data. *---------------------------------------------------------------------*/ void IVAS_DEC_setDiegeticInputPI( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const bool *diegeticPIValues /* i : diegetic values for the input stream */ ) { if ( hIvasDec->st_ivas->hCombinedOrientationData != NULL ) { int8_t i; for ( i = 0; i < 4; i++ ) { hIvasDec->st_ivas->hCombinedOrientationData->isDiegeticInputPI[i] = diegeticPIValues[i]; } hIvasDec->st_ivas->hCombinedOrientationData->isDiegeticInputPISet = true; } } #endif #endif /*---------------------------------------------------------------------* /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_IsEmpty( ) * IVAS_DEC_VoIP_IsEmpty( ) Loading
lib_dec/lib_dec.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -349,6 +349,13 @@ void IVAS_DEC_resetExternalOrientations( IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */ ); ); #endif #ifdef RTP_S4_251135_CR26253_0016_REV1 void IVAS_DEC_setDiegeticInputPI( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const bool *diegeticPIValues /* i : diegetic values for the input stream */ ); #endif #endif /* Setter functions - apply changes to decoder configuration */ /* Setter functions - apply changes to decoder configuration */ Loading
lib_rend/ivas_objectRenderer.c +27 −0 Original line number Original line Diff line number Diff line Loading @@ -363,7 +363,13 @@ ivas_error ivas_td_binaural_renderer_unwrap( if ( subframe_idx == ism_md_subframe_update ) if ( subframe_idx == ism_md_subframe_update ) { { /* Update object position(s) */ /* Update object position(s) */ #ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData, ( hCombinedOrientationData != NULL ) ? hCombinedOrientationData->isDiegeticInputPI : NULL, ( hCombinedOrientationData != NULL ) ? hCombinedOrientationData->isDiegeticInputPISet : false ) ) != IVAS_ERR_OK ) #else if ( ( error = TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) if ( ( error = TDREND_Update_object_positions( hBinRendererTd, num_src, ivas_format, hIsmMetaData ) ) != IVAS_ERR_OK ) #endif { { return error; return error; } } Loading Loading @@ -531,7 +537,13 @@ ivas_error TDREND_Update_object_positions( BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD Renderer handle */ BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD Renderer handle */ const int16_t num_src, /* i : number of sources to render */ const int16_t num_src, /* i : number of sources to render */ const IVAS_FORMAT in_format, /* i : Format of input sources */ const IVAS_FORMAT in_format, /* i : Format of input sources */ #ifdef RTP_S4_251135_CR26253_0016_REV1 const ISM_METADATA_HANDLE *hIsmMetaData, /* i : Input metadata for ISM objects */ const bool *isDiegeticInputPI, /* i : diegetic values for the input streams from the PI data */ const bool isDiegeticInputPISet /* i : is diegetic values obtained from PI data */ #else const ISM_METADATA_HANDLE *hIsmMetaData /* i : Input metadata for ISM objects */ const ISM_METADATA_HANDLE *hIsmMetaData /* i : Input metadata for ISM objects */ #endif ) ) { { #ifndef NONBE_1377_REND_DIRATT_CONF #ifndef NONBE_1377_REND_DIRATT_CONF Loading @@ -544,6 +556,9 @@ ivas_error TDREND_Update_object_positions( #ifndef NONBE_1377_REND_DIRATT_CONF #ifndef NONBE_1377_REND_DIRATT_CONF DirAtten_p = hBinRendererTd->DirAtten_p; DirAtten_p = hBinRendererTd->DirAtten_p; #endif #endif #ifdef RTP_S4_251135_CR26253_0016_REV1 bool isDiegeticSrcPI; #endif /* For each source, write the frame data to the source object*/ /* For each source, write the frame data to the source object*/ for ( nS = 0; nS < num_src; nS++ ) for ( nS = 0; nS < num_src; nS++ ) Loading Loading @@ -571,7 +586,19 @@ ivas_error TDREND_Update_object_positions( return error; return error; } } #ifdef RTP_S4_251135_CR26253_0016_REV1 isDiegeticSrcPI = false; if ( isDiegeticInputPISet && isDiegeticInputPI != NULL ) { if ( isDiegeticInputPI[nS] ) { isDiegeticSrcPI = true; } } if ( hIsmMetaData[nS]->non_diegetic_flag || !isDiegeticSrcPI ) #else if ( hIsmMetaData[nS]->non_diegetic_flag ) if ( hIsmMetaData[nS]->non_diegetic_flag ) #endif { { Pos[0] = 0; Pos[0] = 0; Pos[1] = hIsmMetaData[nS]->azimuth / 90.f; Pos[1] = hIsmMetaData[nS]->azimuth / 90.f; Loading