Commit 2edbda1a authored by Nicolas Roussin's avatar Nicolas Roussin
Browse files

Merge branch 'main' into 2142-implement-basop-w_min-and-w_max-functions

parents 71fb8ff0 2db54d23
Loading
Loading
Loading
Loading
Loading
+0 −126
Original line number Diff line number Diff line
@@ -47,9 +47,7 @@
#include "aeid_file_reader.h"
#endif
#include "split_render_file_read_write.h"
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
#include "obj_edit_file_reader.h"
#endif
#include "vector3_pair_file_reader.h"
#include "wmc_auto.h"
#include "options.h"
@@ -130,9 +128,7 @@ typedef struct
    bool dpidEnabled;
    uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS];
    bool objEditEnabled;
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    char *objEditFileName;
#endif

} DecArguments;

@@ -161,19 +157,10 @@ typedef struct

static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg );
static void usage_dec( void );
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
#else
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
#endif
static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs );
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
static void do_object_editing_fx( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader );
#else
static void do_object_editing_fx( IVAS_EDITABLE_PARAMETERS *editableParameters );
#endif


/*------------------------------------------------------------------------------------------*
@@ -205,9 +192,7 @@ int main(
    int16_t *pcmBuf = NULL;
    IVAS_RENDER_FRAMESIZE asked_frame_size;
    IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary;
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader *objectEditFileReader = NULL;
#endif

#ifdef WMOPS
    reset_wmops();
@@ -401,7 +386,6 @@ int main(
        }
    }

#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    /*------------------------------------------------------------------------------------------*
     * Open object editing instruction file
     *------------------------------------------------------------------------------------------*/
@@ -414,7 +398,6 @@ int main(
            goto cleanup;
        }
    }
#endif

    /*------------------------------------------------------------------------------------------*
     * Configure the decoder
@@ -423,14 +406,9 @@ int main(
    asked_frame_size = arg.renderFramesize;
    uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535;

#ifdef LIB_DEC_REVISION
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled,
                                       arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled,
                                       arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain_fx, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain_fx,
                                       arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
@@ -654,19 +632,11 @@ int main(

    if ( arg.voipMode )
    {
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec, pcmBuf );
#else
        error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec, pcmBuf );
#endif
    }
    else
    {
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, hIvasDec, pcmBuf );
#else
        error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf );
#endif
    }

    if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE )
@@ -724,9 +694,7 @@ cleanup:
    RotationFileReader_close( &refRotReader );
    Vector3PairFileReader_close( &referenceVectorReader );
    RenderConfigReader_close( &renderConfigReader );
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader_close( &objectEditFileReader );
#endif

    if ( BS_Reader_Close( &hBsReader ) != IVAS_ERR_OK )
    {
@@ -908,9 +876,7 @@ static bool parseCmdlIVAS_dec(
        arg->directivityPatternId[i] = 65535;
    }
    arg->objEditEnabled = false;
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    arg->objEditFileName = NULL;
#endif

    /*-----------------------------------------------------------------*
     * Initialization
@@ -937,30 +903,18 @@ static bool parseCmdlIVAS_dec(

        if ( strcmp( argv_to_upper, "-VOIP" ) == 0 )
        {
#ifdef LIB_DEC_REVISION
            arg->voipMode = true;
#else
            arg->voipMode = 1;
#endif
            i++;
        }
        else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=0" ) == 0 )
        {
#ifdef LIB_DEC_REVISION
            arg->voipMode = true;
#else
            arg->voipMode = 1;
#endif
            arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP;
            i++;
        }
        else if ( strcmp( argv_to_upper, "-VOIP_HF_ONLY=1" ) == 0 )
        {
#ifdef LIB_DEC_REVISION
            arg->voipMode = true;
#else
            arg->voipMode = 1;
#endif
            arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF;
            i++;
        }
@@ -1041,10 +995,8 @@ static bool parseCmdlIVAS_dec(
            {
                if ( !is_digits_only( argv[i] ) )
                {
#ifdef LIB_DEC_REVISION
                    fprintf( stderr, "Error: Render frame size is invalid or not specified!\n\n" );
                    usage_dec();
#endif

                    return false;
                }
@@ -1383,7 +1335,6 @@ static bool parseCmdlIVAS_dec(
        {
            arg->objEditEnabled = true;
            i++;
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
            if ( argc - i <= 3 || argv[i][0] == '-' )
            {
                fprintf( stderr, "Error: Object editing instruction filename not specified!\n\n" );
@@ -1400,7 +1351,6 @@ static bool parseCmdlIVAS_dec(
                arg->objEditFileName = argv[i]; /* read edit instructions from this file */
            }
            i++;
