Commit 8961bf9b authored by emerit's avatar emerit
Browse files

Merge branch 'main' into 2089-Limiter_attack_and_release_constants_differ_from_float_version

parents 99d65418 6f242bfb
Loading
Loading
Loading
Loading
+35 −1
Original line number Original line Diff line number Diff line
@@ -2265,6 +2265,23 @@ static ivas_error decodeG192(
                    }
                    }
                }
                }
#endif
#endif

#ifdef FIX_HRTF_LOAD_API
                /* decode transport channels, do TSM and feed to renderer */
                if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, isSplitRend, splitRendBits ) ) != IVAS_ERR_OK )
                {
                    return error;
                }

#endif
#ifdef OBJ_EDITING_API
                /* Do the final preparations needed for rendering */
                if ( ( error = IVAS_DEC_PrepareRenderer( hIvasDec ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError: could not prepare the renderer: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }
#endif
            }
            }


            if ( isSplitRend )
            if ( isSplitRend )
@@ -2714,6 +2731,9 @@ static ivas_error decodeVoIP(
    int16_t nOutSamples = 0;
    int16_t nOutSamples = 0;
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef FIX_CREND_SIMPLIFY_CODE
    bool bitstreamReadDone = false;
    bool bitstreamReadDone = false;
#ifdef OBJ_EDITING_API
    bool parametersAvailableForEditing = false;
#endif
    uint16_t nSamplesRendered;
    uint16_t nSamplesRendered;
#endif
#endif


@@ -3005,13 +3025,21 @@ static ivas_error decodeVoIP(
#endif
#endif
#ifdef SUPPORT_JBM_TRACEFILE
#ifdef SUPPORT_JBM_TRACEFILE
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef OBJ_EDITING_API
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, &parametersAvailableForEditing ) ) != IVAS_ERR_OK )
#else
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered ) ) != IVAS_ERR_OK )
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered ) ) != IVAS_ERR_OK )
#endif
#else
#else
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter ) ) != IVAS_ERR_OK )
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter ) ) != IVAS_ERR_OK )
#endif
#endif
#else
#else
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef FIX_CREND_SIMPLIFY_CODE
#ifdef OBJ_EDITING_API
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, &bitstreamReadDone, &parametersAvailableForEditing ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, &bitstreamReadDone ) ) != IVAS_ERR_OK )
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, (void *) pcmBuf, systemTime_ms, &bitstreamReadDone ) ) != IVAS_ERR_OK )
#endif
#else
#else
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms ) ) != IVAS_ERR_OK )
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, pcmBuf, systemTime_ms ) ) != IVAS_ERR_OK )
#endif
#endif
@@ -3046,9 +3074,15 @@ static ivas_error decodeVoIP(
                }
                }
            }
            }
#endif
#endif
#ifdef FIX_HRTF_LOAD
#ifdef OBJ_EDITING_API
            if ( parametersAvailableForEditing == true )
            {
                /* do the object editing here */
            }
            }
#endif
#endif
#ifdef FIX_HRTF_LOAD
        } /* while ( nSamplesRendered < nOutSamples ) */
#endif


        /* write JBM Offset file entry */
        /* write JBM Offset file entry */
        if ( jbmOffsetWriter != NULL )
        if ( jbmOffsetWriter != NULL )
+21 −0
Original line number Original line Diff line number Diff line
@@ -992,6 +992,9 @@ int main(


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


@@ -1000,7 +1003,11 @@ int main(
        {
        {
            ivas_error error_tmp;
            ivas_error error_tmp;
            numSamplesRead = (int16_t) inBufferSize;
            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 );
            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_OK )
            {
            {
                if ( error_tmp == IVAS_ERR_END_OF_FILE )
                if ( error_tmp == IVAS_ERR_END_OF_FILE )
@@ -1067,19 +1074,33 @@ int main(
        /* Read from split renderer bfi file if specified */
        /* Read from split renderer bfi file if specified */
        if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame )
        if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame )
        {
        {
#ifndef NONBE_1293_CRASH_FIRST_FRAME_LOST
            int16_t bfi;
            int16_t bfi;
#endif
            if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK )
            if ( ( error = SplitRendBFIFileReading( splitRendBFIReader, &bfi ) ) != IVAS_ERR_OK )
            {
            {
                fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) );
                fprintf( stderr, "\nError in SplitRendBFIFileReading(): %s\n", ivas_error_to_string( error ) );
                goto cleanup;
                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 )
            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 ) );
                fprintf( stderr, "\nError in ISAR_POST_REND_SetSplitRendBFI(): %s\n", ivas_error_to_string( error ) );
                goto cleanup;
                goto cleanup;
            }
            }
        }
        }
