Commit e3ea2f47 authored by sagnowski's avatar sagnowski
Browse files

Merge branch 'main' into 2102_basop_split-rendering-in-voip-mode

parents 566780d2 ba2aad75
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ target_link_libraries(ISAR_post_rend lib_basop lib_isar lib_util lib_com)
target_include_directories(ISAR_post_rend PRIVATE lib_basop lib_isar)

add_executable(ambi_converter apps/ambi_converter.c)
target_link_libraries(ambi_converter lib_util lib_com lib_basop)
target_link_libraries(ambi_converter lib_util lib_com lib_basop lib_debug)
if(UNIX)
  target_link_libraries(ambi_converter m)
endif()
+16 −129

File changed.

Preview size limit exceeded, changes collapsed.

+0 −18
Original line number Diff line number Diff line
@@ -992,9 +992,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;

@@ -1003,11 +1001,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 )
@@ -1074,24 +1068,13 @@ 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 )
@@ -1100,7 +1083,6 @@ int main(
                goto cleanup;
            }
        }
#endif

        for ( i = 0; i < args.inConfig.numBinBuses; ++i )
        {
+26 −0
Original line number Diff line number Diff line
@@ -74,6 +74,11 @@
#define IVAS_MIN16B_FLT ( -32768.0f )
#define IVAS_MAX16B_FX  32767
#define IVAS_MIN16B_FX  ( -32768 )

#ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS
#define OMASA_TDREND_MATCHING_GAIN_DB ( -2.0f )
#endif

#if !defined( DEBUGGING ) && !defined( WMOPS )
static
#endif
@@ -1262,20 +1267,41 @@ int main(
        }
    }

#ifndef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS
    /* Set the total number of objects */
#endif
    if ( args.inConfig.numAudioObjects > 0 )
    {
#ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS
        /* Set the total number of objects */
#endif
        if ( ( error = IVAS_REND_SetTotalNumberOfObjects( hIvasRend, args.inConfig.numAudioObjects ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in IVAS_REND_SetTotalNumberOfObjects(): %s\n", ivas_error_to_string( error ) );
            goto cleanup;
        }

#ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS
        /* Set the metadata delay for objects */
#endif
        Word32 var1 = (Word32) ( args.syncMdDelay );
        IF( ( error = IVAS_REND_SetIsmMetadataDelay( hIvasRend, var1 ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in IVAS_REND_SetIsmMetadataDelay(): %s\n", ivas_error_to_string( error ) );
            goto cleanup;
        }

#ifdef NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS

        /* For OMASA input and BINAURAL output, apply a gain to objects to match the loudness with MASA part */
        if ( args.inConfig.numMasaBuses > 0 && args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL )
        {
            for ( i = 0; i < args.inConfig.numAudioObjects; ++i )
            {
                args.inConfig.audioObjects[i].gain_dB += OMASA_TDREND_MATCHING_GAIN_DB;
            }
        }
#endif
    }

    IVAS_REND_LfePanMtx lfePanMatrix;
+65 −2

File changed.

Preview size limit exceeded, changes collapsed.

Loading