#endif
        }

        /*-----------------------------------------------------------------*
@@ -1590,11 +1540,7 @@ static void usage_dec( void )
    fprintf( stdout, "                      without braces and spaces, with ':' character separating ID from duration and ',' separating\n" );
    fprintf( stdout, "                      ID and duration pairs, where duration is specified in frames\n" );
    fprintf( stdout, "                      for BINAURAL_ROOM_REVERB output configuration.\n" );
#ifndef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    fprintf( stdout, "-obj_edit           : Enable objects editing\n" );
#else
    fprintf( stdout, "-obj_edit File      : Object editing instructions file or NULL for built-in example\n" );
#endif

    fprintf( stdout, "-level level        : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" );
    fprintf( stdout, "                      Currently, all values default to level 3 (full functionality).\n" );
@@ -1668,15 +1614,6 @@ static ivas_error initOnFirstGoodFrame(
        return error;
    }

#ifndef LIB_DEC_REVISION
    int32_t pcmFrameSize;

    if ( ( error = IVAS_DEC_GetPcmFrameSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nError in IVAS_DEC_GetPcmFrameSize, error code: %d\n", error );
        return error;
    }
#endif
    if ( isSplitRend )
    {
        /* Open split rendering metadata writer */
@@ -1734,7 +1671,6 @@ static ivas_error initOnFirstGoodFrame(
        }
    }

