Commit 992554bc authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch 'main' into 1318-default-reverb-configuration-for-binaural_room_reverb-mode

parents f1e03f16 024fd209
Loading
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -63,6 +63,9 @@
#include "flp_debug.h"
#endif

#ifdef FIXED_RTP_SEQUENCE_NUM
#define RANDOM_INITSEED_DEC ( 0xFEEDFADE )
#endif

#define WMC_TOOL_SKIP

@@ -1852,6 +1855,14 @@ static ivas_error initOnFirstGoodFrame(
        ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrection;
        int16_t splitRendIsarFrameSizeMs;
        int16_t lc3plusHighRes;
#ifdef FIXED_RTP_SEQUENCE_NUM
        /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we
        use fixed seed for random num generator for regression based tests. Any realtime
        application should implement this initialization seperately */
        srand( RANDOM_INITSEED_DEC );
        uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 );
        uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF );
#endif

        if ( ( error = IVAS_DEC_GetDelay( hIvasDec, delayNumSamples_temp, &delayTimeScale_temp ) ) != IVAS_ERR_OK )
        {
@@ -1890,7 +1901,11 @@ static ivas_error initOnFirstGoodFrame(


            /* Split Rendering RTPDump Output file */
#ifdef FIXED_RTP_SEQUENCE_NUM
            if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ) ) ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "\nError: Can't open SR output bitstream file for RTP output %s \n\n", arg.outputWavFilename );
                return error;
+16 −0
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@
#include "flp_debug.h"
#endif

#ifdef FIXED_RTP_SEQUENCE_NUM
#define RANDOM_INITSEED_ENC ( 0xFEEDDEAF )
#endif

#define WMC_TOOL_SKIP

@@ -231,6 +234,15 @@ int main(
    IVAS_RTP ivasRtp = { 0 };
#endif

#ifdef FIXED_RTP_SEQUENCE_NUM
    /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we
       use fixed seed for random num generator for regression based tests. Any realtime
       application should implement this initialization seperately */
    srand( RANDOM_INITSEED_ENC );
    uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 );
    uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF );
#endif

    /*------------------------------------------------------------------------------------------*
     * Parse command-line arguments
     *------------------------------------------------------------------------------------------*/
@@ -628,7 +640,11 @@ int main(

    if ( arg.rtpdumpOutput )
    {
#ifdef FIXED_RTP_SEQUENCE_NUM
        if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket ) ) != IVAS_ERR_OK )
#endif
        {
            fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename );
            goto cleanup;
+1 −0
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@

#define RTP_S4_251135_CR26253_0016_REV1                /* RTP Pack/Unpack API corresponding to CR 26253 */
#define IVAS_RTPDUMP                                   /* RTPDUMP writing and reading for IVAS payloads */
#define FIXED_RTP_SEQUENCE_NUM                         /* Remove random sequence number initialization */

/* ################### Start BE switches ################################# */
/* only BE switches wrt selection floating point code */
+13 −0
Original line number Diff line number Diff line
@@ -309,8 +309,10 @@ void IVAS_RTP_PACK_Close(
);

/* Update the  RTP Header structure */
#ifdef FIXED_RTP_SEQUENCE_NUM
ivas_error IVAS_RTP_PACK_UpdateHeader(
    IVAS_RTP_PACK_HANDLE hIvasPack, /* i/o: pointer to an IVAS rtp packer handle to be opened */
    uint16_t seqNumInitVal,         /* i  : Initial sequence number to be used for 1st packet */
    uint32_t ssrc,                  /* i  : Unique 32-bit Source ID as negotiated during SDP  */
    uint8_t numCC,                  /* i  : numCC indicates no. of contributing sources       */
    uint32_t *csrc,                 /* i  : SSRCs of contributing Sources for a mixed stream  */
@@ -318,6 +320,17 @@ ivas_error IVAS_RTP_PACK_UpdateHeader(
    uint16_t numExtensionBytes,     /* i  : length of the extension data                      */
    uint8_t *extData                /* i  : extension data pointer                            */
);
#else
ivas_error IVAS_RTP_PACK_UpdateHeader(
    IVAS_RTP_PACK_HANDLE hIvasPack, /* i/o: pointer to an IVAS rtp packer handle to be opened */
    uint32_t ssrc,                  /* i  : Unique 32-bit Source ID as negotiated during SDP  */
    uint8_t numCC,                  /* i  : numCC indicates no. of contributing sources       */
    uint32_t *csrc,                 /* i  : SSRCs of contributing Sources for a mixed stream  */
    uint16_t extHeaderId,           /* i  : extension header ID                               */
    uint16_t numExtensionBytes,     /* i  : length of the extension data                      */
    uint8_t *extData                /* i  : extension data pointer                            */
);
#endif

/* Add requests for remote sender using a key value pair api
 * each key must be provided with a corresponding value type
+13 −1
Original line number Diff line number Diff line
@@ -660,10 +660,18 @@ void IVAS_RTP_Term(
ivas_error IVAS_RTP_WRITER_Init(
    IVAS_RTP *rtp,                       /* i/o : IVAS RTP File writer handle      */
    const char *outputBitstreamFilename, /* i   : RTP Dump filename                */
#ifdef FIXED_RTP_SEQUENCE_NUM
    uint32_t numFramesPerPacket, /* i   : No. of frames per packet desired */
    uint32_t SSRC,               /* i   : SSRC for RTP Header              */
    uint16_t seqNumInitVal       /* i   : Initial seq number in rtp header */
#else
    uint32_t numFramesPerPacket /* i   : No. of frames per packet desired */
#endif
)
{
#ifndef FIXED_RTP_SEQUENCE_NUM
    uint32_t SSRC = ( rand() & 0xFFFF ) | ( (uint32_t) rand() << 16 );
#endif
    ivas_error error = IVAS_ERR_OK;

    memset( rtp, 0, sizeof( IVAS_RTP ) );
@@ -682,7 +690,11 @@ ivas_error IVAS_RTP_WRITER_Init(
            return error;
        }

#ifdef FIXED_RTP_SEQUENCE_NUM
        error = IVAS_RTP_PACK_UpdateHeader( rtp->hPack, seqNumInitVal, SSRC, 0, NULL, 0, 0, NULL );
#else
        error = IVAS_RTP_PACK_UpdateHeader( rtp->hPack, SSRC, 0, NULL, 0, 0, NULL );
#endif
        if ( error != IVAS_ERR_OK )
        {
            fprintf( stderr, "error in IVAS_RTP_PACK_UpdateHeader(): %d\n", error );
Loading