Commit 9249ad02 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files
Merge branch 'main' of ssh://forge.3gpp.org:29419/ivas-codec-pc/ivas-codec into 1419-enable-rendering-to-all-output-formats-for-evs-mono-and-ivas-stereo-bitstreams
parents 50d1461d cfabda27
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -107,6 +107,7 @@
    <ClCompile Include="..\lib_lc3plus\ari_codec.c" />
    <ClCompile Include="..\lib_lc3plus\attack_detector.c" />
    <ClCompile Include="..\lib_lc3plus\constants.c" />
    <ClCompile Include="..\lib_lc3plus\com_entropy.c" />
    <ClCompile Include="..\lib_lc3plus\cutoff_bandwidth.c" />
    <ClCompile Include="..\lib_lc3plus\dct4.c" />
    <ClCompile Include="..\lib_lc3plus\dec_entropy.c" />
+24 −0
Original line number Diff line number Diff line
@@ -92,3 +92,27 @@ ivas_error IVAS_LC3PLUS_LC3plusRtpErrToIvasErr(

    return IVAS_ERR_UNKNOWN;
}

/*-----------------------------------------------------------------------------------------*
 * Function IVAS_LC3PLUS_UsToLC3plusFrameDuration()
 *
 *
 *-----------------------------------------------------------------------------------------*/

LC3PLUS_FrameDuration IVAS_LC3PLUS_UsToLC3plusFrameDuration(
    const int16_t lc3PlusFrameDurationUs )
{
    switch ( lc3PlusFrameDurationUs )
    {
        case 2500:
            return LC3PLUS_FRAME_DURATION_2p5MS;
        case 5000:
            return LC3PLUS_FRAME_DURATION_5MS;
        case 10000:
            return LC3PLUS_FRAME_DURATION_10MS;
        default:
            break;
    }

    return LC3PLUS_FRAME_DURATION_UNDEFINED;
}
+3 −0
Original line number Diff line number Diff line
@@ -61,4 +61,7 @@ ivas_error ISAR_LC3PLUS_LC3plusErrToIvasErr( const LC3PLUS_Error lc3PlusError );
/*! utility function to convert LC3PLUS_Errors to the suitable ivas_error */
ivas_error IVAS_LC3PLUS_LC3plusRtpErrToIvasErr( const LC3PLUS_RTP_ERR lc3PlusRtpError );

/*! utility function to convert a value in microseconds to an LC3PLUS_FrameDuration */
LC3PLUS_FrameDuration IVAS_LC3PLUS_UsToLC3plusFrameDuration( const int16_t lc3PlusFrameDuration );

#endif /* ISAR_LC3PLUS_COM_H */
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ ivas_error ISAR_LC3PLUS_DEC_Open(
            return IVAS_ERROR( ISAR_LC3PLUS_LC3plusErrToIvasErr( err ), "lc3plus_dec_init failed\n" );
        }

        err = lc3plus_dec_set_frame_dms( ( *handle )->handles[iCh], config.lc3plus_frame_duration_us / 100 );
        err = lc3plus_dec_set_frame_dms( ( *handle )->handles[iCh], IVAS_LC3PLUS_UsToLC3plusFrameDuration( config.lc3plus_frame_duration_us ) );
        if ( LC3PLUS_OK != err )
        {
            ISAR_LC3PLUS_DEC_Close( handle );
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ ivas_error ISAR_LC3PLUS_ENC_Open(
            return IVAS_ERROR( ISAR_LC3PLUS_LC3plusErrToIvasErr( err ), "lc3plus_enc_init failed\n" );
        }

        err = lc3plus_enc_set_frame_dms( ( *handle )->handles[iCh], config.lc3plus_frame_duration_us / 100 );
        err = lc3plus_enc_set_frame_dms( ( *handle )->handles[iCh], IVAS_LC3PLUS_UsToLC3plusFrameDuration( config.lc3plus_frame_duration_us ) );
        if ( err != LC3PLUS_OK )
        {
            ISAR_LC3PLUS_ENC_Close( handle );
Loading