Commit a539493d authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into 843-maintenance-oct-3

parents 6eba8b43 0b2b1ac3
Loading
Loading
Loading
Loading
+25 −2
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ int main(
    bool mainFailed = true; /* Assume main failed until cleanup is reached without errors */
    DecArguments arg;
    ivas_error error = IVAS_ERR_UNKNOWN;
    int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE];
#ifdef SPLIT_REND_WITH_HEAD_ROT
    uint8_t splitRendBitsBuf[IVAS_MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES];
#endif
@@ -197,6 +196,11 @@ int main(
    RotFileReader *refRotReader = NULL;
    Vector3PairFileReader *referenceVectorReader = NULL;
    RenderConfigReader *renderConfigReader = NULL;
#ifdef FIX_847_OUTPUT_PCM_BUFFER
    int16_t *pcmBuf = NULL;
#else
    int16_t pcmBuf[MAX_OUTPUT_PCM_BUFFER_SIZE];
#endif
#ifdef DEBUGGING
    int32_t noClipping;
    int32_t cnt_frames_limited;
@@ -739,6 +743,21 @@ int main(
        }
    }

#ifdef FIX_847_OUTPUT_PCM_BUFFER
    /*------------------------------------------------------------------------------------------*
     * Allocate output data buffer
     *------------------------------------------------------------------------------------------*/

    int16_t pcmBufSize;
    if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmBufSize ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nGetOutputBufferSize failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
        goto cleanup;
    }

    pcmBuf = malloc( pcmBufSize * sizeof( int16_t ) );

#endif

    /*-----------------------------------------------------------------*
     * Decoding
@@ -793,10 +812,14 @@ int main(

cleanup:

#ifdef FIX_847_OUTPUT_PCM_BUFFER
    free( pcmBuf );
#endif

#ifdef DEBUG_SBA_AUDIO_DUMP
    IVAS_DEC_GetSbaDebugParams( hIvasDec, &numOutChannels, &numTransportChannels, &pca_ingest_channels );
#endif

#endif
    if ( arg.hrtfReaderEnabled )
    {
        IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL;
+7 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ typedef enum
    IVAS_ERR_INVALID_FEC_CONFIG,
    IVAS_ERR_INVALID_FEC_OFFSET,
    IVAS_ERR_INVALID_INPUT_BUFFER_SIZE,
#ifdef FIX_847_OUTPUT_PCM_BUFFER
    IVAS_ERR_INVALID_OUTPUT_BUFFER_SIZE,
#endif
    IVAS_ERR_DTX_NOT_SUPPORTED,
    IVAS_ERR_UNEXPECTED_NULL_POINTER,
    IVAS_ERR_METADATA_NOT_EXPECTED,
@@ -214,6 +217,10 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Invalid FEC offset";
        case IVAS_ERR_INVALID_INPUT_BUFFER_SIZE:
            return "Invalid input buffer size";
#ifdef FIX_847_OUTPUT_PCM_BUFFER
        case IVAS_ERR_INVALID_OUTPUT_BUFFER_SIZE:
            return "Invalid output buffer size";
#endif
        case IVAS_ERR_DTX_NOT_SUPPORTED:
            return "DTX is not supported in this IVAS format and element mode";
        case IVAS_ERR_UNEXPECTED_NULL_POINTER:

lib_com/options.h

100644 → 100755
+10 −3
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@
/*#define ALLOW_BYTE_EP*/                       /* allow byte fer pattern files and check fer pattern file validity */
#define WRAP_AS_EIDXOR                          /* wraps  FER file (as in STL_eid-xor.c/softbit.c) */

