Commit 4af15f03 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'ivas-float-update' into 1950_ref_portFlpMr2198

parents a69b8642 61af024d
Loading
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -469,11 +469,15 @@
    <ClCompile Include="..\lib_com\ivas_lfe_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_rotation_com.c" />
    <ClCompile Include="..\lib_com\ivas_limiter.c" />
    <ClCompile Include="..\lib_com\ivas_osba_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_rotation_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_limiter.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop_proto_func.h">
+2 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@
    <ClCompile Include="..\lib_util\masa_file_reader.c" />
    <ClCompile Include="..\lib_util\masa_file_writer.c" />
    <ClCompile Include="..\lib_util\mime_io.c" />
    <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\rtpdump.c" />
@@ -145,6 +146,7 @@
    <ClInclude Include="..\lib_util\jbm_file_writer.h" />
    <ClInclude Include="..\lib_util\ls_custom_file_reader.h" />
    <ClInclude Include="..\lib_util\mime_io.h" />
    <ClInclude Include="..\lib_util\obj_edit_file_reader.h" />
    <ClInclude Include="..\lib_util\masa_file_reader.h" />
    <ClInclude Include="..\lib_util\masa_file_writer.h" />
    <ClInclude Include="..\lib_util\render_config_reader.h" />
+301 −266

File changed.

Preview size limit exceeded, changes collapsed.

+22 −29
Original line number Diff line number Diff line
@@ -170,7 +170,6 @@ typedef struct
 * Local functions prototypes
 *------------------------------------------------------------------------------------------*/

static void initArgStruct( EncArguments *arg );
static bool parseCmdlIVAS_enc( int16_t argc, char *argv[], EncArguments *arg );
static void usage_enc( void );
static bool readBandwidth( FILE *file, IVAS_ENC_BANDWIDTH *bandwidth, int32_t *bandwidthFrameCounter );
@@ -223,8 +222,6 @@ int main(
    reset_mem( USE_BYTES );
#endif

    initArgStruct( &arg );

    /*------------------------------------------------------------------------------------------*
     * Parse command-line arguments
     *------------------------------------------------------------------------------------------*/
@@ -906,14 +903,29 @@ cleanup:
 * Local functions
 *-------------------------------------------------------------------*/

#define IVAS_DEFAULT_AGC ( 0 )
/*---------------------------------------------------------------------*
 * parseCmdlIVAS_enc()
 *
 * Encoder command-line parsing
 *---------------------------------------------------------------------*/

static void initArgStruct( EncArguments *arg )
static bool parseCmdlIVAS_enc(
    int16_t argc,
    char *argv[],
    EncArguments *arg )
{
    /* Set default values here */
    int16_t i, j;
    char argv_to_upper[FILENAME_MAX];
    char stmp[FILENAME_MAX];
    int32_t tmp;

    /*-----------------------------------------------------------------*
     * Set default values
     *-----------------------------------------------------------------*/

    arg->inputWavFilename = NULL;
    arg->outputBitstreamFilename = NULL;
    arg->inputFs = 0;
    arg->inputFs = IVAS_MAX_SAMPLING_RATE;
    arg->inputFormat = IVAS_ENC_INPUT_MONO;
    arg->is_binaural = false;
    arg->inputFormatConfig.stereoToMonoDownmix = false;
@@ -935,9 +947,6 @@ static void initArgStruct( EncArguments *arg )
#ifdef DEBUGGING
    arg->forcedMode = IVAS_ENC_FORCE_UNFORCED;
    arg->forcedModeFile = NULL;
#ifdef DEBUG_FORCE_DIR
    arg->forcedModeDir = NULL;
#endif
#ifdef DEBUG_AGC_ENCODER_CMD_OPTION
    arg->agc = IVAS_ENC_AGC_UNDEFINED;
#endif
@@ -950,25 +959,9 @@ static void initArgStruct( EncArguments *arg )
#endif
    arg->pca = false;

    return;
}


/*---------------------------------------------------------------------*
 * parseCmdlIVAS_enc()
 *
 * Encoder command-line parsing
 *---------------------------------------------------------------------*/

static bool parseCmdlIVAS_enc(
    int16_t argc,
    char *argv[],
    EncArguments *arg )
{
    int16_t i, j;
    char argv_to_upper[FILENAME_MAX];
    char stmp[FILENAME_MAX];
    int32_t tmp;
    /*-----------------------------------------------------------------*
     * Initialization
     *-----------------------------------------------------------------*/

    if ( argc < 5 )
    {
+1 −19
Original line number Diff line number Diff line
@@ -920,7 +920,7 @@ int main(

    memset( outBuffer.data, 0, outBuffer.config.numSamplesPerChannel * outBuffer.config.numChannels * sizeof( float ) );

    bitsBufferSize = SPLIT_REND_BITS_BUFF_SIZE;
    bitsBufferSize = ISAR_SPLIT_REND_BITS_BUFF_SIZE;

    if ( bitsBufferSize > 0 )
    {
@@ -953,9 +953,7 @@ int main(

    while ( 1 )
    {
#ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST
        int16_t bfi = 0;
#endif
        int16_t num_in_channels;
        num_in_channels = inBuffer.config.numChannels;

@@ -964,11 +962,7 @@ int main(
        {
            ivas_error error_tmp;
            numSamplesRead = (int16_t) inBufferSize;
#ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST
            error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten, &bfi );
#else
            error_tmp = split_rend_read_bits_from_file( hSplitRendFileReadWrite, bitsBuffer.bits, &bitsBuffer.config.bitsRead, &bitsBuffer.config.bitsWritten );
#endif
            if ( error_tmp != IVAS_ERR_OK )
            {
                if ( error_tmp == IVAS_ERR_END_OF_FILE )
@@ -1035,23 +1029,12 @@ int main(
        /* Read from split renderer bfi file if specified */
        if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame )
        {
#ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST
            int16_t bfi;
#endif
            if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) );
                goto cleanup;
            }
#ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST
            if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) );
                goto cleanup;
        }
#endif
        }
#ifdef NONBE_1293_CRASH_FIRST_FRAME_LOST
        if ( splitBinNeedsNewFrame )
        {
            if ( ( error = ISAR_POST_REND_SetSplitRendBFI( hIsarPostRend, bfi ) ) != IVAS_ERR_OK )
@@ -1060,7 +1043,6 @@ int main(
                goto cleanup;
            }
        }
#endif

        for ( i = 0; i < args.inConfig.numBinBuses; ++i )
        {
Loading