Loading apps/decoder.c +35 −1 Original line number Diff line number Diff line Loading @@ -2265,6 +2265,23 @@ static ivas_error decodeG192( } } #endif #ifdef FIX_HRTF_LOAD_API /* decode transport channels, do TSM and feed to renderer */ if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, isSplitRend, splitRendBits ) ) != IVAS_ERR_OK ) { return error; } #endif #ifdef OBJ_EDITING_API /* Do the final preparations needed for rendering */ if ( ( error = IVAS_DEC_PrepareRenderer( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not prepare the renderer: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif } if ( isSplitRend ) Loading Loading @@ -2714,6 +2731,9 @@ static ivas_error decodeVoIP( int16_t nOutSamples = 0; #ifdef FIX_CREND_SIMPLIFY_CODE bool bitstreamReadDone = false; #ifdef OBJ_EDITING_API bool parametersAvailableForEditing = false; #endif uint16_t nSamplesRendered; #endif Loading Loading @@ -3005,13 +3025,21 @@ static ivas_error decodeVoIP( #endif #ifdef SUPPORT_JBM_TRACEFILE #ifdef FIX_CREND_SIMPLIFY_CODE #ifdef OBJ_EDITING_API if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶metersAvailableForEditing ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered ) ) != IVAS_ERR_OK ) #endif #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter ) ) != IVAS_ERR_OK ) #endif #else #ifdef FIX_CREND_SIMPLIFY_CODE #ifdef OBJ_EDITING_API if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, &bitstreamReadDone, ¶metersAvailableForEditing ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, &bitstreamReadDone ) ) != IVAS_ERR_OK ) #endif #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms ) ) != IVAS_ERR_OK ) #endif Loading Loading @@ -3046,9 +3074,15 @@ static ivas_error decodeVoIP( } } #endif #ifdef FIX_HRTF_LOAD #ifdef OBJ_EDITING_API if ( parametersAvailableForEditing == true ) { /* do the object editing here */ } #endif #ifdef FIX_HRTF_LOAD } /* while ( nSamplesRendered < nOutSamples ) */ #endif /* write JBM Offset file entry */ if ( jbmOffsetWriter != NULL ) Loading apps/renderer.c +8 −0 Original line number Diff line number Diff line Loading @@ -1342,7 +1342,15 @@ int main( masaIds[i] = 0u; } #ifdef NONBE_1377_REND_DIRATT_CONF #ifdef FIX_1377_HANDLE_ERROR_CODE if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_SetObjectIDs: %s\n", ivas_error_to_string( error ) ); goto cleanup; } #else IVAS_REND_SetObjectIDs( hIvasRend ); #endif #endif for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) Loading lib_com/cnst.h +6 −2 Original line number Diff line number Diff line Loading @@ -799,8 +799,12 @@ enum #define CLDFB_NO_COL_MAX_SWITCH 6 /* CLDFB resampling - max number of CLDFB col. for switching */ #define CLDFB_NO_COL_MAX_SWITCH_BFI 10 /* CLDFB resampling - max number of CLDFB col. for switching, BFI */ #define CLDFB_OVRLP_MIN_SLOTS 3 /* CLDFB resampling - minimize processing to minimum required for transition frame ACELP->TCX/HQ */ #ifndef FIX_2085_FLOATING_POINT_LEFTOVERS #define INV_CLDFB_BANDWIDTH ( 1.f / 800.f ) #define INV_CLDFB_BANDWIDTH_Q31 ( 2684355l ) #endif #define INV_CLDFB_BANDWIDTH_Q31 ( 2684355l ) /* ( 1.f / 800.f ) Q31 */ #define INV_CLDFB_BANDWIDTH_MDFT_FAC_Q31 ( 10737418 ) #define CLDFB_BANDWIDTH 800 Loading lib_com/common_api_types.h +12 −0 Original line number Diff line number Diff line Loading @@ -137,9 +137,21 @@ typedef struct _IVAS_ISM_METADATA float yaw; float pitch; Word16 non_diegetic_flag; #ifdef OBJ_EDITING_API Word32 gain_fx; #endif } IVAS_ISM_METADATA; #ifdef OBJ_EDITING_API typedef struct _IVAS_EDITABLE_PARAMETERS { Word16 num_obj; IVAS_ISM_METADATA ism_metadata[IVAS_MAX_NUM_OBJECTS]; Word32 gain_bed_fx; } IVAS_EDITABLE_PARAMETERS; #endif typedef struct { // float w, x, y, z; Loading lib_com/ivas_dirac_com_fx.c +12 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,17 @@ ivas_error ivas_dirac_config_fx( } test(); #ifdef FIX_2085_FLOATING_POINT_LEFTOVERS IF( EQ_32( ivas_format, SBA_FORMAT ) || EQ_32( ivas_format, SBA_ISM_FORMAT ) ) { // 100861_dirac_dec ivas_dirac_config_bands_fx( band_grouping, IVAS_MAX_NUM_BANDS, extract_l( Mpy_32_32_r( Fs, INV_CLDFB_BANDWIDTH_Q31 ) ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft, 1 ); } ELSE { ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, extract_l( Mpy_32_32_r( Fs, INV_CLDFB_BANDWIDTH_Q31 ) ), NULL, 0, 0, hFbMdft, 1 ); } #else IF( EQ_32( ivas_format, SBA_FORMAT ) || EQ_32( ivas_format, SBA_ISM_FORMAT ) ) { // 100861_dirac_dec Loading @@ -227,6 +238,7 @@ ivas_error ivas_dirac_config_fx( { ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, (Word16) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft, 1 ); } #endif return error; } Loading Loading
apps/decoder.c +35 −1 Original line number Diff line number Diff line Loading @@ -2265,6 +2265,23 @@ static ivas_error decodeG192( } } #endif #ifdef FIX_HRTF_LOAD_API /* decode transport channels, do TSM and feed to renderer */ if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, isSplitRend, splitRendBits ) ) != IVAS_ERR_OK ) { return error; } #endif #ifdef OBJ_EDITING_API /* Do the final preparations needed for rendering */ if ( ( error = IVAS_DEC_PrepareRenderer( hIvasDec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError: could not prepare the renderer: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif } if ( isSplitRend ) Loading Loading @@ -2714,6 +2731,9 @@ static ivas_error decodeVoIP( int16_t nOutSamples = 0; #ifdef FIX_CREND_SIMPLIFY_CODE bool bitstreamReadDone = false; #ifdef OBJ_EDITING_API bool parametersAvailableForEditing = false; #endif uint16_t nSamplesRendered; #endif Loading Loading @@ -3005,13 +3025,21 @@ static ivas_error decodeVoIP( #endif #ifdef SUPPORT_JBM_TRACEFILE #ifdef FIX_CREND_SIMPLIFY_CODE #ifdef OBJ_EDITING_API if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶metersAvailableForEditing ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered ) ) != IVAS_ERR_OK ) #endif #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter ) ) != IVAS_ERR_OK ) #endif #else #ifdef FIX_CREND_SIMPLIFY_CODE #ifdef OBJ_EDITING_API if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, &bitstreamReadDone, ¶metersAvailableForEditing ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, &bitstreamReadDone ) ) != IVAS_ERR_OK ) #endif #else if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms ) ) != IVAS_ERR_OK ) #endif Loading Loading @@ -3046,9 +3074,15 @@ static ivas_error decodeVoIP( } } #endif #ifdef FIX_HRTF_LOAD #ifdef OBJ_EDITING_API if ( parametersAvailableForEditing == true ) { /* do the object editing here */ } #endif #ifdef FIX_HRTF_LOAD } /* while ( nSamplesRendered < nOutSamples ) */ #endif /* write JBM Offset file entry */ if ( jbmOffsetWriter != NULL ) Loading
apps/renderer.c +8 −0 Original line number Diff line number Diff line Loading @@ -1342,7 +1342,15 @@ int main( masaIds[i] = 0u; } #ifdef NONBE_1377_REND_DIRATT_CONF #ifdef FIX_1377_HANDLE_ERROR_CODE if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_SetObjectIDs: %s\n", ivas_error_to_string( error ) ); goto cleanup; } #else IVAS_REND_SetObjectIDs( hIvasRend ); #endif #endif for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i ) Loading
lib_com/cnst.h +6 −2 Original line number Diff line number Diff line Loading @@ -799,8 +799,12 @@ enum #define CLDFB_NO_COL_MAX_SWITCH 6 /* CLDFB resampling - max number of CLDFB col. for switching */ #define CLDFB_NO_COL_MAX_SWITCH_BFI 10 /* CLDFB resampling - max number of CLDFB col. for switching, BFI */ #define CLDFB_OVRLP_MIN_SLOTS 3 /* CLDFB resampling - minimize processing to minimum required for transition frame ACELP->TCX/HQ */ #ifndef FIX_2085_FLOATING_POINT_LEFTOVERS #define INV_CLDFB_BANDWIDTH ( 1.f / 800.f ) #define INV_CLDFB_BANDWIDTH_Q31 ( 2684355l ) #endif #define INV_CLDFB_BANDWIDTH_Q31 ( 2684355l ) /* ( 1.f / 800.f ) Q31 */ #define INV_CLDFB_BANDWIDTH_MDFT_FAC_Q31 ( 10737418 ) #define CLDFB_BANDWIDTH 800 Loading
lib_com/common_api_types.h +12 −0 Original line number Diff line number Diff line Loading @@ -137,9 +137,21 @@ typedef struct _IVAS_ISM_METADATA float yaw; float pitch; Word16 non_diegetic_flag; #ifdef OBJ_EDITING_API Word32 gain_fx; #endif } IVAS_ISM_METADATA; #ifdef OBJ_EDITING_API typedef struct _IVAS_EDITABLE_PARAMETERS { Word16 num_obj; IVAS_ISM_METADATA ism_metadata[IVAS_MAX_NUM_OBJECTS]; Word32 gain_bed_fx; } IVAS_EDITABLE_PARAMETERS; #endif typedef struct { // float w, x, y, z; Loading
lib_com/ivas_dirac_com_fx.c +12 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,17 @@ ivas_error ivas_dirac_config_fx( } test(); #ifdef FIX_2085_FLOATING_POINT_LEFTOVERS IF( EQ_32( ivas_format, SBA_FORMAT ) || EQ_32( ivas_format, SBA_ISM_FORMAT ) ) { // 100861_dirac_dec ivas_dirac_config_bands_fx( band_grouping, IVAS_MAX_NUM_BANDS, extract_l( Mpy_32_32_r( Fs, INV_CLDFB_BANDWIDTH_Q31 ) ), dirac_to_spar_md_bands, hQMetaData->useLowerBandRes, hConfig->enc_param_start_band, hFbMdft, 1 ); } ELSE { ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, extract_l( Mpy_32_32_r( Fs, INV_CLDFB_BANDWIDTH_Q31 ) ), NULL, 0, 0, hFbMdft, 1 ); } #else IF( EQ_32( ivas_format, SBA_FORMAT ) || EQ_32( ivas_format, SBA_ISM_FORMAT ) ) { // 100861_dirac_dec Loading @@ -227,6 +238,7 @@ ivas_error ivas_dirac_config_fx( { ivas_dirac_config_bands_fx( band_grouping, hConfig->nbands, (Word16) ( Fs * INV_CLDFB_BANDWIDTH + 0.5f ), NULL, 0, 0, hFbMdft, 1 ); } #endif return error; } Loading