#define DEBUG_FORCE_MDCT_STEREO_MODE            /* Force stereo mode decision for MDCT stereo: -stereo 3 1 forces L/R coding and -stereo 3 2 forces full M/S coding */
/*#define DEBUG_FORCE_MDCT_STEREO_MODE*/        /* Force stereo mode decision for MDCT stereo: -stereo 3 1 forces L/R coding and -stereo 3 2 forces full M/S coding */
/*#define DEBUG_STEREO_DFT_NOCORE*/             /* DFT stereo: by-pass core coder at decoder side*/
/*#define DEBUG_STEREO_DFT_NOSTEREO*/           /* DFT stereo: by-pass stereo processing at encoder and decoder side*/
/*#define DEBUG_STEREO_DFT_NOQRES*/
@@ -158,12 +158,17 @@
#define ROM_TO_RAM                                     /*Dlb : ROM optimization in SR mode*/     
#define FIX_712_713_SPLIT_REND_MASA_MC                 /*Dlb : Fix for issue 712 and 713*/
#endif
#define REMOVE_UNUSED_FUNCTION                          /* Dlb: Remove functions that are unhit/unused */
#define FIX_MSAN_USAN_ERROR_JBM                         /* Dlb: Resolve MSAN and USAN errors in the SBA-JBM test case added*/

#define FIX_818_DOUBLE_PREC_KERNEN_SW                   /* FhG: Issue 818: Avoid double precision in kernel switching */

#define FIX_818_DOUBLE_PREC_KERNEL_SW                   /* FhG: Issue 818: Avoid double precision in kernel switching */
#define FIX_822_REFACTOR_BIN_REVERB_OPEN                /* Nokia: Addresses first step of issue 822 by refactoring ivas_binaural_reverb_open */
#define FIX_847_OUTPUT_PCM_BUFFER                       /* VA: issue 847: Allocate decoder output PCM buffer dynamically */

/* #################### End BE switches ################################## */

/* #################### End BE switches ################################## */
#define BE_FIX_832_ASAN_ERROR_EFAP_OSBA                       /* FhG: issue #832: fix ASAN error caused by re-allocating EFAP memories in OSBA*/

/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt selection floating point code */
@@ -179,6 +184,8 @@
#define NONBE_FIX_841_MC_RS_TDOBJ_RENDERER                    /* FhG: Issue #841: [Non-BE] Resolve "MC RS HRFT handle not set to NULL" */
#define NONBE_FIX_840_PARAMMC_RS                              /* FhG: Issue #840: Resolve "MC RS ParamMC hoa encoder wrongly set to zero" */
#define NONBE_FIX_826_JBM_MASA_CNA_CNG                        /* FhG: issue #826:  Resolve "JBM MASA: CNA and CNG not in sync with non-JBM decoding" */
#define NONBE_FIX_835_JBM_PARAMUPMIX_HEADROT                  /* FhG: issue #835: Resolve "JBM: ParamUpmix head rotation broken" */
#define NONBE_FIX_838_CRASH_24_4_WB                           /* FhG: Issue 838: fix encoder crashes for Unified Stereo and MASA 2 TC at 24.4 kbps WB due to missing IGF (re-) allocation */

/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -1232,7 +1232,11 @@ ivas_error ivas_binRenderer_open(
    /* Allocate memories needed for reverb module */
    if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV && st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
#ifdef FIX_822_REFACTOR_BIN_REVERB_OPEN
        if ( ( error = ivas_binaural_reverb_open_fastconv( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK )
#else
        if ( ( error = ivas_binaural_reverb_open( &( hBinRenderer->hReverb ), hBinRenderer->conv_band, hBinRenderer->timeSlots, &( st_ivas->hRenderConfig->roomAcoustics ), st_ivas->hIntSetup.output_config, st_ivas->hDecoderConfig->output_Fs, RENDERER_BINAURAL_FASTCONV, st_ivas->hHrtfFastConv, st_ivas->hHrtfParambin ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
+4 −1
Original line number Diff line number Diff line
@@ -67,8 +67,11 @@ ivas_error ivas_ism_renderer_open(
    {
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISM renderer\n" ) );
    }

#ifdef BE_FIX_832_ASAN_ERROR_EFAP_OSBA
    if ( st_ivas->hIntSetup.is_loudspeaker_setup && st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL && st_ivas->hEFAPdata == NULL )
#else
    if ( st_ivas->hIntSetup.is_loudspeaker_setup && st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL )
#endif
    {
        if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK )
        {
Loading