Commit 8951fae4 authored by Malenovsky, Vladimir's avatar Malenovsky, Vladimir
Browse files

Fix incorrect setting for render frame size and codec frame size in SR RTP

parent 91d82fe7
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3773,7 +3773,11 @@ static ivas_error decodeVoIP(
        }
        else if ( decodedGoodFrame )
        {
#ifdef FIX_RENDER_FRAME_SIZE_IN_RTP_SR
            srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->isar_frame_size_ms;
#else
            srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms;
#endif
            srInfo.codec = ( splitRendBits->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) ? IVAS_SR_TRANSPORT_LC3PLUS : IVAS_SR_TRANSPORT_LCLD;
            srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->codec_frame_size_ms;

+29 −29
Original line number Diff line number Diff line
@@ -725,6 +725,9 @@ static ivas_error parseSRParamsFile(
    int16_t *lc3plusHighRes )
{
    FILE *fParamSR = fopen( srParamsFilePath, "r" );
    ivas_error error = IVAS_ERR_OK;
    IVAS_RTP srRtp = { 0 };

    if ( NULL == fParamSR )
    {
        fprintf( stderr, "error in opening srParams File %s)\n", srParamsFilePath );
@@ -765,10 +768,7 @@ static ivas_error parseSRParamsFile(

    fclose( fParamSR );

    {
    /* Peek the RTP stream to ascertain the codec and codec_frame_size */
        ivas_error error = IVAS_ERR_OK;
        IVAS_RTP srRtp = { 0 };
    if ( ( error = IVAS_RTP_READER_Init( &srRtp, rtpFilePath, NULL, false, NULL ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "error in IVAS_RTP_READER_Init() for sr RTP peek: %d\n", error );
@@ -800,8 +800,8 @@ static ivas_error parseSRParamsFile(
            break;
        }
    }

    IVAS_RTP_Term( &srRtp );
    }

    return IVAS_ERR_OK;
}
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@
#define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE       /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */
#define FIX_2271_OOB_INDEXING_IN_PIT_OL2                /* VA: Fix for issue 2271, to silence clang18 */
#define FIX_2273_OOB_INDEXING_IN_PIT_FR4                /* VA: Fix to silence clang on ptr init */
#define FIX_RENDER_FRAME_SIZE_IN_RTP_SR                 /* Dolby: Fix incorrect setting for render frame size and codec frame size in SR RTP */

/* #################### End BE switches ################################## */