Commit f5d502e8 authored by multrus's avatar multrus
Browse files

merge from main

parents 78b7a072 132c37aa
Loading
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
@@ -1174,7 +1174,53 @@ int main(
        fprintf( stderr, "\nError in Renderer Config Init: %s\n", ivas_error_to_string( error ) );
        goto cleanup;
    }
#ifdef FIX_1452_DEFAULT_REVERB

    if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
    {
        /* Set reverb room size if specified or select based automatically based on default per input formats */
        IVAS_ROOM_SIZE_T selectedReverbRoomSize = args.reverbRoomSize;
        if ( selectedReverbRoomSize == IVAS_ROOM_SIZE_AUTO )
        {
            bool combinedFormat = false;
            selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM;

            /* ISM present with MASA/SBA inputs; treat as combined format */
            if ( args.inConfig.numAudioObjects > 0 && ( args.inConfig.numMasaBuses > 0 || args.inConfig.numAmbisonicsBuses > 0 ) )
            {
                combinedFormat = true;
            }

            if ( combinedFormat )
            {
                selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM;
            }
            else
            {
                /* Only set large if ISM is present alone, MASA and Ambisonic have been checked above */
                if ( args.inConfig.numAudioObjects > 0 && args.inConfig.numMultiChannelBuses == 0 )
                {
                    selectedReverbRoomSize = IVAS_ROOM_SIZE_LARGE;
                }
                /* if only MC is present, set medium; Will not be overridden by the subsequent block */
                else if ( args.inConfig.numMultiChannelBuses > 0 )
                {
                    selectedReverbRoomSize = IVAS_ROOM_SIZE_MEDIUM;
                }
                else if ( args.inConfig.numMasaBuses > 0 || args.inConfig.numAmbisonicsBuses > 0 )
                {
                    selectedReverbRoomSize = IVAS_ROOM_SIZE_SMALL;
                }
            }
        }

        if ( ( error = IVAS_REND_SetReverbRoomSize( hIvasRend, selectedReverbRoomSize ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError setting reverb room size\n" );
            goto cleanup;
        }
    }
#endif

    if ( args.renderConfigFilePath[0] != '\0' )
    {
+11 −0
Original line number Diff line number Diff line
@@ -1640,6 +1640,17 @@ typedef enum
#define IVAS_REVERB_DEFAULT_M_N_BANDS           31
#define IVAS_REVERB_DEFAULT_S_N_BANDS           60

#ifdef FIX_1452_DEFAULT_REVERB
#define IVAS_REVERB_DEFAULT_S_ACOUSTIC_PRE_DELAY_FX    2013266  /* 0.015f in Q27 */
#define IVAS_REVERB_DEFAULT_S_INPUT_PRE_DELAY_FX       2684355  /* 0.02f in Q27 */

#define IVAS_REVERB_DEFAULT_M_ACOUSTIC_PRE_DELAY_FX    2013266  /* 0.015f in Q27 */
#define IVAS_REVERB_DEFAULT_M_INPUT_PRE_DELAY_FX       2684355  /* 0.02f in Q27 */

#define IVAS_REVERB_DEFAULT_L_ACOUSTIC_PRE_DELAY_FX    2181038  /* 0.01625f in Q27 */
#define IVAS_REVERB_DEFAULT_L_INPUT_PRE_DELAY_FX       13421773 /* 0.1f in Q27 */
#endif

#define LR_IAC_LENGTH_NR_FC                     ( RV_LENGTH_NR_FC )
#define LR_IAC_LENGTH_NR_FC_16KHZ               ( RV_LENGTH_NR_FC_16KHZ )

+2 −0
Original line number Diff line number Diff line
@@ -338,7 +338,9 @@ extern const Word32 ls_azimuth_CICP16_fx[9];
extern const Word32 ls_elevation_CICP16_fx[9];
extern const Word32 ls_azimuth_CICP19_fx[11];
extern const Word32 ls_elevation_CICP19_fx[11];
#ifndef FIX_BASOP_2095_REMOVE_TABLES_PT01
extern const Word16 pow_10_q11[128];
#endif
extern const Word32 pow_10_q23[14];
extern const Word16 ivas_sin_az_fx[361];
extern const Word16 ivas_sine_panning_tbl_fx[601];
+4 −2
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ const Word16 dft_band_res_cod[3][4] =
    {0,5,6,7}
};

#ifndef FIX_BASOP_2095_REMOVE_TABLES_PT01
// Q31
const Word32 dft_res_gains_q_Q31[][2] = 
{
@@ -247,7 +248,7 @@ const Word32 dft_res_gains_q_Q31[][2] =
    {2144077696, 13136157 },
    {2147440640, 13580687 }
};

#endif

/* tables for adaptive Golomb-Rice coding of DFT stereo parameters */
const Word16 dft_code_itd[] =
@@ -3419,6 +3420,7 @@ const Word32 ls_azimuth_CICP19_fx[11] = { 125829120, -125829120, 0, 566231040, -
/* Q22 */
const Word32 ls_elevation_CICP19_fx[11] = { 0, 0, 0, 0, 0, 0, 0, 146800640, 146800640, 146800640, 146800640 };

#ifndef FIX_BASOP_2095_REMOVE_TABLES_PT01
const Word16 pow_10_q11[128] = {
    2048, 2085, 2123, 2161, 2200, 2240, 2281, 2322, 2364, 2407, 2451, 2496, 2541, 2587, 2634, 2682, 2731, 2780, 2831, 2882, 2934, 2988, 3042, 3097, 3153, 3211, 3269,
    3328, 3389, 3450, 3513, 3576, 3641, 3708, 3775, 3843, 3913, 3984, 4056, 4130, 4205, 4281, 4359, 4438, 4519, 4601, 4684, 4769, 4856, 4944, 5034, 5125, 5218, 5313,
@@ -3426,7 +3428,7 @@ const Word16 pow_10_q11[128] = {
    8793, 8952, 9115, 9280, 9449, 9620, 9795, 9973, 10154, 10338, 10526, 10717, 10911, 11109, 11311, 11516, 11725, 11938, 12155, 12375, 12600, 12829, 13062, 13299,
    13540, 13786, 14036, 14291, 14550, 14815, 15084, 15357, 15636, 15920, 16209, 16503, 16803, 17108, 17418, 17734, 18056, 18384, 18718, 19058, 19404, 19756, 20114
};

#endif
// Q12
const Word16 icbwe_gsMapping_tbl_fx[16] = { 
    -8192, -5527, -3935, -2907, -2289, -1824, -1404, -1035, -692, -404, -286, -204, -81, 0, 163, 327 
+9 −3
Original line number Diff line number Diff line
@@ -102,6 +102,8 @@
#define HARMONIZE_2537_SetTCXModeInfo                   /* FhG: Harmonize SetTCXModeInfo  - IVAS_VERSION OBVIOUSLY NOT FITTING FOR EVS - pipes not green */
#define HARMONIZE_2537_GetTCXMaxenergyChange            /* FhG: Harmonize GetTCXMaxenergyChange */
#define HARMONIZE_2508_InitTransientDetection           /* FhG: harmonize GetAttackForTCXDecision derivates for evs/ivas  */
#define FIX_BASOP_2555_FRAMELEN_CALC                    /* FhG: BASOP issue 2555: Simplify (sub-)framelength calculation in ivas_mdct_core_tns_ns_fx() */
#define FIX_BASOP_2095_REMOVE_TABLES_PT01               /* FhG: BASOP issue 2095: remove unused tables, part 01 */

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

@@ -122,11 +124,15 @@
#define HARMONIZE_DoRTFTn                               /* VA: harmonize functions DoRTFTn_fx() and DoRTFTn_fx_ivas() */
#define FIX_1574_EFAP_CODE_LINT                         /* FhG: float issue 1574: Code quality fixes in ivas_efap.c */
#define FIX_BASOP_2529_MASA_RATIO_SCALINGS              /* Nokia: BASOP issue 2529: Fix MASA ratio scalings and verifications */
#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define FIX_BASOP_2531_MCT_CP_BITRATE                   /* FhG: BASOP issue 2531: Fix MCT cp_bitrate calculation; affects bitrate switching only */
#define FIX_BASOP_2541_OMASA_ENC_FIXES                  /* Nokia: BASOP issue 2541: Fix function ivas_encode_masaism_metadata_fx */
#define FIX_BASOP_2545_FIX_LTV_REGRESSION_2529          /* Nokia: BASOP issue 2545: Fix LTV regression caused by issue 2529 fix */
#define FIX_FLOAT_1573_POSITION_UPDATE                  /* Eri: Float issue 1573: For static orientation and listener movement, the PoseUpdated flag is cleared and prevents 5 ms update rate. */
#define FIX_BASOP_2521_DIRAC_STEREO_STEFFI_NRGS         /* FhG: BASOP issue 2521: Fix wrong porting for determination of first subframe length in ivas_sba_dirac_stereo_compute_td_stefi_nrgs() */
#define FIX_1452_DEFAULT_REVERB                         /* Nokia/Philips/FhG: Fix default room presets and their usage in renderer */
#define FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC        /* VA : Basop issue 2547: Align conditions in core sw dec */
#define FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC_EVS    /* VA : Basop issue 2547: Align conditions in core sw dec, condition that could affect EVS as well, but adapted to keep EVS BE */
#define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN     /* FhG: fixes obvious bug for IVAS path. For EVS path, issue is still not resolved */

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