Loading lib_rend/ivas_lc3plus_dec.c +6 −6 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ ivas_error IVAS_LC3PLUS_DEC_Open( #ifdef LC3PLUS_DEC_ALLOW_DISABLE_CACHING ( *handle )->cachingEnabled = enableCaching; #endif numLC3plusFramesPerIvasFrame = config.ivas_frame_duration_us / config.lc3plus_frame_duration_us; numLC3plusFramesPerIvasFrame = (int16_t) ( config.ivas_frame_duration_us / config.lc3plus_frame_duration_us ); #ifdef LC3PLUS_DEC_COLLECT_STATS ( *handle )->stats.action_histogram[DEC_ACTION_DECODE_AND_DROP] = 0; Loading Loading @@ -257,9 +257,9 @@ ivas_error IVAS_LC3PLUS_DEC_SetSelectiveDecodingMatrix( return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "invalid ivas_frame_duration_us/lc3plus_frame_duration_us values\n" ); } effectiveIvasSubframeDuration = handle->config.ivas_frame_duration_us == 20000 ? handle->config.ivas_frame_duration_us / MAX_PARAM_SPATIAL_SUBFRAMES : handle->config.ivas_frame_duration_us; numIvasSubFramesPerLC3frame = handle->config.lc3plus_frame_duration_us / effectiveIvasSubframeDuration; actual_num_spatial_subframes = handle->config.ivas_frame_duration_us / effectiveIvasSubframeDuration; effectiveIvasSubframeDuration = (int16_t) ( handle->config.ivas_frame_duration_us == 20000 ? handle->config.ivas_frame_duration_us / MAX_PARAM_SPATIAL_SUBFRAMES : handle->config.ivas_frame_duration_us ); numIvasSubFramesPerLC3frame = (int16_t) handle->config.lc3plus_frame_duration_us / effectiveIvasSubframeDuration; actual_num_spatial_subframes = (int16_t) handle->config.ivas_frame_duration_us / effectiveIvasSubframeDuration; // 0.5(0) = 10ms lc3plus, 5ms subframe if ( numIvasSubFramesPerLC3frame != 1 ) { Loading Loading @@ -495,7 +495,7 @@ static ivas_error IVAS_LC3PLUS_DEC_Decode_or_Conceal_internal( } lc3framesPerIvasFrame = handle->config.ivas_frame_duration_us / handle->config.lc3plus_frame_duration_us; numSamplesPerLC3plusChannel = handle->config.samplerate / ( 1000000 / handle->config.ivas_frame_duration_us ) / lc3framesPerIvasFrame; numSamplesPerLC3plusChannel = (int16_t) ( handle->config.samplerate / ( 1000000 / handle->config.ivas_frame_duration_us ) / lc3framesPerIvasFrame ); bitstreamOffsetPerCoder = bitstream_in_size / handle->num_decs / lc3framesPerIvasFrame; for ( iDec = 0; iDec < handle->num_decs; iDec++ ) { Loading Loading @@ -572,7 +572,7 @@ static ivas_error IVAS_LC3PLUS_DEC_Decode_or_Conceal_internal( return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "bitstream_cache_capacity is too low for LC3plus frame size\n" ); } /* store bit rate of cached frame */ mvc2c( bitstream_in_iter, handle->bitstream_caches[iDec]->bitstream_cache, bitstreamOffsetPerCoder ); mvc2c( bitstream_in_iter, handle->bitstream_caches[iDec]->bitstream_cache, (int16_t) bitstreamOffsetPerCoder ); handle->bitstream_caches[iDec]->bitstream_cache_size = bitstreamOffsetPerCoder; /* log that this instance has skipped a frame and must decode twice once reactivated */ handle->selective_decoding_states[iDec]->has_skipped_a_frame = 1; Loading lib_rend/ivas_lc3plus_dec.h +1 −1 Original line number Diff line number Diff line Loading @@ -133,6 +133,6 @@ ivas_error IVAS_LC3PLUS_DEC_Conceal( float **pcm_out /* o: concealed samples */ ); ivas_error IVAS_LC3PLUS_DEC_AllocateSubframeDecodingMatrix( int16_t ***subframeChannelMatrix, uint32_t num_decs ); ivas_error IVAS_LC3PLUS_DEC_AllocateSubframeDecodingMatrix( int16_t ***subframeChannelMatrix, const uint32_t num_decs ); void IVAS_LC3PLUS_DEC_FreeSubframeDecodingMatrix( int16_t **subframeChannelMatrix ); lib_rend/ivas_lc3plus_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ ivas_error IVAS_LC3PLUS_ENC_Encode( for ( uint32_t iSampleInt16 = 0; iSampleInt16 < numSamplesPerLC3plusChannel; iSampleInt16++ ) { ivasSampleIndex = iSampleInt16 + iLc3plusFrame * numSamplesPerLC3plusChannel; handle->pcm_conversion_buffer[iSampleInt16] = max( INT16_MIN, min( pcm_in[iEnc][ivasSampleIndex], INT16_MAX ) ); handle->pcm_conversion_buffer[iSampleInt16] = (int16_t) max( INT16_MIN, min( pcm_in[iEnc][ivasSampleIndex], INT16_MAX ) ); } num_bytes = 0; Loading lib_rend/ivas_splitRenderer_utils.c +2 −2 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REN if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { int32_t inBandMdBps = 8 * FRAMES_PER_SECOND; int32_t inBandMdBps = (int32_t) ( 8 * FRAMES_PER_SECOND ); return ivas_get_lcld_bitrate( SplitRendBitRate ) - inBandMdBps; } if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) Loading Loading @@ -536,7 +536,7 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL bitrate = ivas_get_lc3plus_bitrate( bitrate, poseCorrectionMode ); /* Return size in bytes */ return bitrate / FRAMES_PER_SECOND / 8; return (int32_t) ( bitrate / FRAMES_PER_SECOND / 8 ); } ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig ) Loading Loading
lib_rend/ivas_lc3plus_dec.c +6 −6 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ ivas_error IVAS_LC3PLUS_DEC_Open( #ifdef LC3PLUS_DEC_ALLOW_DISABLE_CACHING ( *handle )->cachingEnabled = enableCaching; #endif numLC3plusFramesPerIvasFrame = config.ivas_frame_duration_us / config.lc3plus_frame_duration_us; numLC3plusFramesPerIvasFrame = (int16_t) ( config.ivas_frame_duration_us / config.lc3plus_frame_duration_us ); #ifdef LC3PLUS_DEC_COLLECT_STATS ( *handle )->stats.action_histogram[DEC_ACTION_DECODE_AND_DROP] = 0; Loading Loading @@ -257,9 +257,9 @@ ivas_error IVAS_LC3PLUS_DEC_SetSelectiveDecodingMatrix( return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "invalid ivas_frame_duration_us/lc3plus_frame_duration_us values\n" ); } effectiveIvasSubframeDuration = handle->config.ivas_frame_duration_us == 20000 ? handle->config.ivas_frame_duration_us / MAX_PARAM_SPATIAL_SUBFRAMES : handle->config.ivas_frame_duration_us; numIvasSubFramesPerLC3frame = handle->config.lc3plus_frame_duration_us / effectiveIvasSubframeDuration; actual_num_spatial_subframes = handle->config.ivas_frame_duration_us / effectiveIvasSubframeDuration; effectiveIvasSubframeDuration = (int16_t) ( handle->config.ivas_frame_duration_us == 20000 ? handle->config.ivas_frame_duration_us / MAX_PARAM_SPATIAL_SUBFRAMES : handle->config.ivas_frame_duration_us ); numIvasSubFramesPerLC3frame = (int16_t) handle->config.lc3plus_frame_duration_us / effectiveIvasSubframeDuration; actual_num_spatial_subframes = (int16_t) handle->config.ivas_frame_duration_us / effectiveIvasSubframeDuration; // 0.5(0) = 10ms lc3plus, 5ms subframe if ( numIvasSubFramesPerLC3frame != 1 ) { Loading Loading @@ -495,7 +495,7 @@ static ivas_error IVAS_LC3PLUS_DEC_Decode_or_Conceal_internal( } lc3framesPerIvasFrame = handle->config.ivas_frame_duration_us / handle->config.lc3plus_frame_duration_us; numSamplesPerLC3plusChannel = handle->config.samplerate / ( 1000000 / handle->config.ivas_frame_duration_us ) / lc3framesPerIvasFrame; numSamplesPerLC3plusChannel = (int16_t) ( handle->config.samplerate / ( 1000000 / handle->config.ivas_frame_duration_us ) / lc3framesPerIvasFrame ); bitstreamOffsetPerCoder = bitstream_in_size / handle->num_decs / lc3framesPerIvasFrame; for ( iDec = 0; iDec < handle->num_decs; iDec++ ) { Loading Loading @@ -572,7 +572,7 @@ static ivas_error IVAS_LC3PLUS_DEC_Decode_or_Conceal_internal( return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "bitstream_cache_capacity is too low for LC3plus frame size\n" ); } /* store bit rate of cached frame */ mvc2c( bitstream_in_iter, handle->bitstream_caches[iDec]->bitstream_cache, bitstreamOffsetPerCoder ); mvc2c( bitstream_in_iter, handle->bitstream_caches[iDec]->bitstream_cache, (int16_t) bitstreamOffsetPerCoder ); handle->bitstream_caches[iDec]->bitstream_cache_size = bitstreamOffsetPerCoder; /* log that this instance has skipped a frame and must decode twice once reactivated */ handle->selective_decoding_states[iDec]->has_skipped_a_frame = 1; Loading
lib_rend/ivas_lc3plus_dec.h +1 −1 Original line number Diff line number Diff line Loading @@ -133,6 +133,6 @@ ivas_error IVAS_LC3PLUS_DEC_Conceal( float **pcm_out /* o: concealed samples */ ); ivas_error IVAS_LC3PLUS_DEC_AllocateSubframeDecodingMatrix( int16_t ***subframeChannelMatrix, uint32_t num_decs ); ivas_error IVAS_LC3PLUS_DEC_AllocateSubframeDecodingMatrix( int16_t ***subframeChannelMatrix, const uint32_t num_decs ); void IVAS_LC3PLUS_DEC_FreeSubframeDecodingMatrix( int16_t **subframeChannelMatrix );
lib_rend/ivas_lc3plus_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ ivas_error IVAS_LC3PLUS_ENC_Encode( for ( uint32_t iSampleInt16 = 0; iSampleInt16 < numSamplesPerLC3plusChannel; iSampleInt16++ ) { ivasSampleIndex = iSampleInt16 + iLc3plusFrame * numSamplesPerLC3plusChannel; handle->pcm_conversion_buffer[iSampleInt16] = max( INT16_MIN, min( pcm_in[iEnc][ivasSampleIndex], INT16_MAX ) ); handle->pcm_conversion_buffer[iSampleInt16] = (int16_t) max( INT16_MIN, min( pcm_in[iEnc][ivasSampleIndex], INT16_MAX ) ); } num_bytes = 0; Loading
lib_rend/ivas_splitRenderer_utils.c +2 −2 Original line number Diff line number Diff line Loading @@ -448,7 +448,7 @@ int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REN if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB ) { int32_t inBandMdBps = 8 * FRAMES_PER_SECOND; int32_t inBandMdBps = (int32_t) ( 8 * FRAMES_PER_SECOND ); return ivas_get_lcld_bitrate( SplitRendBitRate ) - inBandMdBps; } if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) Loading Loading @@ -536,7 +536,7 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL bitrate = ivas_get_lc3plus_bitrate( bitrate, poseCorrectionMode ); /* Return size in bytes */ return bitrate / FRAMES_PER_SECOND / 8; return (int32_t) ( bitrate / FRAMES_PER_SECOND / 8 ); } ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig ) Loading