Commit 89c1de6d authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into...

Merge remote-tracking branch 'remotes/origin/main' into 945-wrong-return-value-in-ivas_dec_getnumorientationsubframes
parents 75c44dd8 fd675060
Loading
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -48,7 +48,9 @@
#include "rotation_file_reader.h"
#include "aeid_file_reader.h"
#include "split_render_file_read_write.h"
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
#include "split_rend_bfi_file_reader.h"
#endif
#include "vector3_pair_file_reader.h"
#ifdef DEBUGGING
#include "debug.h"
@@ -168,7 +170,9 @@ typedef struct
    int16_t numInMetadataFiles;
    char outMetadataFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char headRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    char splitRendBFIFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
#endif
    char referenceVectorFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char referenceRotationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char externalOrientationFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
@@ -219,7 +223,9 @@ typedef enum
    CmdLnOptionId_listFormats,
    CmdLnOptionId_inputGain,
    CmdLnOptionId_outputMetadata,
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    CmdLnOptionId_SplitRendBFIFile,
#endif
    CmdLnOptionId_referenceVectorFile,
    CmdLnOptionId_exteriorOrientationFile,
    CmdLnOptionId_framing,
@@ -278,12 +284,14 @@ static const CmdLnParser_Option cliOptions[] = {
        .matchShort = "om",
        .description = "coded metadata file for BINAURAL_SPLIT_PCM output mode",
    },
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    {
        .id = CmdLnOptionId_SplitRendBFIFile,
        .match = "post_rend_bfi_file",
        .matchShort = "prbfi",
        .description = "Split rendering option: bfi file",
    },
