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/isar_post_rend.c +21 −0 Original line number Diff line number Diff line Loading @@ -992,6 +992,9 @@ int main( while ( 1 ) { #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi = 0; #endif int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; Loading @@ -1000,7 +1003,11 @@ int main( { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi ); #else error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten ); #endif if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1067,19 +1074,33 @@ int main( /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi; #endif if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #endif } #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( splitBinNeedsNewFrame ) { if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { 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/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_cnst.h +0 −8 Original line number Diff line number Diff line Loading @@ -1415,16 +1415,8 @@ typedef enum #define LFE_CHANNEL 3 #define MIN_LFE_NRG 0.5f #ifdef ADJUST_MCT_CHANNELS_MAX #define MCT_MAX_CHANNELS 11 /* == 7.1.4 LS channels without the LFE channel */ #define MCT_MAX_BLOCKS ( ( MCT_MAX_CHANNELS + 1 ) / CPE_CHANNELS ) /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/ #else #define MCT_MAX_CHANNELS MAX_TRANSPORT_CHANNELS #define MCT_MAX_BLOCKS ( MCT_MAX_CHANNELS / CPE_CHANNELS ) /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/ #define MAX_NUM_DATA max( MCT_MAX_CHANNELS, 4 ) #endif #define NBBITS_MCT_RATIO 4 #define BITRATE_MCT_RATIO_RANGE ( 1 << NBBITS_MCT_RATIO ) /* Range of the coded bitrate distribution ratio */ 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/isar_post_rend.c +21 −0 Original line number Diff line number Diff line Loading @@ -992,6 +992,9 @@ int main( while ( 1 ) { #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi = 0; #endif int16_t num_in_channels; num_in_channels = inBuffer.config.numChannels; Loading @@ -1000,7 +1003,11 @@ int main( { ivas_error error_tmp; numSamplesRead = (int16_t) inBufferSize; #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi ); #else error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten ); #endif if ( error_tmp != IVAS_ERR_OK ) { if ( error_tmp == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -1067,19 +1074,33 @@ int main( /* Read from split renderer bfi file if specified */ if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame ) { #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST int16_t bfi; #endif if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } #endif } #ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST if ( splitBinNeedsNewFrame ) { if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { 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/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_cnst.h +0 −8 Original line number Diff line number Diff line Loading @@ -1415,16 +1415,8 @@ typedef enum #define LFE_CHANNEL 3 #define MIN_LFE_NRG 0.5f #ifdef ADJUST_MCT_CHANNELS_MAX #define MCT_MAX_CHANNELS 11 /* == 7.1.4 LS channels without the LFE channel */ #define MCT_MAX_BLOCKS ( ( MCT_MAX_CHANNELS + 1 ) / CPE_CHANNELS ) /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/ #else #define MCT_MAX_CHANNELS MAX_TRANSPORT_CHANNELS #define MCT_MAX_BLOCKS ( MCT_MAX_CHANNELS / CPE_CHANNELS ) /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/ #define MAX_NUM_DATA max( MCT_MAX_CHANNELS, 4 ) #endif #define NBBITS_MCT_RATIO 4 #define BITRATE_MCT_RATIO_RANGE ( 1 << NBBITS_MCT_RATIO ) /* Range of the coded bitrate distribution ratio */ Loading