Loading apps/decoder.c +0 −127 Original line number Diff line number Diff line Loading @@ -32,9 +32,7 @@ #include "lib_dec.h" #include <string.h> #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #include <math.h> #endif #include "cmdl_tools.h" #include "audio_file_writer.h" #include "bitstream_reader.h" Loading @@ -50,9 +48,7 @@ #include "aeid_file_reader.h" #endif #include "split_render_file_read_write.h" #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #include "obj_edit_file_reader.h" #endif #ifdef VARIABLE_SPEED_DECODING #include "tsm_scale_file_reader.h" #include <math.h> Loading Loading @@ -148,9 +144,7 @@ typedef struct bool dpidEnabled; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE char *objEditFileName; #endif } DecArguments; Loading Loading @@ -179,24 +173,15 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #else static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #endif static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar ); #endif #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); #else static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters ); #endif /*------------------------------------------------------------------------------------------* Loading Loading @@ -228,9 +213,7 @@ int main( int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader = NULL; #endif #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; Loading Loading @@ -434,7 +417,6 @@ int main( } } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE /*------------------------------------------------------------------------------------------* * Open object editing instruction file *------------------------------------------------------------------------------------------*/ Loading @@ -447,7 +429,6 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Configure the decoder Loading @@ -457,13 +438,8 @@ int main( uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535; #ifdef LIB_DEC_REVISION if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -780,19 +756,11 @@ int main( if ( arg.voipMode ) { #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec, pcmBuf ); #else error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec, pcmBuf ); #endif } else { #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, hIvasDec, pcmBuf ); #else error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf ); #endif } if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -857,9 +825,7 @@ cleanup: RotationFileReader_close( &refRotReader ); Vector3PairFileReader_close( &referenceVectorReader ); RenderConfigReader_close( &renderConfigReader ); #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader_close( &objectEditFileReader ); #endif if ( BS_Reader_Close( &hBsReader ) != IVAS_ERR_OK ) { Loading Loading @@ -1062,9 +1028,7 @@ static bool parseCmdlIVAS_dec( } arg->objEditEnabled = false; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE arg->objEditFileName = NULL; #endif /*-----------------------------------------------------------------* * Initialization Loading @@ -1091,30 +1055,18 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; i++; } Loading Loading @@ -1264,10 +1216,8 @@ static bool parseCmdlIVAS_dec( { if ( !is_digits_only( argv[i] ) ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error: Render frame size is invalid or not specified!\n\n" ); usage_dec(); #endif return false; } Loading Loading @@ -1598,7 +1548,6 @@ static bool parseCmdlIVAS_dec( { arg->objEditEnabled = true; i++; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( argc - i <= 3 || argv[i][0] == '-' ) { fprintf( stderr, "Error: Object editing instruction filename not specified!\n\n" ); Loading @@ -1615,7 +1564,6 @@ static bool parseCmdlIVAS_dec( arg->objEditFileName = argv[i]; /* read edit instructions from this file */ } i++; #endif } /*-----------------------------------------------------------------* Loading Loading @@ -1824,11 +1772,7 @@ static void usage_dec( void ) fprintf( stdout, " ID and duration pairs, where duration is specified in frames\n" ); #endif fprintf( stdout, " for BINAURAL_ROOM_REVERB output configuration.\n" ); #ifndef FIX_1217_OBJECT_EDIT_FILE_INTERFACE fprintf( stdout, "-obj_edit : Enable objects editing\n" ); #else fprintf( stdout, "-obj_edit File : Object editing instructions file or NULL for built-in example\n" ); #endif fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); Loading Loading @@ -1921,15 +1865,6 @@ static ivas_error initOnFirstGoodFrame( return error; } #ifndef LIB_DEC_REVISION int32_t pcmFrameSize; if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error ); return error; } #endif if ( isSplitRend ) { /* Open split rendering metadata writer */ Loading Loading @@ -1988,7 +1923,6 @@ static ivas_error initOnFirstGoodFrame( } #ifdef LIB_DEC_REVISION int16_t pcmFrameSize; if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { Loading @@ -1996,15 +1930,12 @@ static ivas_error initOnFirstGoodFrame( return error; } #endif int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) ); #ifdef LIB_DEC_REVISION if ( zeroBuf == NULL ) { fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" ); return IVAS_ERR_FAILED_ALLOC; } #endif memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) ); for ( int16_t i = 0; i < numInitialBadFrames; ++i ) Loading Loading @@ -2109,7 +2040,6 @@ static ivas_error initOnFirstGoodFrame( if ( numInitialBadFrames > 0 ) { /* Duplicate good first frame metadata to fill the beginning of stream. */ #ifdef NONBE_FIX_1261_MASA_EXT_META_JBM int16_t fullDelayNumSamplesLocal[3]; int32_t delayTimeScaleLocal; float delayMs; Loading @@ -2122,9 +2052,6 @@ static ivas_error initOnFirstGoodFrame( fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } delayMs = (float) ( fullDelayNumSamplesLocal[0] ) / (float) ( delayTimeScaleLocal ); #else IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL; #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { Loading @@ -2134,9 +2061,6 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t j = 0; j < numInitialBadFrames; ++j ) { #ifndef NONBE_FIX_1261_MASA_EXT_META_JBM float delayMs = (float) ( pFullDelayNumSamples[0] ) / (float) ( *delayTimeScale ); #endif if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); Loading Loading @@ -2185,9 +2109,7 @@ static ivas_error decodeG192( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader, #endif ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) Loading Loading @@ -2230,7 +2152,6 @@ static ivas_error decodeG192( RenderConfigReader *renderConfigReader = NULL; #ifdef VARIABLE_SPEED_DECODING #ifdef LIB_DEC_REVISION if ( arg.tsmEnabled ) { if ( ( error = IVAS_DEC_EnableTsm( hIvasDec ) ) != IVAS_ERR_OK ) Loading @@ -2240,7 +2161,6 @@ static ivas_error decodeG192( } } #endif #endif if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2596,7 +2516,6 @@ static ivas_error decodeG192( return error; } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( arg.objEditFileName != NULL ) { if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) Loading @@ -2605,14 +2524,9 @@ static ivas_error decodeG192( return error; } } #endif /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE do_object_editing( &editableParameters, objectEditFileReader ); #else do_object_editing( &editableParameters ); #endif /* set new object parameters*/ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) Loading Loading @@ -2642,11 +2556,7 @@ static ivas_error decodeG192( } else { #ifdef LIB_DEC_REVISION if ( ( error = IVAS_DEC_GetSamplesRenderer( hIvasDec, nSamplesToRender, IVAS_DEC_PCM_INT16, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, IVAS_DEC_PCM_INT16, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_GetSamplesRenderer(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3138,9 +3048,7 @@ static ivas_error decodeVoIP( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader, #endif IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) { Loading Loading @@ -3419,12 +3327,7 @@ static ivas_error decodeVoIP( } } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( arg.objEditEnabled && arg.objEditFileName != NULL && vec_pos_update == 0 ) #else if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) ) #endif { if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) { Loading @@ -3432,7 +3335,6 @@ static ivas_error decodeVoIP( return error; } } #endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) Loading Loading @@ -3534,11 +3436,7 @@ static ivas_error decodeVoIP( } /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE do_object_editing( &editableParameters, objectEditFileReader ); #else do_object_editing( &editableParameters ); #endif /* set new object parameters */ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) Loading Loading @@ -3572,11 +3470,7 @@ static ivas_error decodeVoIP( { if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #else fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); #endif goto cleanup; } Loading @@ -3588,9 +3482,7 @@ static ivas_error decodeVoIP( if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, NULL, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in initOnFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #endif goto cleanup; } } Loading Loading @@ -3672,22 +3564,12 @@ static ivas_error decodeVoIP( } } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; #else if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #endif if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( vec_pos_update == 0 ) { frame++; Loading @@ -3696,7 +3578,6 @@ static ivas_error decodeVoIP( fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } } #endif #ifdef WMOPS update_mem(); Loading Loading @@ -3860,12 +3741,8 @@ cleanup: *---------------------------------------------------------------------*/ static void do_object_editing( #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ) #else IVAS_EDITABLE_PARAMETERS *editableParameters ) #endif { /* put the objects equally spaced at the horizontal plane */ /* and play a little bit with the gains... */ Loading @@ -3881,7 +3758,6 @@ static void do_object_editing( } } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( objectEditFileReader != NULL ) { ReadObjectEditInfo *readInfo; Loading Loading @@ -3940,7 +3816,6 @@ static void do_object_editing( } else { #endif if ( num_nondiegetic_objects ) { float start_angle, angle_inc; Loading @@ -3964,9 +3839,7 @@ static void do_object_editing( } editableParameters->gain_bed = 0.5f; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE } #endif return; Loading apps/isar_post_rend.c +0 −18 Original line number Diff line number Diff line Loading @@ -953,9 +953,7 @@ 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 @@ -964,11 +962,7 @@ 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 @@ -1035,23 +1029,12 @@ 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 ) Loading @@ -1060,7 +1043,6 @@ int main( goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { Loading lib_com/ivas_cnst.h +0 −4 Original line number Diff line number Diff line Loading @@ -175,11 +175,7 @@ typedef enum #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #else #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) #endif typedef enum { Loading lib_com/ivas_error.h +7 −4 Original line number Diff line number Diff line Loading @@ -78,9 +78,7 @@ typedef enum IVAS_ERR_DIRECTIVITY_NOT_SUPPORTED, IVAS_ERR_ACOUSTIC_ENVIRONMENT_NOT_SUPPORTED, IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED, #endif IVAS_ERR_INVALID_HRTF, IVAS_ERR_INVALID_HRTF_SAMPLING_RATE, IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA, Loading Loading @@ -136,6 +134,9 @@ typedef enum IVAS_ERR_BITSTREAM_READER_INVALID_FORMAT, IVAS_ERR_NO_FILE_OPEN, IVAS_ERR_SAMPLING_RATE_UNKNOWN, #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT, #endif /*----------------------------------------* * renderer (lib_rend only) * Loading Loading @@ -261,10 +262,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Acoustic environment not supported"; case IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED: return "Objects editing not supported"; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE case IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED: return "Wrong use of both Object editing and Non-diegetic panning"; #endif case IVAS_ERR_INVALID_HRTF: return "Unsupported HRTF filter set"; case IVAS_ERR_INVALID_HRTF_SAMPLING_RATE: Loading @@ -275,6 +274,10 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Invalid input format"; case IVAS_ERR_INVALID_INDEX: return "Invalid index"; #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK case IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT: return "Euler angles were detected in the input but only Quaternions are supported"; #endif default: break; } Loading lib_com/ivas_prot.h +7 −26 Original line number Diff line number Diff line Loading @@ -819,10 +819,6 @@ void ivas_apply_non_diegetic_panning( ivas_error ivas_jbm_dec_tc( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef LIB_DEC_REVISION , float *data /* o : output synthesis signals */ #endif ); ivas_error ivas_jbm_dec_render( Loading Loading @@ -887,13 +883,6 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *tc[], /* i : transport channels */ const int16_t output_frame /* i : output frame size */ ); #endif void ivas_jbm_dec_get_md_map_even_spacing( const int16_t len, /* i : length of the modfied frames in metadata slots */ const int16_t subframe_len, /* i : default length of a subframe */ Loading @@ -908,16 +897,9 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( /*! r: render granularity */ int16_t ivas_jbm_dec_get_render_granularity( #ifdef NONBE_1303_REND_GRANULARITY const RENDERER_TYPE renderer_type, /* i : renderer type */ const RENDERER_TYPE renderer_type_sec, /* i : secondary renderer type */ const int32_t output_Fs /* i : sampling rate */ #else const RENDERER_TYPE rendererType, /* i : renderer type */ const IVAS_FORMAT ivas_format, /* i : ivas format */ const MC_MODE mc_mode, /* i : MC mode */ const int32_t output_Fs /* i : sampling rate */ #endif ); ivas_error ivas_jbm_dec_tc_buffer_open( Loading Loading @@ -1154,14 +1136,6 @@ void ivas_param_ism_dec_prepare_renderer( const uint16_t nCldfbSlots /* i : number of CLDFB slots in transport channels */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_ism_param_dec_tc_gain_ajust( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); #endif void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ Loading Loading @@ -5812,6 +5786,13 @@ void ivas_omasa_render_objects_from_mix( const int16_t output_frame /* i : output frame length per channel */ ); void ivas_omasa_gain_masa_tc( float *output[], /* i/o : output synthesis signal */ const float gainMasa, /* i : gain for MASA transport channels */ const int16_t nchan_transport_ism, /* i : number of ISM TCs */ const int16_t output_frame /* i : output frame length per channel */ ); void ivas_omasa_dirac_rend_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of samples requested */ Loading Loading
apps/decoder.c +0 −127 Original line number Diff line number Diff line Loading @@ -32,9 +32,7 @@ #include "lib_dec.h" #include <string.h> #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #include <math.h> #endif #include "cmdl_tools.h" #include "audio_file_writer.h" #include "bitstream_reader.h" Loading @@ -50,9 +48,7 @@ #include "aeid_file_reader.h" #endif #include "split_render_file_read_write.h" #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #include "obj_edit_file_reader.h" #endif #ifdef VARIABLE_SPEED_DECODING #include "tsm_scale_file_reader.h" #include <math.h> Loading Loading @@ -148,9 +144,7 @@ typedef struct bool dpidEnabled; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE char *objEditFileName; #endif } DecArguments; Loading Loading @@ -179,24 +173,15 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #else static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #endif static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar ); #endif #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); #else static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters ); #endif /*------------------------------------------------------------------------------------------* Loading Loading @@ -228,9 +213,7 @@ int main( int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader = NULL; #endif #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; Loading Loading @@ -434,7 +417,6 @@ int main( } } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE /*------------------------------------------------------------------------------------------* * Open object editing instruction file *------------------------------------------------------------------------------------------*/ Loading @@ -447,7 +429,6 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Configure the decoder Loading @@ -457,13 +438,8 @@ int main( uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535; #ifdef LIB_DEC_REVISION if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -780,19 +756,11 @@ int main( if ( arg.voipMode ) { #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec, pcmBuf ); #else error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec, pcmBuf ); #endif } else { #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, hIvasDec, pcmBuf ); #else error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf ); #endif } if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE ) Loading Loading @@ -857,9 +825,7 @@ cleanup: RotationFileReader_close( &refRotReader ); Vector3PairFileReader_close( &referenceVectorReader ); RenderConfigReader_close( &renderConfigReader ); #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader_close( &objectEditFileReader ); #endif if ( BS_Reader_Close( &hBsReader ) != IVAS_ERR_OK ) { Loading Loading @@ -1062,9 +1028,7 @@ static bool parseCmdlIVAS_dec( } arg->objEditEnabled = false; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE arg->objEditFileName = NULL; #endif /*-----------------------------------------------------------------* * Initialization Loading @@ -1091,30 +1055,18 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "-VOIP" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP; i++; } else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 ) { #ifdef LIB_DEC_REVISION arg->voipMode = true; #else arg->voipMode = 1; #endif arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; i++; } Loading Loading @@ -1264,10 +1216,8 @@ static bool parseCmdlIVAS_dec( { if ( !is_digits_only( argv[i] ) ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error: Render frame size is invalid or not specified!\n\n" ); usage_dec(); #endif return false; } Loading Loading @@ -1598,7 +1548,6 @@ static bool parseCmdlIVAS_dec( { arg->objEditEnabled = true; i++; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( argc - i <= 3 || argv[i][0] == '-' ) { fprintf( stderr, "Error: Object editing instruction filename not specified!\n\n" ); Loading @@ -1615,7 +1564,6 @@ static bool parseCmdlIVAS_dec( arg->objEditFileName = argv[i]; /* read edit instructions from this file */ } i++; #endif } /*-----------------------------------------------------------------* Loading Loading @@ -1824,11 +1772,7 @@ static void usage_dec( void ) fprintf( stdout, " ID and duration pairs, where duration is specified in frames\n" ); #endif fprintf( stdout, " for BINAURAL_ROOM_REVERB output configuration.\n" ); #ifndef FIX_1217_OBJECT_EDIT_FILE_INTERFACE fprintf( stdout, "-obj_edit : Enable objects editing\n" ); #else fprintf( stdout, "-obj_edit File : Object editing instructions file or NULL for built-in example\n" ); #endif fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); Loading Loading @@ -1921,15 +1865,6 @@ static ivas_error initOnFirstGoodFrame( return error; } #ifndef LIB_DEC_REVISION int32_t pcmFrameSize; if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error ); return error; } #endif if ( isSplitRend ) { /* Open split rendering metadata writer */ Loading Loading @@ -1988,7 +1923,6 @@ static ivas_error initOnFirstGoodFrame( } #ifdef LIB_DEC_REVISION int16_t pcmFrameSize; if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) { Loading @@ -1996,15 +1930,12 @@ static ivas_error initOnFirstGoodFrame( return error; } #endif int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) ); #ifdef LIB_DEC_REVISION if ( zeroBuf == NULL ) { fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" ); return IVAS_ERR_FAILED_ALLOC; } #endif memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) ); for ( int16_t i = 0; i < numInitialBadFrames; ++i ) Loading Loading @@ -2109,7 +2040,6 @@ static ivas_error initOnFirstGoodFrame( if ( numInitialBadFrames > 0 ) { /* Duplicate good first frame metadata to fill the beginning of stream. */ #ifdef NONBE_FIX_1261_MASA_EXT_META_JBM int16_t fullDelayNumSamplesLocal[3]; int32_t delayTimeScaleLocal; float delayMs; Loading @@ -2122,9 +2052,6 @@ static ivas_error initOnFirstGoodFrame( fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } delayMs = (float) ( fullDelayNumSamplesLocal[0] ) / (float) ( delayTimeScaleLocal ); #else IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL; #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { Loading @@ -2134,9 +2061,6 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t j = 0; j < numInitialBadFrames; ++j ) { #ifndef NONBE_FIX_1261_MASA_EXT_META_JBM float delayMs = (float) ( pFullDelayNumSamples[0] ) / (float) ( *delayTimeScale ); #endif if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) ); Loading Loading @@ -2185,9 +2109,7 @@ static ivas_error decodeG192( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader, #endif ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) Loading Loading @@ -2230,7 +2152,6 @@ static ivas_error decodeG192( RenderConfigReader *renderConfigReader = NULL; #ifdef VARIABLE_SPEED_DECODING #ifdef LIB_DEC_REVISION if ( arg.tsmEnabled ) { if ( ( error = IVAS_DEC_EnableTsm( hIvasDec ) ) != IVAS_ERR_OK ) Loading @@ -2240,7 +2161,6 @@ static ivas_error decodeG192( } } #endif #endif if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK ) { Loading Loading @@ -2596,7 +2516,6 @@ static ivas_error decodeG192( return error; } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( arg.objEditFileName != NULL ) { if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) Loading @@ -2605,14 +2524,9 @@ static ivas_error decodeG192( return error; } } #endif /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE do_object_editing( &editableParameters, objectEditFileReader ); #else do_object_editing( &editableParameters ); #endif /* set new object parameters*/ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) Loading Loading @@ -2642,11 +2556,7 @@ static ivas_error decodeG192( } else { #ifdef LIB_DEC_REVISION if ( ( error = IVAS_DEC_GetSamplesRenderer( hIvasDec, nSamplesToRender, IVAS_DEC_PCM_INT16, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, IVAS_DEC_PCM_INT16, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_GetSamplesRenderer(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -3138,9 +3048,7 @@ static ivas_error decodeVoIP( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader, #endif IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) { Loading Loading @@ -3419,12 +3327,7 @@ static ivas_error decodeVoIP( } } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( arg.objEditEnabled && arg.objEditFileName != NULL && vec_pos_update == 0 ) #else if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) ) #endif { if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) { Loading @@ -3432,7 +3335,6 @@ static ivas_error decodeVoIP( return error; } } #endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) Loading Loading @@ -3534,11 +3436,7 @@ static ivas_error decodeVoIP( } /* Do object metadata editing here ... */ #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE do_object_editing( &editableParameters, objectEditFileReader ); #else do_object_editing( &editableParameters ); #endif /* set new object parameters */ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) Loading Loading @@ -3572,11 +3470,7 @@ static ivas_error decodeVoIP( { if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #else fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error ); #endif goto cleanup; } Loading @@ -3588,9 +3482,7 @@ static ivas_error decodeVoIP( if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, NULL, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error in initOnFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); #endif goto cleanup; } } Loading Loading @@ -3672,22 +3564,12 @@ static ivas_error decodeVoIP( } } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; #else if ( !arg.quietModeEnabled ) { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #endif if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( vec_pos_update == 0 ) { frame++; Loading @@ -3696,7 +3578,6 @@ static ivas_error decodeVoIP( fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } } #endif #ifdef WMOPS update_mem(); Loading Loading @@ -3860,12 +3741,8 @@ cleanup: *---------------------------------------------------------------------*/ static void do_object_editing( #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ) #else IVAS_EDITABLE_PARAMETERS *editableParameters ) #endif { /* put the objects equally spaced at the horizontal plane */ /* and play a little bit with the gains... */ Loading @@ -3881,7 +3758,6 @@ static void do_object_editing( } } #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( objectEditFileReader != NULL ) { ReadObjectEditInfo *readInfo; Loading Loading @@ -3940,7 +3816,6 @@ static void do_object_editing( } else { #endif if ( num_nondiegetic_objects ) { float start_angle, angle_inc; Loading @@ -3964,9 +3839,7 @@ static void do_object_editing( } editableParameters->gain_bed = 0.5f; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE } #endif return; Loading
apps/isar_post_rend.c +0 −18 Original line number Diff line number Diff line Loading @@ -953,9 +953,7 @@ 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 @@ -964,11 +962,7 @@ 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 @@ -1035,23 +1029,12 @@ 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 ) Loading @@ -1060,7 +1043,6 @@ int main( goto cleanup; } } #endif for ( i = 0; i < args.inConfig.numBinBuses; ++i ) { Loading
lib_com/ivas_cnst.h +0 −4 Original line number Diff line number Diff line Loading @@ -175,11 +175,7 @@ typedef enum #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ #else #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) #endif typedef enum { Loading
lib_com/ivas_error.h +7 −4 Original line number Diff line number Diff line Loading @@ -78,9 +78,7 @@ typedef enum IVAS_ERR_DIRECTIVITY_NOT_SUPPORTED, IVAS_ERR_ACOUSTIC_ENVIRONMENT_NOT_SUPPORTED, IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED, #endif IVAS_ERR_INVALID_HRTF, IVAS_ERR_INVALID_HRTF_SAMPLING_RATE, IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA, Loading Loading @@ -136,6 +134,9 @@ typedef enum IVAS_ERR_BITSTREAM_READER_INVALID_FORMAT, IVAS_ERR_NO_FILE_OPEN, IVAS_ERR_SAMPLING_RATE_UNKNOWN, #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT, #endif /*----------------------------------------* * renderer (lib_rend only) * Loading Loading @@ -261,10 +262,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Acoustic environment not supported"; case IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED: return "Objects editing not supported"; #ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE case IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED: return "Wrong use of both Object editing and Non-diegetic panning"; #endif case IVAS_ERR_INVALID_HRTF: return "Unsupported HRTF filter set"; case IVAS_ERR_INVALID_HRTF_SAMPLING_RATE: Loading @@ -275,6 +274,10 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Invalid input format"; case IVAS_ERR_INVALID_INDEX: return "Invalid index"; #ifdef FIX_1370_EXTERNAL_ORIENTATION_CHECK case IVAS_ERR_EXTERNAL_ORIENTATION_INVALID_FORMAT: return "Euler angles were detected in the input but only Quaternions are supported"; #endif default: break; } Loading
lib_com/ivas_prot.h +7 −26 Original line number Diff line number Diff line Loading @@ -819,10 +819,6 @@ void ivas_apply_non_diegetic_panning( ivas_error ivas_jbm_dec_tc( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifndef LIB_DEC_REVISION , float *data /* o : output synthesis signals */ #endif ); ivas_error ivas_jbm_dec_render( Loading Loading @@ -887,13 +883,6 @@ int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *tc[], /* i : transport channels */ const int16_t output_frame /* i : output frame size */ ); #endif void ivas_jbm_dec_get_md_map_even_spacing( const int16_t len, /* i : length of the modfied frames in metadata slots */ const int16_t subframe_len, /* i : default length of a subframe */ Loading @@ -908,16 +897,9 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( /*! r: render granularity */ int16_t ivas_jbm_dec_get_render_granularity( #ifdef NONBE_1303_REND_GRANULARITY const RENDERER_TYPE renderer_type, /* i : renderer type */ const RENDERER_TYPE renderer_type_sec, /* i : secondary renderer type */ const int32_t output_Fs /* i : sampling rate */ #else const RENDERER_TYPE rendererType, /* i : renderer type */ const IVAS_FORMAT ivas_format, /* i : ivas format */ const MC_MODE mc_mode, /* i : MC mode */ const int32_t output_Fs /* i : sampling rate */ #endif ); ivas_error ivas_jbm_dec_tc_buffer_open( Loading Loading @@ -1154,14 +1136,6 @@ void ivas_param_ism_dec_prepare_renderer( const uint16_t nCldfbSlots /* i : number of CLDFB slots in transport channels */ ); #ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_ism_param_dec_tc_gain_ajust( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); #endif void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ Loading Loading @@ -5812,6 +5786,13 @@ void ivas_omasa_render_objects_from_mix( const int16_t output_frame /* i : output frame length per channel */ ); void ivas_omasa_gain_masa_tc( float *output[], /* i/o : output synthesis signal */ const float gainMasa, /* i : gain for MASA transport channels */ const int16_t nchan_transport_ism, /* i : number of ISM TCs */ const int16_t output_frame /* i : output frame length per channel */ ); void ivas_omasa_dirac_rend_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of samples requested */ Loading