#ifdef LIB_DEC_REVISION
    int16_t pcmFrameSize;
    if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK )
    {
@@ -1742,15 +1678,12 @@ static ivas_error initOnFirstGoodFrame(
        return error;
    }

#endif
    int16_t *zeroBuf = malloc( pcmFrameSize * sizeof( int16_t ) );
#ifdef LIB_DEC_REVISION
    if ( zeroBuf == NULL )
    {
        fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" );
        return IVAS_ERR_FAILED_ALLOC;
    }
#endif
    memset( zeroBuf, 0, pcmFrameSize * sizeof( int16_t ) );

    for ( int16_t i = 0; i < numInitialBadFrames; ++i )
@@ -1854,7 +1787,6 @@ static ivas_error initOnFirstGoodFrame(
            if ( numInitialBadFrames > 0 )
            {
                /* Duplicate good first frame metadata to fill the beginning of stream. */
#ifdef NONBE_FIX_1261_MASA_EXT_META_JBM
                int16_t fullDelayNumSamplesLocal[3];
                int32_t delayTimeScaleLocal;
                float delayMs;
@@ -1867,9 +1799,6 @@ static ivas_error initOnFirstGoodFrame(
                    fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
                }
                delayMs = (float) ( fullDelayNumSamplesLocal[0] ) / (float) ( delayTimeScaleLocal );
#else
                IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta = NULL;
#endif

                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
@@ -1879,9 +1808,6 @@ static ivas_error initOnFirstGoodFrame(

                for ( int16_t j = 0; j < numInitialBadFrames; ++j )
                {
#ifndef NONBE_FIX_1261_MASA_EXT_META_JBM
                    float delayMs = (float) ( pFullDelayNumSamples[0] ) / (float) ( *delayTimeScale );
#endif
                    if ( ( error = MasaFileWriter_writeFrame( *ppMasaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( *ppMasaWriter ) );
@@ -1930,9 +1856,7 @@ static ivas_error decodeG192(
    RotFileReader *externalOrientationFileReader,
    RotFileReader *refRotReader,
    Vector3PairFileReader *referenceVectorReader,
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader *objectEditFileReader,
#endif
    ISAR_SPLIT_REND_BITS_DATA *splitRendBits,
    IVAS_DEC_HANDLE hIvasDec,
    int16_t *pcmBuf )
@@ -1966,7 +1890,6 @@ static ivas_error decodeG192(
    RenderConfigReader *renderConfigReader = NULL;

#ifdef VARIABLE_SPEED_DECODING
#ifdef LIB_DEC_REVISION
    if ( arg.tsmEnabled )
    {
        if ( ( error = IVAS_DEC_EnableTsm( hIvasDec ) ) != IVAS_ERR_OK )
@@ -1976,7 +1899,6 @@ static ivas_error decodeG192(
        }
    }

#endif
#endif
    if ( ( error = IVAS_DEC_is_split_rendering_enabled( hIvasDec, &isSplitRend ) ) != IVAS_ERR_OK )
    {
@@ -2261,7 +2183,6 @@ static ivas_error decodeG192(
                        return error;
                    }

#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
                    if ( arg.objEditFileName != NULL )
                    {
                        if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK )
@@ -2270,14 +2191,9 @@ static ivas_error decodeG192(
                            return error;
                        }
                    }
#endif

                    /* Do object metadata editing here ... */
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
                    do_object_editing_fx( &editableParameters, objectEditFileReader );
#else
                    do_object_editing_fx( &editableParameters );
#endif

                    /* set new object parameters*/
                    if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK )
@@ -2308,11 +2224,7 @@ static ivas_error decodeG192(
            }
            else
            {
#ifdef LIB_DEC_REVISION
                if ( ( error = IVAS_DEC_GetSamplesRenderer( hIvasDec, nSamplesToRender, ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, ( pcmBuf + nOutChannels * nSamplesRendered ), &nSamplesRendered_loop, &needNewFrame ) ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetSamplesRenderer(): %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
@@ -2351,9 +2263,7 @@ static ivas_error decodeG192(
            {
                if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, &vec_pos_len, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK )
                {
#ifdef LIB_DEC_REVISION
                    fprintf( stderr, "Error in initOnFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) );
#endif
                    goto cleanup;
                }
            }
@@ -2698,9 +2608,7 @@ static ivas_error decodeVoIP(
    RotFileReader *externalOrientationFileReader,
    RotFileReader *refRotReader,
    Vector3PairFileReader *referenceVectorReader,
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    ObjectEditFileReader *objectEditFileReader,
#endif
    IVAS_DEC_HANDLE hIvasDec,
    int16_t *pcmBuf )
{
@@ -2979,12 +2887,7 @@ static ivas_error decodeVoIP(
            }
        }

#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM
        if ( arg.objEditEnabled && arg.objEditFileName != NULL && vec_pos_update == 0 )
#else
        if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) )
#endif
        {
            if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK )
            {
@@ -2992,7 +2895,6 @@ static ivas_error decodeVoIP(
                return error;
            }
        }
#endif

        /* read all packets with a receive time smaller than the system time */
        while ( nextPacketRcvTime_ms <= systemTime_ms )
@@ -3094,11 +2996,7 @@ static ivas_error decodeVoIP(
                }

                /* Do object metadata editing here ... */
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
                do_object_editing_fx( &editableParameters, objectEditFileReader );
#else
                do_object_editing_fx( &editableParameters );
#endif

                /* set new object parameters */
                if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK )
@@ -3132,11 +3030,7 @@ static ivas_error decodeVoIP(
        {
            if ( ( error = IVAS_DEC_HasDecodedFirstGoodFrame( hIvasDec, &decodedGoodFrame ) ) != IVAS_ERR_OK )
            {
#ifdef LIB_DEC_REVISION
                fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) );
#else
                fprintf( stderr, "Error in IVAS_DEC_HasDecodedFirstGoodFrame, code: %d\n", error );
#endif
                goto cleanup;
            }

@@ -3230,23 +3124,12 @@ static ivas_error decodeVoIP(
            }
        }

#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM
        vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len;
#else
        // frame++;
        if ( !arg.quietModeEnabled )
        {
            fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame );
        }
        vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len;
        frame++;
#endif
        if ( vec_pos_update == 0 )
        {
            systemTime_ms += vec_pos_len * systemTimeInc_ms;
        }

#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM
        if ( vec_pos_update == 0 )
        {
            frame++;
@@ -3255,7 +3138,6 @@ static ivas_error decodeVoIP(
                fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame );
            }
        }
#endif

#ifdef WMOPS
        update_mem();
@@ -3418,12 +3300,8 @@ cleanup:
 *---------------------------------------------------------------------*/

static void do_object_editing_fx(
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    IVAS_EDITABLE_PARAMETERS *editableParameters,
    ObjectEditFileReader *objectEditFileReader )
#else
    IVAS_EDITABLE_PARAMETERS *editableParameters )
#endif
{
    /* put the objects equally spaced at the horizontal plane */
    /* and play a little bit with the gains... */
@@ -3439,7 +3317,6 @@ static void do_object_editing_fx(
        }
    }

#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    if ( objectEditFileReader != NULL )
    {
        ReadObjectEditInfo *readInfo;
@@ -3502,7 +3379,6 @@ static void do_object_editing_fx(
    }
    else
    {
#endif
        if ( num_nondiegetic_objects )
        {
            float start_angle, angle_inc;
@@ -3526,9 +3402,7 @@ static void do_object_editing_fx(
        }

        editableParameters->gain_bed_fx = ( 1 << 28 ); // 0.5 in Q29
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    }
#endif

    return;
}
+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 )
        {
+0 −4
Original line number Diff line number Diff line
@@ -195,11 +195,7 @@ typedef enum
#define MAX_JBM_L_FRAME48k                      1920
#define MAX_JBM_L_FRAME_NS                      40000000L
#define MAX_SPAR_INTERNAL_CHANNELS              IVAS_SPAR_MAX_CH
#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS
#define MAX_CLDFB_DIGEST_CHANNELS               3                           /* == maximum of ParamISM TCs and ParamMC TCs */
#else
#define MAX_CLDFB_DIGEST_CHANNELS               (FOA_CHANNELS + MAX_NUM_OBJECTS)
#endif

typedef enum
{
+0 −4
Original line number Diff line number Diff line
@@ -78,9 +78,7 @@ typedef enum
    IVAS_ERR_DIRECTIVITY_NOT_SUPPORTED,
    IVAS_ERR_ACOUSTIC_ENVIRONMENT_NOT_SUPPORTED,
    IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED,
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
    IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED,
#endif
    IVAS_ERR_INVALID_HRTF,
    IVAS_ERR_INVALID_HRTF_SAMPLING_RATE,
    IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA,
@@ -258,10 +256,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Acoustic environment not supported";
        case IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED:
            return "Objects editing not supported";
#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE
        case IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED:
            return "Wrong use of both Object editing and Non-diegetic panning";
#endif
        case IVAS_ERR_INVALID_HRTF:
            return "Unsupported HRTF filter set";
        case IVAS_ERR_INVALID_HRTF_SAMPLING_RATE:
+0 −30
Original line number Diff line number Diff line
@@ -178,14 +178,12 @@ void ivas_omasa_render_objects_from_mix_fx(
    Word16 *output_q                                            /* i/o: output Q value                          */
);

#ifdef NONBE_FIX_1305_OMASA_OBJ_EDIT_EXT
void ivas_omasa_gain_masa_tc_fx(
    Word32 *output_fx[],                                       /* i/o: output synthesis signal                  */
    const Word16 gainMasa_fx,                                  /* i  : gain for MASA transport channels         */
    const Word16 nchan_transport_ism,                          /* i  : number of ISM TCs                        */
    const Word16 output_frame                                  /* i  : output frame length per channel          */
);
#endif

ivas_error ivas_omasa_ism_metadata_dec_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
@@ -650,21 +648,6 @@ void ivas_jbm_dec_get_adapted_subframes_fx(
    Word16 *nb_subframes                                        /* i/o: number of subframes in the frame        */
);

#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS
void ivas_jbm_dec_copy_tc_no_tsm_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                 Q0  */
    Word32 *tc_fx[],                                            /* i  : transport channels                  Q11 */
    const Word16 output_frame                                   /* i  : output frame size                   Q0  */
);

void ivas_ism_param_dec_tc_gain_ajust_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder handle                     */
    const UWord16 nSamples,                                     /* i  : number of samples to be compensate      */
    const UWord16 nFadeLength,                                  /* i  : length of the crossfade in samples      */
    Word32 *transport_channels_f[],                             /* i  : synthesized core-coder transport channels/DirAC output  Q_tc*/
    Word16 *Q_tc                                                /* i/o : Q of input tc buffer                   */
);
#endif
/*! r: number of bits read */
Word16 read_GR0(
    const UWord16 *bit_stream,                                  /* i  : bitstream to be read                    */
@@ -1008,20 +991,11 @@ Word16 IGF_MapBitRateToIndex(
    const Word16 rf_mode                                        /* i  :  flag to signal the RF mode                 */
);

#ifdef NONBE_1303_REND_GRANULARITY
Word16 ivas_jbm_dec_get_render_granularity_fx(
    const RENDERER_TYPE renderer_type,                          /* i  : renderer type                                               */
    const RENDERER_TYPE renderer_type_sec,                      /* i  : secondary renderer type                                     */
    const int32_t output_Fs                                     /* i  : sampling rate                                               */
);
#else
Word16 ivas_jbm_dec_get_render_granularity(
    const RENDERER_TYPE rendererType,                           /* i  : renderer type                               */
    const IVAS_FORMAT ivas_format,                              /* i  : ivas format                                 */
    const MC_MODE mc_mode,                                      /* i  : MC mode                                     */
    const Word32 output_Fs                                      /* i  : sampling rate                               */
); 
#endif

void stereo_dft_config_fx(
    STEREO_DFT_CONFIG_DATA_HANDLE hConfig,                      /* o  : DFT stereo configuration                    */
@@ -4222,10 +4196,6 @@ Word64 var_32_fx(

ivas_error ivas_jbm_dec_tc_fx(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
#ifndef LIB_DEC_REVISION
    ,
    Word32 *data_fx 
#endif
);

ivas_error ivas_jbm_dec_flush_renderer_fx(
Loading