Unverified Commit 91bf9474 authored by norvell's avatar norvell
Browse files

Merge with main

parents e6d5fc32 387619a8
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@
    <ClCompile Include="..\lib_util\obj_edit_file_reader.c" />
    <ClCompile Include="..\lib_util\render_config_reader.c" />
    <ClCompile Include="..\lib_util\rotation_file_reader.c" />
    <ClCompile Include="..\lib_util\requests_file_reader.c" />
    <ClCompile Include="..\lib_util\rtpdump.c" />
    <ClCompile Include="..\lib_util\split_render_file_read_write.c" />
    <ClCompile Include="..\lib_util\split_rend_bfi_file_reader.c" />
@@ -164,6 +165,7 @@
    <ClInclude Include="..\lib_util\masa_file_writer.h" />
    <ClInclude Include="..\lib_util\render_config_reader.h" />
    <ClInclude Include="..\lib_util\rotation_file_reader.h" />
    <ClInclude Include="..\lib_util\requests_file_reader.h" />
    <ClInclude Include="..\lib_util\rtpdump.h" />
    <ClInclude Include="..\lib_util\tinywavein_c.h" />
    <ClInclude Include="..\lib_util\tinywaveout_c.h" />
+4 −0
Original line number Diff line number Diff line
@@ -1649,7 +1649,11 @@ static void resetHeadRotation(
        pPos[i].x_fx = 0;
        pPos[i].y_fx = 0;
        pPos[i].z_fx = 0;
#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
        pPos[i].q_fact = 22;
#else
        pPos[i].q_fact = 25;
#endif
    }

    return;
+44 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#include "masa_file_reader.h"
#include "rotation_file_reader.h"
#include "ivas_rtp_file.h"
#include "requests_file_reader.h"
#include "wmc_auto.h"


@@ -165,6 +166,7 @@ typedef struct
    char *sceneOrientationTrajFileName;
    char *deviceOrientationTrajFileName;

    char *requestsFileName;
} EncArguments;


@@ -221,6 +223,7 @@ int main(
    uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8];
    IVAS_RTP ivasRtp = { 0 };

    ReqFileReader *requestsFileReader = NULL;
    /* 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 */
@@ -658,6 +661,18 @@ int main(
        }
    }

    /*------------------------------------------------------------------------------------------*
     * Open remote requests file for rtp packing (E-bytes)
     *------------------------------------------------------------------------------------------*/
    if ( arg.requestsFileName != NULL )
    {
        if ( ( error = RequestsFileReader_open( arg.requestsFileName, &requestsFileReader ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError: Can't open requests file %s \n\n", arg.requestsFileName );
            goto cleanup;
        }
    }

    /*------------------------------------------------------------------------------------------*
     * Run the encoder
     *------------------------------------------------------------------------------------------*/
@@ -867,6 +882,15 @@ int main(
                }
            }

            if ( requestsFileReader )
            {
                if ( ( error = ReadNextRequests( requestsFileReader, ivasRtp.remoteRequests, &ivasRtp.remoteRequestBitmap ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError %s while reading requests from %s\n", IVAS_ENC_GetErrorMessage( error ), RequestsFileReader_getFilePath( requestsFileReader ) );
                    goto cleanup;
                }
            }

            if ( ( error = IVAS_ENC_EncodeFrameToCompact( hIvasEnc, pcmBuf, pcmBufSize, au, &numBits ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) );
@@ -962,6 +986,11 @@ cleanup:
        fclose( f_bitrateProfile );
    }

    if ( requestsFileReader )
    {
        RequestsFileReader_close( &requestsFileReader );
    }

    if ( sceneOrientationFileReader )
    {
        RotationFileReader_close( &sceneOrientationFileReader );
@@ -1008,6 +1037,7 @@ static bool parseCmdlIVAS_enc(
    /*-----------------------------------------------------------------*
     * Set default values
     *-----------------------------------------------------------------*/
    memset( arg, 0, sizeof( *arg ) );

    arg->inputWavFilename = NULL;
    arg->outputBitstreamFilename = NULL;
@@ -1874,6 +1904,18 @@ static bool parseCmdlIVAS_enc(
            arg->deviceOrientationTrajFileName = argv[i];
            i++;
        }
        else if ( strcmp( argv_to_upper, "-REQUESTS" ) == 0 )
        {
            i++;
            if ( argc - i <= 4 || argv[i][0] == '-' )
            {
                fprintf( stderr, "Error: Remote requests file name not specified!\n\n" );
                usage_enc();
                return false;
            }
            arg->requestsFileName = argv[i];
            i++;
        }

        /*-----------------------------------------------------------------*
         * Option not recognized
@@ -2093,6 +2135,8 @@ static void usage_enc( void )
    fprintf( stdout, "                      EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet\n" );
    fprintf( stdout, "-scene_orientation  : Scene orientation trajectory file. Only used with rtpdump output.\n" );
    fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" );
    fprintf( stdout, "-requests           : Remote requests file, Only used with rtpdump output.\n" );

    fprintf( stdout, "\n" );

    return;
+1 −1
Original line number Diff line number Diff line
@@ -1251,7 +1251,7 @@ int main(
    /* Set reverb room size if specified */
    if ( args.reverbRoomSize != IVAS_ROOM_SIZE_AUTO )
    {
        if ( ( IVAS_REND_SetReverbRoomSize( hIvasRend, args.reverbRoomSize ) ) != IVAS_ERR_OK )
        if ( ( error = IVAS_REND_SetReverbRoomSize( hIvasRend, args.reverbRoomSize ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError setting reverb room size\n" );
            goto cleanup;
+0 −2
Original line number Diff line number Diff line
@@ -714,7 +714,6 @@ Word16 getScaleFactor16( /* o: measured headroom in range [
    return i;
}

#ifdef OPTIMIZE_FFT_STACK
/* o: measured headroom in range [0..31], 0 if all x[i] == 0 */
Word16 getScaleFactor32_cmplx(
    cmplx *x,          /* i: array containing 32-bit data */
@@ -772,7 +771,6 @@ Word16 getScaleFactor32_cmplx(

    return s_min( i_re, i_im );
}
#endif


/********************************************************************/
Loading