Commit ccb3f799 authored by multrus's avatar multrus
Browse files

Merge branch 'main' into 1867-replace-overflow-basop-operators-by-overflow-free-variants-in-lib_enc

parents a715c463 c379f745
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1739,7 +1739,7 @@ int main(
            int16_t numFramesToTargetOrientation[IVAS_MAX_PARAM_SPATIAL_SUBFRAMES];
            for ( sf_idx = 0; sf_idx < num_subframes; sf_idx++ )
            {
                if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quatBuffer[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK )
                if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &quatBuffer[sf_idx], &enableHeadRotation[sf_idx], &enableExternalOrientation[sf_idx], &enableRotationInterpolation[sf_idx], &numFramesToTargetOrientation[sf_idx] ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in External Orientation File Reading: %s\n", ivas_error_to_string( error ) );
                    goto cleanup;
+3 −0
Original line number Diff line number Diff line
@@ -668,6 +668,9 @@ enum
#define ACELP_TCX_TRANS_NS                  1250000                             /* Duration of the ACELP->TCX overlap - 1.25 ms */
#define L_FRAME_MAX                         L_FRAME48k                          /* Max 20ms frame size @48kHz              */
#define L_FRAME_PLUS                        1200                                /* Max frame size (long TCX frame)            */
#ifdef FIX_1320_STACK_CPE_DECODER
#define L_FRAME_PLUS_INTERNAL               800                                 /* Max frame size (long TCX frame) at maximum internal sampling rate */
#endif
#define L_MDCT_OVLP_MAX                     NS2SA( 48000, ACELP_LOOK_NS )       /* = Max mdct overlap */
#define N_TCX10_MAX                         480                                 /* Max size of TCX10 MDCT spectrum */
#define BITS_TEC                            1                                   /* number of bits for TEC */
+10 −0
Original line number Diff line number Diff line
@@ -79,13 +79,23 @@
#define FIX_1944_CRASH_FOR_STEREO                            /* FhG: improve TonalMDCTConceal_InsertNoise calculation precision */
#define FIX_1970_SBA_CRASH                                   /* Dlb: Fix for issue 1970, SBA crash */

#define FIX_1978_SAT_MISSING_IN_GAIN_ENC                     /* VA:  Fix add saturation missing that lead to a crash in P800-10 */

#define FIX_1979_SAT_MISSING_IN_LSF_ENC                      /* VA: Proposal to fix 1979, saturation in lsf_enc, NOkia to review */
#define FIX_1946_CRASH_JBM_PROCESSING                        /* FhG: Increased guard bits of DFT_fx */
#define FIX_1980_CRASH_FDCNG_ENCODESID                       /* FhG: Add one bit of headroom in e_fx calculation in FdCng_encodeSID_ivas_fx() */
#define FIX_1987_CRASH_OMASA_ENERGY                          /* FhG: Replace cldfbAnalysis_ts_fx_fix_q() with cldfbAnalysis_ts_fx_var_q() to avoid assertion error */
#define FIX_1985_SBA_714_HF_LOSS                             /* Dlb: Fix for issue 1985, improved dirac ref pow precision*/
#define FIX_1819_EIGENVALUE_ERROR                            /* FhG: Workaround for zero eigenvalue: replace with epsilon if det != 0*/
/* #################### Start BASOP porting switches ############################ */

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */
#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_1302_FIX_OMASA_JBM_FLUSH                  /* VA: issue 1302: fix OMASA JBM bitrate switching flush in binaural output */
#define NONBE_1328_FIX_NON_LINEARITY                    /* VA: Fix possible issue when computing bwe_exc_extended and previous frame were almost 0, float issue 1328  */
#define FIX_1319_STACK_SBA_DECODER                      /* VA: issue 1319: Optimize the definition of buffer lengths in the SBA decoder */
#define FIX_1320_STACK_CPE_DECODER                      /* VA: issue 1320: Optimize the stack memory consumption in the CPE decoder */
#define FIX_1984_SAT_IN_PSYCHAD                         /* VA: Issue 1984: proposal to fix an assert */

/* #################### End BASOP porting switches ############################ */

+9 −5
Original line number Diff line number Diff line
@@ -1446,7 +1446,11 @@ void PsychAdaptLowFreqDeemph(
        tmp_e = min_e;
        move16();
        tmp = Inv16( min, &tmp_e ); /*Q15 - tmp_e*/
#ifdef FIX_1984_SAT_IN_PSYCHAD
        L_tmp = L_shl_sat( L_mult_sat( tmp, max_val ), add( tmp_e, max_e ) ); /* Q31 */
#else
        L_tmp = L_shl( L_mult( tmp, max_val ), add( tmp_e, max_e ) );                     /* Q31 */
#endif
        L_tmp = BASOP_Util_Log2( L_tmp );    /* Q25 */
        L_tmp = L_shr( L_tmp, 7 );           /* 0.0078125f = 1.f/(1<<7) */
        L_tmp = BASOP_Util_InvLog2( L_tmp ); /* Q31 */
+8 −0
Original line number Diff line number Diff line
@@ -36,7 +36,11 @@ void decoder_LPD_fx(
)
{
    Word16 *param_lpc;
#ifdef FIX_1320_STACK_CPE_DECODER
    Word16 synth_buf[OLD_SYNTH_INTERNAL_DEC + L_FRAME_PLUS_INTERNAL + M];
#else
    Word16 synth_buf[OLD_SYNTH_SIZE_DEC + L_FRAME_PLUS + M];
#endif
    Word16 *synth;
    Word16 synth_bufFB[OLD_SYNTH_SIZE_DEC + L_FRAME_PLUS + M];
    Word16 *synthFB;
@@ -114,7 +118,11 @@ void decoder_LPD_fx(
    synth = synth_buf + hTcxDec->old_synth_len;
    /*st->old_synth: Q_0*/
    Copy( hTcxDec->old_synth, synth_buf, hTcxDec->old_synth_len );
#ifdef FIX_1320_STACK_CPE_DECODER
    set16_fx( synth, 0, L_FRAME_PLUS_INTERNAL + M );
#else
    set16_fx( synth, 0, L_FRAME_PLUS + M );
#endif

    synthFB = synth_bufFB + hTcxDec->old_synth_lenFB;
    Copy( hTcxDec->old_synthFB_fx, synth_bufFB, hTcxDec->old_synth_lenFB );
Loading