Loading apps/decoder.c +73 −98 Original line number Diff line number Diff line Loading @@ -71,12 +71,11 @@ static #define NUM_BITS_SID_IVAS_5K2 104 #define MAX_OUTPUT_PCM_BUFFER_SIZE ( ( IVAS_MAX_OUTPUT_CHANNELS + IVAS_MAX_NUM_OBJECTS ) * IVAS_MAX_FRAME_SIZE ) #define IVAS_PUBLIC_ORIENT_TRK_NONE ( 0 ) #define IVAS_PUBLIC_ORIENT_TRK_REF ( 1 ) #define IVAS_PUBLIC_ORIENT_TRK_AVG ( 2 ) #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC ( 3 ) #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ( 4 ) #define ORIENT_TRK_NONE ( 0 ) #define ORIENT_TRK_REF ( 1 ) #define ORIENT_TRK_AVG ( 2 ) #define ORIENT_TRK_REF_VEC ( 3 ) #define ORIENT_TRK_REF_VEC_LEV ( 4 ) #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 Loading Loading @@ -343,7 +342,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF ) if ( arg.orientation_tracking != ORIENT_TRK_REF ) { fprintf( stderr, "\nError: Reference rotation file can be used in '-otr ref' mode only.\n\n" ); goto cleanup; Loading @@ -370,7 +369,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC && arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ) if ( arg.orientation_tracking != ORIENT_TRK_REF_VEC && arg.orientation_tracking != ORIENT_TRK_REF_VEC_LEV ) { fprintf( stderr, "\nError: Reference trajectory file can be used in '-otr ref_vec' or '-otr ref_vec_lev' mode only.\n\n" ); goto cleanup; Loading Loading @@ -1026,7 +1025,7 @@ static bool parseCmdlIVAS_dec( arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; arg->orientation_tracking = ORIENT_TRK_NONE; arg->enableReferenceRotation = false; arg->headrotTrajFileName = NULL; arg->enableReferenceVectorTracking = false; Loading Loading @@ -1310,23 +1309,23 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "NONE" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; arg->orientation_tracking = ORIENT_TRK_NONE; } else if ( strcmp( argv_to_upper, "REF" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; arg->orientation_tracking = ORIENT_TRK_REF; } else if ( strcmp( argv_to_upper, "AVG" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_AVG; arg->orientation_tracking = ORIENT_TRK_AVG; } else if ( strcmp( argv_to_upper, "REF_VEC" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC; arg->orientation_tracking = ORIENT_TRK_REF_VEC; } else if ( strcmp( argv_to_upper, "REF_VEC_LEV" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV; arg->orientation_tracking = ORIENT_TRK_REF_VEC_LEV; } else { Loading Loading @@ -1762,7 +1761,7 @@ static ivas_error initOnFirstGoodFrame( IVAS_DEC_HANDLE hIvasDec, /* i/o: */ const DecArguments arg, /* i : */ const int16_t numInitialBadFrames, /* i : */ #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT uint16_t *numOutSamples, /* i/o: */ int16_t *vec_pos_len, /* i/o: */ #else Loading Loading @@ -1890,22 +1889,18 @@ static ivas_error initOnFirstGoodFrame( else { #endif if ( *pRemainingDelayNumSamples < #if defined( SPLIT_REND_WITH_HEAD_ROT ) *numOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT if ( *pRemainingDelayNumSamples < *numOutSamples ) #else numOutSamples if ( *pRemainingDelayNumSamples < numOutSamples ) #endif ) { if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, #if defined( SPLIT_REND_WITH_HEAD_ROT ) *numOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, *numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) #else numOutSamples if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) #endif * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nOutput audio file writer error\n" ); return error; Loading @@ -1914,13 +1909,11 @@ static ivas_error initOnFirstGoodFrame( } else { *pRemainingDelayNumSamples -= #if defined( SPLIT_REND_WITH_HEAD_ROT ) *numOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT *pRemainingDelayNumSamples -= *numOutSamples; #else numOutSamples *pRemainingDelayNumSamples -= numOutSamples; #endif ; } #ifdef SPLIT_REND_WITH_HEAD_ROT } Loading Loading @@ -2010,10 +2003,9 @@ static ivas_error initOnFirstGoodFrame( } } #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT if ( *hSplitRendFileReadWrite != NULL ) { int16_t enable5ms; if ( numOutSamples == NULL || vec_pos_len == NULL ) Loading @@ -2021,7 +2013,10 @@ static ivas_error initOnFirstGoodFrame( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); if ( ( error = IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ) ) != IVAS_ERR_OK ) { return error; } /* real setting of the 5ms mode for split rendering is only known after the decoded first good frame, reset the variables needed in the main decoding loop accordingly here*/ if ( enable5ms ) Loading @@ -2040,11 +2035,13 @@ static ivas_error initOnFirstGoodFrame( return IVAS_ERR_OK; } /*---------------------------------------------------------------------* * decodeG192() * * Read G.192 bitstream and decode in regular decoder *---------------------------------------------------------------------*/ static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, Loading Loading @@ -2073,7 +2070,7 @@ static ivas_error decodeG192( int16_t nOutChannels = 0; int16_t delayNumSamples = -1; int16_t delayNumSamples_orig[3]; #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT uint16_t nOutSamples = 0; #else int16_t nOutSamples = 0; Loading @@ -2094,7 +2091,6 @@ static ivas_error decodeG192( IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } }; int16_t vec_pos_update, vec_pos_len; #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_BITS_DATA splitRendBits; SplitFileReadWrite *hSplitRendFileReadWrite; Loading Loading @@ -2249,8 +2245,7 @@ static ivas_error decodeG192( { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } } Loading @@ -2260,12 +2255,11 @@ static ivas_error decodeG192( for ( i = 0; i < num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK ) #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -2359,42 +2353,36 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &splitRendBits, &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinauralBitstream: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; } else { #endif error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, #if defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, IVAS_DEC_PCM_INT16, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #endif ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; #ifdef SPLIT_REND_WITH_HEAD_ROT } #endif } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK ); if ( error == IVAS_ERR_END_OF_FILE ) Loading @@ -2418,7 +2406,7 @@ static ivas_error decodeG192( hIvasDec, arg, numInitialBadFrames, #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT &nOutSamples, &vec_pos_len, #else Loading Loading @@ -2453,11 +2441,10 @@ static ivas_error decodeG192( if ( decodedGoodFrame ) { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; Loading @@ -2465,11 +2452,10 @@ static ivas_error decodeG192( } else { if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; Loading Loading @@ -2619,21 +2605,17 @@ static ivas_error decodeG192( if ( arg.enableHeadRotation ) { IVAS_QUATERNION Quaternion; if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos[0] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos[0], 0 #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos[0], 0, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos[0], 0 ) ) != IVAS_ERR_OK ) #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading @@ -2641,13 +2623,12 @@ static ivas_error decodeG192( } /* decode and get samples */ if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, #if defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #endif pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -2862,10 +2843,8 @@ static ivas_error printBitstreamInfoVoip( else { auPtr = au; /* might have been set to RTP packet in prev call */ rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSizeBits ); rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSizeBits ); /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } Loading Loading @@ -3027,10 +3006,8 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSize ); rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSize ); /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } Loading Loading @@ -3065,7 +3042,7 @@ static ivas_error decodeVoIP( while ( 1 ) { #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT uint16_t nOutSamples = 0; #else int16_t nOutSamples = 0; Loading @@ -3075,6 +3052,7 @@ static ivas_error decodeVoIP( #else nOutSamples = (int16_t) ( arg.output_Fs / 1000 * JBM_FRONTEND_FETCH_FRAMESIZE_MS ); #endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) { Loading Loading @@ -3127,9 +3105,8 @@ static ivas_error decodeVoIP( /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, #if defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #endif pcmBuf, systemTime_ms Loading @@ -3144,7 +3121,6 @@ static ivas_error decodeVoIP( goto cleanup; } /* write JBM Offset file entry */ if ( jbmOffsetWriter != NULL ) { Loading Loading @@ -3176,14 +3152,14 @@ static ivas_error decodeVoIP( if ( decodedGoodFrame ) { #ifdef SPLIT_REND_WITH_HEAD_ROT SplitFileReadWrite *hSplitRendFileReadWrite = NULL; #endif error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT &nOutSamples, NULL, #else Loading Loading @@ -3218,7 +3194,6 @@ static ivas_error decodeVoIP( } } /* Write current frame */ if ( decodedGoodFrame ) { Loading apps/encoder.c +8 −21 Original line number Diff line number Diff line Loading @@ -406,16 +406,7 @@ int main( } break; case IVAS_ENC_INPUT_SBA: if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg.agc, #endif Loading Loading @@ -445,7 +436,6 @@ int main( goto cleanup; } break; case IVAS_ENC_INPUT_SBA_ISM: if ( ( error = IVAS_ENC_ConfigureForSBAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba_ism.numObjects, arg.inputFormatConfig.sba_ism.order, arg.inputFormatConfig.sba_ism.isPlanar, arg.pca ) ) != IVAS_ERR_OK ) { Loading @@ -453,7 +443,6 @@ int main( exit( -1 ); } break; case IVAS_ENC_INPUT_MASA_ISM: if ( ( error = IVAS_ENC_ConfigureForMASAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.masa_ism.numObjects, arg.inputFormatConfig.masa_ism.masaVariant ) ) != IVAS_ERR_OK ) { Loading @@ -461,7 +450,6 @@ int main( exit( -1 ); } break; default: fprintf( stderr, "\nInvalid input type\n\n" ); goto cleanup; Loading Loading @@ -512,6 +500,7 @@ int main( fprintf( stderr, "\nError: %s\n", ivas_error_to_string( error ) ); goto cleanup; } int16_t inFileNumChannels = 0; error = AudioFileReader_getNumChannels( audioReader, &inFileNumChannels ); switch ( error ) Loading Loading @@ -546,9 +535,7 @@ int main( } } const int16_t numIsmInputs = ( arg.inputFormat == IVAS_ENC_INPUT_ISM || arg.inputFormat == IVAS_ENC_INPUT_MASA_ISM || arg.inputFormat == IVAS_ENC_INPUT_SBA_ISM ) ? arg.inputFormatConfig.ism.numObjects : 0; const int16_t numIsmInputs = ( arg.inputFormat == IVAS_ENC_INPUT_ISM || arg.inputFormat == IVAS_ENC_INPUT_MASA_ISM || arg.inputFormat == IVAS_ENC_INPUT_SBA_ISM ) ? arg.inputFormatConfig.ism.numObjects : 0; for ( i = 0; i < numIsmInputs; ++i ) { Loading apps/renderer.c +127 −84 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_com/bitstream.c +2 −4 Original line number Diff line number Diff line Loading @@ -1662,8 +1662,7 @@ static ivas_error write_indices_element( reset_indices_enc( st_ivas->hSCE[element_id]->hMetaData, st_ivas->hSCE[element_id]->hMetaData->nb_ind_tot ); } reset_indices_enc( sts[0]->hBstr, sts[0]->hBstr->nb_ind_tot ); reset_indices_enc( sts[0]->hBstr, sts[0]->hBstr->nb_ind_tot ); } else { Loading @@ -1674,8 +1673,7 @@ static ivas_error write_indices_element( for ( n = 0; n < n_channels; n++ ) { reset_indices_enc( sts[n]->hBstr, sts[n]->hBstr->nb_ind_tot ); reset_indices_enc( sts[n]->hBstr, sts[n]->hBstr->nb_ind_tot ); } } Loading lib_com/ivas_arith.c +13 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ static uint16_t ivas_ari_get_symbol( } /*--------------------------------------------------------------- * Function ivas_ari_decode_14bits_bit_ext_1_lfe() * * *-------------------------------------------------------------*/ uint16_t ivas_ari_decode_14bits_bit_ext_1_lfe( Decoder_State *st, Tastat *s, Loading Loading @@ -164,6 +170,12 @@ uint16_t ivas_ari_decode_14bits_bit_ext_1_lfe( } /*--------------------------------------------------------------- * Function ivas_ari_done_decoding_14bits_ext_1_lfe() * * *-------------------------------------------------------------*/ void ivas_ari_done_decoding_14bits_ext_1_lfe( Decoder_State *st, const int16_t extra_bits_read ) Loading Loading @@ -216,6 +228,7 @@ void ivas_ari_done_encoding_14bits( return; } /*--------------------------------------------------------------- * Function ivas_ari_encode_14bits_ext() * Loading Loading
apps/decoder.c +73 −98 Original line number Diff line number Diff line Loading @@ -71,12 +71,11 @@ static #define NUM_BITS_SID_IVAS_5K2 104 #define MAX_OUTPUT_PCM_BUFFER_SIZE ( ( IVAS_MAX_OUTPUT_CHANNELS + IVAS_MAX_NUM_OBJECTS ) * IVAS_MAX_FRAME_SIZE ) #define IVAS_PUBLIC_ORIENT_TRK_NONE ( 0 ) #define IVAS_PUBLIC_ORIENT_TRK_REF ( 1 ) #define IVAS_PUBLIC_ORIENT_TRK_AVG ( 2 ) #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC ( 3 ) #define IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ( 4 ) #define ORIENT_TRK_NONE ( 0 ) #define ORIENT_TRK_REF ( 1 ) #define ORIENT_TRK_AVG ( 2 ) #define ORIENT_TRK_REF_VEC ( 3 ) #define ORIENT_TRK_REF_VEC_LEV ( 4 ) #ifdef VARIABLE_SPEED_DECODING #define VARIABLE_SPEED_FETCH_FRAMESIZE_MS 20 Loading Loading @@ -343,7 +342,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF ) if ( arg.orientation_tracking != ORIENT_TRK_REF ) { fprintf( stderr, "\nError: Reference rotation file can be used in '-otr ref' mode only.\n\n" ); goto cleanup; Loading @@ -370,7 +369,7 @@ int main( } /* sanity check */ if ( arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC && arg.orientation_tracking != IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV ) if ( arg.orientation_tracking != ORIENT_TRK_REF_VEC && arg.orientation_tracking != ORIENT_TRK_REF_VEC_LEV ) { fprintf( stderr, "\nError: Reference trajectory file can be used in '-otr ref_vec' or '-otr ref_vec_lev' mode only.\n\n" ); goto cleanup; Loading Loading @@ -1026,7 +1025,7 @@ static bool parseCmdlIVAS_dec( arg->enableHeadRotation = false; arg->headrotTrajFileName = NULL; arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; arg->orientation_tracking = ORIENT_TRK_NONE; arg->enableReferenceRotation = false; arg->headrotTrajFileName = NULL; arg->enableReferenceVectorTracking = false; Loading Loading @@ -1310,23 +1309,23 @@ static bool parseCmdlIVAS_dec( if ( strcmp( argv_to_upper, "NONE" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_NONE; arg->orientation_tracking = ORIENT_TRK_NONE; } else if ( strcmp( argv_to_upper, "REF" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF; arg->orientation_tracking = ORIENT_TRK_REF; } else if ( strcmp( argv_to_upper, "AVG" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_AVG; arg->orientation_tracking = ORIENT_TRK_AVG; } else if ( strcmp( argv_to_upper, "REF_VEC" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC; arg->orientation_tracking = ORIENT_TRK_REF_VEC; } else if ( strcmp( argv_to_upper, "REF_VEC_LEV" ) == 0 ) { arg->orientation_tracking = IVAS_PUBLIC_ORIENT_TRK_REF_VEC_LEV; arg->orientation_tracking = ORIENT_TRK_REF_VEC_LEV; } else { Loading Loading @@ -1762,7 +1761,7 @@ static ivas_error initOnFirstGoodFrame( IVAS_DEC_HANDLE hIvasDec, /* i/o: */ const DecArguments arg, /* i : */ const int16_t numInitialBadFrames, /* i : */ #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT uint16_t *numOutSamples, /* i/o: */ int16_t *vec_pos_len, /* i/o: */ #else Loading Loading @@ -1890,22 +1889,18 @@ static ivas_error initOnFirstGoodFrame( else { #endif if ( *pRemainingDelayNumSamples < #if defined( SPLIT_REND_WITH_HEAD_ROT ) *numOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT if ( *pRemainingDelayNumSamples < *numOutSamples ) #else numOutSamples if ( *pRemainingDelayNumSamples < numOutSamples ) #endif ) { if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, #if defined( SPLIT_REND_WITH_HEAD_ROT ) *numOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, *numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) #else numOutSamples if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) #endif * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nOutput audio file writer error\n" ); return error; Loading @@ -1914,13 +1909,11 @@ static ivas_error initOnFirstGoodFrame( } else { *pRemainingDelayNumSamples -= #if defined( SPLIT_REND_WITH_HEAD_ROT ) *numOutSamples #ifdef SPLIT_REND_WITH_HEAD_ROT *pRemainingDelayNumSamples -= *numOutSamples; #else numOutSamples *pRemainingDelayNumSamples -= numOutSamples; #endif ; } #ifdef SPLIT_REND_WITH_HEAD_ROT } Loading Loading @@ -2010,10 +2003,9 @@ static ivas_error initOnFirstGoodFrame( } } #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT if ( *hSplitRendFileReadWrite != NULL ) { int16_t enable5ms; if ( numOutSamples == NULL || vec_pos_len == NULL ) Loading @@ -2021,7 +2013,10 @@ static ivas_error initOnFirstGoodFrame( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ); if ( ( error = IVAS_DEC_Get5msFlag( hIvasDec, &enable5ms ) ) != IVAS_ERR_OK ) { return error; } /* real setting of the 5ms mode for split rendering is only known after the decoded first good frame, reset the variables needed in the main decoding loop accordingly here*/ if ( enable5ms ) Loading @@ -2040,11 +2035,13 @@ static ivas_error initOnFirstGoodFrame( return IVAS_ERR_OK; } /*---------------------------------------------------------------------* * decodeG192() * * Read G.192 bitstream and decode in regular decoder *---------------------------------------------------------------------*/ static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, Loading Loading @@ -2073,7 +2070,7 @@ static ivas_error decodeG192( int16_t nOutChannels = 0; int16_t delayNumSamples = -1; int16_t delayNumSamples_orig[3]; #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT uint16_t nOutSamples = 0; #else int16_t nOutSamples = 0; Loading @@ -2094,7 +2091,6 @@ static ivas_error decodeG192( IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS]; IVAS_VECTOR3 Pos[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES] = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } }; int16_t vec_pos_update, vec_pos_len; #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_SPLIT_REND_BITS_DATA splitRendBits; SplitFileReadWrite *hSplitRendFileReadWrite; Loading Loading @@ -2249,8 +2245,7 @@ static ivas_error decodeG192( { if ( ( error = HeadRotationFileReading( headRotReader, &Quaternions[i], &Pos[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } } Loading @@ -2260,12 +2255,11 @@ static ivas_error decodeG192( for ( i = 0; i < num_subframes; i++ ) { if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternions[i], Pos[i], i ) ) != IVAS_ERR_OK ) #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -2359,42 +2353,36 @@ static ivas_error decodeG192( #ifdef SPLIT_REND_WITH_HEAD_ROT if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &splitRendBits, &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) if ( ( error = IVAS_DEC_GetSplitBinauralBitstream( hIvasDec, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &splitRendBits, &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinauralBitstream: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; } else { #endif error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, #if defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, IVAS_DEC_PCM_INT16, (void *) ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK ) #endif ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ); nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; if ( error != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } nSamplesRendered += nSamplesRendered_loop; nSamplesToRender -= nSamplesRendered_loop; #ifdef SPLIT_REND_WITH_HEAD_ROT } #endif } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK ); if ( error == IVAS_ERR_END_OF_FILE ) Loading @@ -2418,7 +2406,7 @@ static ivas_error decodeG192( hIvasDec, arg, numInitialBadFrames, #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT &nOutSamples, &vec_pos_len, #else Loading Loading @@ -2453,11 +2441,10 @@ static ivas_error decodeG192( if ( decodedGoodFrame ) { #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; Loading @@ -2465,11 +2452,10 @@ static ivas_error decodeG192( } else { if ( ( hSplitRendFileReadWrite != NULL ) && ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { if ( split_rend_write_bitstream_to_file( hSplitRendFileReadWrite, splitRendBits.bits_buf, &splitRendBits.bits_read, &splitRendBits.bits_written, splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) splitRendBits.codec, splitRendBits.pose_correction, splitRendBits.codec_frame_size_ms ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to write to bitstream file!\n" ); goto cleanup; Loading Loading @@ -2619,21 +2605,17 @@ static ivas_error decodeG192( if ( arg.enableHeadRotation ) { IVAS_QUATERNION Quaternion; if ( ( error = HeadRotationFileReading( headRotReader, &Quaternion, &Pos[0] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while reading head orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( headRotReader ) ); goto cleanup; } if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos[0], 0 #ifdef SPLIT_REND_WITH_HEAD_ROT , DEFAULT_AXIS if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos[0], 0, DEFAULT_AXIS ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_FeedHeadTrackData( hIvasDec, Quaternion, Pos[0], 0 ) ) != IVAS_ERR_OK ) #endif ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedHeadTrackData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading @@ -2641,13 +2623,12 @@ static ivas_error decodeG192( } /* decode and get samples */ if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, #if defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #ifdef SPLIT_REND_WITH_HEAD_ROT if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) #endif pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -2862,10 +2843,8 @@ static ivas_error printBitstreamInfoVoip( else { auPtr = au; /* might have been set to RTP packet in prev call */ rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSizeBits ); rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSizeBits ); /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } Loading Loading @@ -3027,10 +3006,8 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSize ); rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSize ); /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } Loading Loading @@ -3065,7 +3042,7 @@ static ivas_error decodeVoIP( while ( 1 ) { #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT uint16_t nOutSamples = 0; #else int16_t nOutSamples = 0; Loading @@ -3075,6 +3052,7 @@ static ivas_error decodeVoIP( #else nOutSamples = (int16_t) ( arg.output_Fs / 1000 * JBM_FRONTEND_FETCH_FRAMESIZE_MS ); #endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) { Loading Loading @@ -3127,9 +3105,8 @@ static ivas_error decodeVoIP( /* decode and get samples */ if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, #if defined SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #ifdef SPLIT_REND_WITH_HEAD_ROT IVAS_DEC_PCM_INT16, (void *) #endif pcmBuf, systemTime_ms Loading @@ -3144,7 +3121,6 @@ static ivas_error decodeVoIP( goto cleanup; } /* write JBM Offset file entry */ if ( jbmOffsetWriter != NULL ) { Loading Loading @@ -3176,14 +3152,14 @@ static ivas_error decodeVoIP( if ( decodedGoodFrame ) { #ifdef SPLIT_REND_WITH_HEAD_ROT SplitFileReadWrite *hSplitRendFileReadWrite = NULL; #endif error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, #if defined( SPLIT_REND_WITH_HEAD_ROT ) #ifdef SPLIT_REND_WITH_HEAD_ROT &nOutSamples, NULL, #else Loading Loading @@ -3218,7 +3194,6 @@ static ivas_error decodeVoIP( } } /* Write current frame */ if ( decodedGoodFrame ) { Loading
apps/encoder.c +8 −21 Original line number Diff line number Diff line Loading @@ -406,16 +406,7 @@ int main( } break; case IVAS_ENC_INPUT_SBA: if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, if ( ( error = IVAS_ENC_ConfigureForAmbisonics( hIvasEnc, arg.inputFs, totalBitrate, arg.max_bwidth_user, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba.order, arg.inputFormatConfig.sba.isPlanar, #ifdef DEBUG_AGC_ENCODER_CMD_OPTION arg.agc, #endif Loading Loading @@ -445,7 +436,6 @@ int main( goto cleanup; } break; case IVAS_ENC_INPUT_SBA_ISM: if ( ( error = IVAS_ENC_ConfigureForSBAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.sba_ism.numObjects, arg.inputFormatConfig.sba_ism.order, arg.inputFormatConfig.sba_ism.isPlanar, arg.pca ) ) != IVAS_ERR_OK ) { Loading @@ -453,7 +443,6 @@ int main( exit( -1 ); } break; case IVAS_ENC_INPUT_MASA_ISM: if ( ( error = IVAS_ENC_ConfigureForMASAObjects( hIvasEnc, arg.inputFs, totalBitrate, bandwidth, arg.dtxConfig, arg.inputFormatConfig.masa_ism.numObjects, arg.inputFormatConfig.masa_ism.masaVariant ) ) != IVAS_ERR_OK ) { Loading @@ -461,7 +450,6 @@ int main( exit( -1 ); } break; default: fprintf( stderr, "\nInvalid input type\n\n" ); goto cleanup; Loading Loading @@ -512,6 +500,7 @@ int main( fprintf( stderr, "\nError: %s\n", ivas_error_to_string( error ) ); goto cleanup; } int16_t inFileNumChannels = 0; error = AudioFileReader_getNumChannels( audioReader, &inFileNumChannels ); switch ( error ) Loading Loading @@ -546,9 +535,7 @@ int main( } } const int16_t numIsmInputs = ( arg.inputFormat == IVAS_ENC_INPUT_ISM || arg.inputFormat == IVAS_ENC_INPUT_MASA_ISM || arg.inputFormat == IVAS_ENC_INPUT_SBA_ISM ) ? arg.inputFormatConfig.ism.numObjects : 0; const int16_t numIsmInputs = ( arg.inputFormat == IVAS_ENC_INPUT_ISM || arg.inputFormat == IVAS_ENC_INPUT_MASA_ISM || arg.inputFormat == IVAS_ENC_INPUT_SBA_ISM ) ? arg.inputFormatConfig.ism.numObjects : 0; for ( i = 0; i < numIsmInputs; ++i ) { Loading
lib_com/bitstream.c +2 −4 Original line number Diff line number Diff line Loading @@ -1662,8 +1662,7 @@ static ivas_error write_indices_element( reset_indices_enc( st_ivas->hSCE[element_id]->hMetaData, st_ivas->hSCE[element_id]->hMetaData->nb_ind_tot ); } reset_indices_enc( sts[0]->hBstr, sts[0]->hBstr->nb_ind_tot ); reset_indices_enc( sts[0]->hBstr, sts[0]->hBstr->nb_ind_tot ); } else { Loading @@ -1674,8 +1673,7 @@ static ivas_error write_indices_element( for ( n = 0; n < n_channels; n++ ) { reset_indices_enc( sts[n]->hBstr, sts[n]->hBstr->nb_ind_tot ); reset_indices_enc( sts[n]->hBstr, sts[n]->hBstr->nb_ind_tot ); } } Loading
lib_com/ivas_arith.c +13 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,12 @@ static uint16_t ivas_ari_get_symbol( } /*--------------------------------------------------------------- * Function ivas_ari_decode_14bits_bit_ext_1_lfe() * * *-------------------------------------------------------------*/ uint16_t ivas_ari_decode_14bits_bit_ext_1_lfe( Decoder_State *st, Tastat *s, Loading Loading @@ -164,6 +170,12 @@ uint16_t ivas_ari_decode_14bits_bit_ext_1_lfe( } /*--------------------------------------------------------------- * Function ivas_ari_done_decoding_14bits_ext_1_lfe() * * *-------------------------------------------------------------*/ void ivas_ari_done_decoding_14bits_ext_1_lfe( Decoder_State *st, const int16_t extra_bits_read ) Loading Loading @@ -216,6 +228,7 @@ void ivas_ari_done_encoding_14bits( return; } /*--------------------------------------------------------------- * Function ivas_ari_encode_14bits_ext() * Loading