Loading apps/decoder.c +18 −15 Original line number Diff line number Diff line Loading @@ -767,7 +767,6 @@ int main( } } if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -1471,6 +1470,7 @@ static bool parseCmdlIVAS_dec( strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; to_upper( argv_to_upper ); if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) ) { arg->non_diegetic_pan_gain = 0.f; Loading Loading @@ -1605,6 +1605,7 @@ static bool parseCmdlIVAS_dec( /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ else { fprintf( stderr, "Error: Unknown option %s or wrong number of parameters!\n\n", argv[i] ); Loading Loading @@ -2185,6 +2186,7 @@ static ivas_error initOnFirstGoodFrame( fprintf( stderr, "\nError getting render frame size in samples\n" ); return error; } if ( ( error = IVAS_DEC_GetReferencesUpdateFrequency( hIvasDec, vec_pos_len ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError getting render frame size in samples\n" ); Loading Loading @@ -2288,7 +2290,6 @@ static ivas_error decodeG192( } } for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) { ismWriters[i] = NULL; Loading Loading @@ -2361,9 +2362,9 @@ static ivas_error decodeG192( goto cleanup; } } #endif #endif #endif /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet Loading Loading @@ -2682,7 +2683,7 @@ static ivas_error decodeG192( #endif } /* Write ISm metadata to external file(s) */ /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) Loading Loading @@ -2722,6 +2723,7 @@ static ivas_error decodeG192( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -2756,8 +2758,6 @@ static ivas_error decodeG192( { int16_t nSamplesFlushed; /* Feed into decoder */ /* reference vector */ if ( arg.enableReferenceVectorTracking ) { Loading Loading @@ -2813,7 +2813,7 @@ static ivas_error decodeG192( } } /* decode and get samples */ /* flush remaining audio */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #else Loading @@ -2831,7 +2831,7 @@ static ivas_error decodeG192( goto cleanup; } /* Write ISm metadata to external file(s) */ /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) Loading Loading @@ -2870,6 +2870,7 @@ static ivas_error decodeG192( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3164,11 +3165,13 @@ static ivas_error decodeVoIP( fprintf( stderr, "\nError getting render frame size in samples\n" ); return error; } if ( ( error = IVAS_DEC_GetRenderFramesizeSamples( hIvasDec, &nOutSamples ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError getting render frame size in samples\n" ); return error; } if ( ( error = IVAS_DEC_GetReferencesUpdateFrequency( hIvasDec, &vec_pos_len ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError getting render frame size in samples\n" ); Loading Loading @@ -3210,7 +3213,6 @@ static ivas_error decodeVoIP( goto cleanup; } #ifdef SUPPORT_JBM_TRACEFILE if ( arg.jbmTraceFilename != NULL ) { Loading Loading @@ -3247,6 +3249,7 @@ static ivas_error decodeVoIP( /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } if ( error != IVAS_ERR_OK || rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) { fprintf( stderr, "failed to read first RTP packet\n" ); Loading Loading @@ -3274,7 +3277,6 @@ static ivas_error decodeVoIP( while ( 1 ) { /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) { Loading Loading @@ -3315,7 +3317,6 @@ static ivas_error decodeVoIP( goto cleanup; } /* Head-tracking input simulation */ /* Head-tracking input simulation */ if ( arg.enableHeadRotation ) { Loading Loading @@ -3430,7 +3431,6 @@ static ivas_error decodeVoIP( break; } /* decode and get samples */ #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SUPPORT_JBM_TRACEFILE Loading Loading @@ -3556,6 +3556,7 @@ static ivas_error decodeVoIP( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading @@ -3576,8 +3577,9 @@ static ivas_error decodeVoIP( { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; Loading @@ -3592,7 +3594,7 @@ static ivas_error decodeVoIP( int16_t nSamplesFlushed = 0; /* decode and get samples */ /* flush remaining audio */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #else Loading @@ -3612,7 +3614,7 @@ static ivas_error decodeVoIP( goto cleanup; } /* Write ISm metadata to external file(s) */ /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) Loading Loading @@ -3652,6 +3654,7 @@ static ivas_error decodeVoIP( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading apps/encoder.c +1 −3 Original line number Diff line number Diff line Loading @@ -556,8 +556,8 @@ int main( goto cleanup; } } #endif #endif /*------------------------------------------------------------------------------------------* * Allocate input data buffer *------------------------------------------------------------------------------------------*/ Loading Loading @@ -870,8 +870,6 @@ cleanup: * Local functions *-------------------------------------------------------------------*/ #define IVAS_DEFAULT_AGC ( 0 ) static void initArgStruct( EncArguments *arg ) { /* Set default values here */ Loading lib_com/ivas_ism_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ ivas_error ivas_ism_config( bits_element[n_ISms - 1] += bits_ism % n_ISms; bitbudget_to_brate( bits_element, element_brate, n_ISms ); /* count ISm common signaling bits */ /* count ISM common signaling bits */ if ( hIsmMeta != NULL ) { nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + nchan_ism; Loading lib_dec/ivas_ism_metadata_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ ivas_error ivas_ism_metadata_dec( /*----------------------------------------------------------------* * Read ISM common signaling *----------------------------------------------------------------*/ if ( ism_mode == ISM_SBA_MODE_DISC ) { /* number of objects was read in ivas_dec_setup() */ Loading Loading @@ -448,6 +449,7 @@ ivas_error ivas_ism_metadata_dec( hIsmMetaData->last_true_elevation = hIsmMetaData->elevation; } } /* save number of metadata bits read */ if ( ism_mode == ISM_MODE_DISC || ism_mode == ISM_SBA_MODE_DISC || ism_mode == ISM_MASA_MODE_DISC || ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ ) { Loading Loading @@ -787,6 +789,7 @@ static void decode_angle_indices( nbits_diff_angle1++; } } idx_angle1 = angle->last_angle1_idx + sgn * diff; } Loading Loading @@ -935,6 +938,7 @@ static int16_t decode_radius( nbits_diff_radius++; } } idx_radius = *last_radius_idx + sgn * diff; } Loading Loading @@ -1006,7 +1010,7 @@ void ivas_ism_metadata_sid_dec( if ( !bfi ) { /*----------------------------------------------------------------* * ISm common signaling * ISM common signaling *----------------------------------------------------------------*/ /* number of objects was already read in ivas_ism_get_dtx_dec() */ Loading lib_dec/lib_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -2888,7 +2888,7 @@ static void update_voip_rendered20ms( /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) * IVAS_DEC_Flush( ) * * Function to flush remaining audio in VoIP *---------------------------------------------------------------------*/ Loading Loading
apps/decoder.c +18 −15 Original line number Diff line number Diff line Loading @@ -767,7 +767,6 @@ int main( } } if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -1471,6 +1470,7 @@ static bool parseCmdlIVAS_dec( strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; to_upper( argv_to_upper ); if ( ( strcmp( argv_to_upper, "CENTER" ) == 0 ) || ( strchr( argv_to_upper, 'C' ) != NULL ) ) { arg->non_diegetic_pan_gain = 0.f; Loading Loading @@ -1605,6 +1605,7 @@ static bool parseCmdlIVAS_dec( /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ else { fprintf( stderr, "Error: Unknown option %s or wrong number of parameters!\n\n", argv[i] ); Loading Loading @@ -2185,6 +2186,7 @@ static ivas_error initOnFirstGoodFrame( fprintf( stderr, "\nError getting render frame size in samples\n" ); return error; } if ( ( error = IVAS_DEC_GetReferencesUpdateFrequency( hIvasDec, vec_pos_len ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError getting render frame size in samples\n" ); Loading Loading @@ -2288,7 +2290,6 @@ static ivas_error decodeG192( } } for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) { ismWriters[i] = NULL; Loading Loading @@ -2361,9 +2362,9 @@ static ivas_error decodeG192( goto cleanup; } } #endif #endif #endif /*------------------------------------------------------------------------------------------* * Loop for every packet (frame) of bitstream data * - Read the bitstream packet Loading Loading @@ -2682,7 +2683,7 @@ static ivas_error decodeG192( #endif } /* Write ISm metadata to external file(s) */ /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) Loading Loading @@ -2722,6 +2723,7 @@ static ivas_error decodeG192( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -2756,8 +2758,6 @@ static ivas_error decodeG192( { int16_t nSamplesFlushed; /* Feed into decoder */ /* reference vector */ if ( arg.enableReferenceVectorTracking ) { Loading Loading @@ -2813,7 +2813,7 @@ static ivas_error decodeG192( } } /* decode and get samples */ /* flush remaining audio */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #else Loading @@ -2831,7 +2831,7 @@ static ivas_error decodeG192( goto cleanup; } /* Write ISm metadata to external file(s) */ /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) Loading Loading @@ -2870,6 +2870,7 @@ static ivas_error decodeG192( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading Loading @@ -3164,11 +3165,13 @@ static ivas_error decodeVoIP( fprintf( stderr, "\nError getting render frame size in samples\n" ); return error; } if ( ( error = IVAS_DEC_GetRenderFramesizeSamples( hIvasDec, &nOutSamples ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError getting render frame size in samples\n" ); return error; } if ( ( error = IVAS_DEC_GetReferencesUpdateFrequency( hIvasDec, &vec_pos_len ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError getting render frame size in samples\n" ); Loading Loading @@ -3210,7 +3213,6 @@ static ivas_error decodeVoIP( goto cleanup; } #ifdef SUPPORT_JBM_TRACEFILE if ( arg.jbmTraceFilename != NULL ) { Loading Loading @@ -3247,6 +3249,7 @@ static ivas_error decodeVoIP( /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } if ( error != IVAS_ERR_OK || rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) { fprintf( stderr, "failed to read first RTP packet\n" ); Loading Loading @@ -3274,7 +3277,6 @@ static ivas_error decodeVoIP( while ( 1 ) { /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) { Loading Loading @@ -3315,7 +3317,6 @@ static ivas_error decodeVoIP( goto cleanup; } /* Head-tracking input simulation */ /* Head-tracking input simulation */ if ( arg.enableHeadRotation ) { Loading Loading @@ -3430,7 +3431,6 @@ static ivas_error decodeVoIP( break; } /* decode and get samples */ #ifdef SPLIT_REND_WITH_HEAD_ROT #ifdef SUPPORT_JBM_TRACEFILE Loading Loading @@ -3556,6 +3556,7 @@ static ivas_error decodeVoIP( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading @@ -3576,8 +3577,9 @@ static ivas_error decodeVoIP( { fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; Loading @@ -3592,7 +3594,7 @@ static ivas_error decodeVoIP( int16_t nSamplesFlushed = 0; /* decode and get samples */ /* flush remaining audio */ #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #else Loading @@ -3612,7 +3614,7 @@ static ivas_error decodeVoIP( goto cleanup; } /* Write ISm metadata to external file(s) */ /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) Loading Loading @@ -3652,6 +3654,7 @@ static ivas_error decodeVoIP( { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); Loading
apps/encoder.c +1 −3 Original line number Diff line number Diff line Loading @@ -556,8 +556,8 @@ int main( goto cleanup; } } #endif #endif /*------------------------------------------------------------------------------------------* * Allocate input data buffer *------------------------------------------------------------------------------------------*/ Loading Loading @@ -870,8 +870,6 @@ cleanup: * Local functions *-------------------------------------------------------------------*/ #define IVAS_DEFAULT_AGC ( 0 ) static void initArgStruct( EncArguments *arg ) { /* Set default values here */ Loading
lib_com/ivas_ism_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ ivas_error ivas_ism_config( bits_element[n_ISms - 1] += bits_ism % n_ISms; bitbudget_to_brate( bits_element, element_brate, n_ISms ); /* count ISm common signaling bits */ /* count ISM common signaling bits */ if ( hIsmMeta != NULL ) { nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + nchan_ism; Loading
lib_dec/ivas_ism_metadata_dec.c +5 −1 Original line number Diff line number Diff line Loading @@ -205,6 +205,7 @@ ivas_error ivas_ism_metadata_dec( /*----------------------------------------------------------------* * Read ISM common signaling *----------------------------------------------------------------*/ if ( ism_mode == ISM_SBA_MODE_DISC ) { /* number of objects was read in ivas_dec_setup() */ Loading Loading @@ -448,6 +449,7 @@ ivas_error ivas_ism_metadata_dec( hIsmMetaData->last_true_elevation = hIsmMetaData->elevation; } } /* save number of metadata bits read */ if ( ism_mode == ISM_MODE_DISC || ism_mode == ISM_SBA_MODE_DISC || ism_mode == ISM_MASA_MODE_DISC || ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ ) { Loading Loading @@ -787,6 +789,7 @@ static void decode_angle_indices( nbits_diff_angle1++; } } idx_angle1 = angle->last_angle1_idx + sgn * diff; } Loading Loading @@ -935,6 +938,7 @@ static int16_t decode_radius( nbits_diff_radius++; } } idx_radius = *last_radius_idx + sgn * diff; } Loading Loading @@ -1006,7 +1010,7 @@ void ivas_ism_metadata_sid_dec( if ( !bfi ) { /*----------------------------------------------------------------* * ISm common signaling * ISM common signaling *----------------------------------------------------------------*/ /* number of objects was already read in ivas_ism_get_dtx_dec() */ Loading
lib_dec/lib_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -2888,7 +2888,7 @@ static void update_voip_rendered20ms( /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_Flush( ) * IVAS_DEC_Flush( ) * * Function to flush remaining audio in VoIP *---------------------------------------------------------------------*/ Loading