#endif
    {
        .id = CmdLnOptionId_refRotFile,
        .match = "reference_rotation_file",
@@ -688,7 +696,9 @@ int main(
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[RENDERER_MAX_INPUT_CHANNELS];
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[RENDERER_MAX_INPUT_CHANNELS];
    int16_t cldfb_in_flag, CLDFBframeSize_smpls;
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    SplitRendBFIFileReader *splitRendBFIReader = NULL;
#endif
    Vector3PairFileReader *referenceVectorReader = NULL;
    hrtfFileReader *hrtfFileReader = NULL;
    IVAS_DEC_HRTF_CREND_HANDLE *hHrtfCrend = NULL;
@@ -819,11 +829,13 @@ int main(
        }
    }

#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    if ( !isEmptyString( args.splitRendBFIFilePath ) )
    {
        convert_backslash( args.splitRendBFIFilePath );
        SplitRendBFIFileReader_open( args.splitRendBFIFilePath, &splitRendBFIReader );
    }
#endif

    if ( !isEmptyString( args.externalOrientationFilePath ) )
    {
@@ -2072,7 +2084,9 @@ cleanup:
    }

    split_rend_reader_writer_close( &hSplitRendFileReadWrite );
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    SplitRendBFIFileReader_close( &splitRendBFIReader );
#endif

    for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
    {
@@ -2683,7 +2697,9 @@ static CmdlnArgs defaultArgs(

    clearString( args.headRotationFilePath );
    clearString( args.outMetadataFilePath );
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    clearString( args.splitRendBFIFilePath );
#endif
    clearString( args.referenceVectorFilePath );
    clearString( args.referenceRotationFilePath );
    clearString( args.customHrtfFilePath );
@@ -2790,10 +2806,12 @@ static void parseOption(
            assert( numOptionValues == 1 );
            strncpy( args->outMetadataFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
        case CmdLnOptionId_SplitRendBFIFile:
            assert( numOptionValues == 1 );
            strncpy( args->splitRendBFIFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
#endif
        case CmdLnOptionId_referenceVectorFile:
            assert( numOptionValues == 1 );
            strncpy( args->referenceVectorFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
+3 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@
#define FIX_2274_OOB_INDEXING_IN_CORRMATRIX             /* FhG: fix OOB indexing complaint */
#define FIX_2278_OOB_INDEXING_IN_CLOSED_LOOP_PIT_SEARCH /* FhG: fix oob indexing USAN complaint */
#define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE       /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */
#define FIX_1486_INIT_OUTPUT_POINTERS                   /* FhG: always initialize pointers in renderer flush */
#define FIX_1474_USAN_TRANS_INV                         /* Eri: Fix USAN out-of-bounds warning. No OOB occurs, but the pointer is set to point to uninitialized memory. */
#define FIX_2268_OOB_INDEXING_IN_IFFT                   /* VA: Fix for issue 2268, to silence clang18 */
#define FIX_2271_OOB_INDEXING_IN_PIT_OL2                /* VA: Fix for issue 2271, to silence clang18 */
@@ -183,6 +184,8 @@
#define FIX_1827_REMOVE_UNUSED_PSNOISEGEN_ISAR          /* Dolby: remove unused noise generator from ISAR */
#define FIX_1487_ACCESS_OF_UNINIT_VAL_FROM_ARR_ISM_DTX  /* FhG/VA: init nb_bits_metadata to zero */
#define FIX_1477_OOB_INDEX_IN_D_ACELP_INDEXING          /* FhG: fix oob indexing */
#define FIX_1494_SET_SPLITBFI_UNUSED                    /* Dolby: Fix issue 1494, remove unused function setting BFI flag in ISAR renderer */
#define FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE          /* Dolby: Fix for issue 1479, MSAN error due to uninitialized value in SPAR */

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

+14 −0
Original line number Diff line number Diff line
@@ -1408,6 +1408,9 @@ ivas_error ivas_jbm_dec_flush_renderer(
    int16_t n_samples_still_available;
    int16_t n_slots_still_available;
    int16_t n_samples_to_render;
#ifdef FIX_1486_INIT_OUTPUT_POINTERS
    int16_t ch_idx;
#endif
    int16_t n_samples_granularity;
    DECODER_TC_BUFFER_HANDLE hTcBuffer;
    float *p_output[MAX_LS_CHANNELS + MAX_NUM_OBJECTS];
@@ -1417,6 +1420,13 @@ ivas_error ivas_jbm_dec_flush_renderer(
        return IVAS_ERR_OK;
    }

#ifdef FIX_1486_INIT_OUTPUT_POINTERS
    for ( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ )
    {
        p_output[ch_idx] = st_ivas->p_output_f[ch_idx];
    }
#endif

    *nSamplesRendered = 0;
    hTcBuffer = st_ivas->hTcBuffer;
    n_samples_granularity = hTcBuffer->n_samples_granularity;
@@ -1434,8 +1444,10 @@ ivas_error ivas_jbm_dec_flush_renderer(

    if ( n_slots_still_available )
    {
#ifndef FIX_1486_INIT_OUTPUT_POINTERS
        int16_t ch_idx;

#endif
        /* render available full slots (with new lower granularity) */
        for ( ch_idx = 0; ch_idx < max( hTcBuffer->nchan_transport_rend, hTcBuffer->nchan_buffer_full ); ch_idx++ )
        {
@@ -1455,10 +1467,12 @@ ivas_error ivas_jbm_dec_flush_renderer(
        hTcBuffer->n_samples_flushed = n_samples_to_render;
        hTcBuffer->n_samples_rendered = 0;

#ifndef FIX_1486_INIT_OUTPUT_POINTERS
        for ( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ )
        {
            p_output[ch_idx] = st_ivas->p_output_f[ch_idx];
        }
#endif

        if ( st_ivas->ivas_format == ISM_FORMAT )
        {
+5 −0
Original line number Diff line number Diff line
@@ -585,6 +585,11 @@ ivas_error ivas_spar_md_dec_init(
    }
    hMdDec->first_valid_frame = 1;

#ifdef FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE
    hMdDec->spar_md.res_ind = 0;
    hMdDec->spar_md.prior_dyn_active_w_flag = 0;
#endif

    return IVAS_ERR_OK;
}

+10 −0
Original line number Diff line number Diff line
@@ -89,7 +89,9 @@ typedef struct
    const EFAP_WRAPPER *pEfapOutWrapper;
    const IVAS_REND_HeadRotData *pHeadRotData;
    const RENDER_CONFIG_HANDLE *hhRendererConfig;
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    const int16_t *pSplitRendBFI;
#endif
    const SPLIT_REND_WRAPPER *pSplitRendWrapper;
    const COMBINED_ORIENTATION_HANDLE *pCombinedOrientationData;
    const IVAS_DefaultReverbSize *pSelectedRoomReverbSize;
@@ -213,7 +215,9 @@ struct IVAS_REND
    EFAP_WRAPPER efapOutWrapper;
    IVAS_LSSETUP_CUSTOM_STRUCT customLsOut;

#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    int16_t splitRendBFI;
#endif
    SPLIT_REND_WRAPPER *splitRendWrapper;
    IVAS_REND_AudioBuffer splitRendEncBuffer;

@@ -1236,7 +1240,9 @@ static rendering_context getRendCtx(
    ctx.pEfapOutWrapper = &hIvasRend->efapOutWrapper;
    ctx.pHeadRotData = &hIvasRend->headRotData;
    ctx.hhRendererConfig = &hIvasRend->hRendererConfig;
#ifndef FIX_1494_SET_SPLITBFI_UNUSED
    ctx.pSplitRendBFI = &hIvasRend->splitRendBFI;
#endif
    ctx.pSplitRendWrapper = hIvasRend->splitRendWrapper;
    ctx.pCombinedOrientationData = &hIvasRend->hCombinedOrientationData;
    ctx.pSelectedRoomReverbSize = &hIvasRend->selectedRoomReverbSize;
@@ -5059,6 +5065,8 @@ ivas_error IVAS_REND_DisableHeadRotation(
}


#ifndef FIX_1494_SET_SPLITBFI_UNUSED

/*-------------------------------------------------------------------*
 * IVAS_REND_SetSplitRendBFI()
 *
@@ -5075,6 +5083,8 @@ ivas_error IVAS_REND_SetSplitRendBFI(
    return IVAS_ERR_OK;
}

#endif


/*-------------------------------------------------------------------*
 * IVAS_REND_SetOrientationTrackingMode()
Loading