Commit 930b36d3 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[fix] MSVC warnings

parent 83202b25
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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;
@@ -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 )
    {
@@ -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++ )
    {
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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 );
+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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 )
@@ -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 )