#endif


        for ( i = 0; i < args.inConfig.numBinBuses; ++i )
        for ( i = 0; i < args.inConfig.numBinBuses; ++i )
        {
        {
+8 −0
Original line number Original line Diff line number Diff line
@@ -1342,7 +1342,15 @@ int main(
        masaIds[i] = 0u;
        masaIds[i] = 0u;
    }
    }
#ifdef NONBE_1377_REND_DIRATT_CONF
#ifdef NONBE_1377_REND_DIRATT_CONF
#ifdef FIX_1377_HANDLE_ERROR_CODE
    if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nIVAS_REND_SetObjectIDs: %s\n", ivas_error_to_string( error ) );
        goto cleanup;
    }
#else
    IVAS_REND_SetObjectIDs( hIvasRend );
    IVAS_REND_SetObjectIDs( hIvasRend );
#endif
#endif
#endif


    for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i )
    for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i )
+12 −0
Original line number Original line Diff line number Diff line
@@ -137,9 +137,21 @@ typedef struct _IVAS_ISM_METADATA
    float yaw;
    float yaw;
    float pitch;
    float pitch;
    Word16 non_diegetic_flag;
    Word16 non_diegetic_flag;
#ifdef OBJ_EDITING_API
    Word32 gain_fx;
#endif


} IVAS_ISM_METADATA;
} IVAS_ISM_METADATA;


#ifdef OBJ_EDITING_API
typedef struct _IVAS_EDITABLE_PARAMETERS
{
    Word16 num_obj;
    IVAS_ISM_METADATA ism_metadata[IVAS_MAX_NUM_OBJECTS];
    Word32 gain_bed_fx;
} IVAS_EDITABLE_PARAMETERS;
#endif

typedef struct
typedef struct
{
{
    // float w, x, y, z;
    // float w, x, y, z;
+0 −8
Original line number Original line Diff line number Diff line
@@ -1415,16 +1415,8 @@ typedef enum
#define LFE_CHANNEL                             3
#define LFE_CHANNEL                             3


#define MIN_LFE_NRG                             0.5f
#define MIN_LFE_NRG                             0.5f
#ifdef ADJUST_MCT_CHANNELS_MAX   
#define MCT_MAX_CHANNELS                        11                          /* == 7.1.4 LS channels without the LFE channel */
#define MCT_MAX_CHANNELS                        11                          /* == 7.1.4 LS channels without the LFE channel */
#define MCT_MAX_BLOCKS                          ( ( MCT_MAX_CHANNELS + 1 ) / CPE_CHANNELS )    /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/
#define MCT_MAX_BLOCKS                          ( ( MCT_MAX_CHANNELS + 1 ) / CPE_CHANNELS )    /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/
#else
#define MCT_MAX_CHANNELS                        MAX_TRANSPORT_CHANNELS
#define MCT_MAX_BLOCKS                          ( MCT_MAX_CHANNELS / CPE_CHANNELS )    /* max. number of channel pairs (MCT_MAX_CHANNELS/2) within MCT*/

#define MAX_NUM_DATA                            max( MCT_MAX_CHANNELS, 4 )
#endif

#define NBBITS_MCT_RATIO                        4
#define NBBITS_MCT_RATIO                        4
#define BITRATE_MCT_RATIO_RANGE                 ( 1 << NBBITS_MCT_RATIO )   /* Range of the coded bitrate distribution ratio */
#define BITRATE_MCT_RATIO_RANGE                 ( 1 << NBBITS_MCT_RATIO )   /* Range of the coded bitrate distribution ratio */


Loading