Commit e6762a16 authored by multrus's avatar multrus
Browse files

Merge branch '20250817_cleanup_basop' into 'main'

[non-be] [allow-regression] Clean-up of ivas-basop

See merge request !2096
parents 0166087b 35745e2b
Loading
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -3070,14 +3070,10 @@ static ivas_error decodeVoIP(
        }
        vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len;
        frame++;
#ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE
        if ( vec_pos_update == 0 )
        {
            systemTime_ms += vec_pos_len * systemTimeInc_ms;
        }
#else
        systemTime_ms += systemTimeInc_ms;
#endif

#ifdef WMOPS
        update_mem();
@@ -3086,7 +3082,6 @@ static ivas_error decodeVoIP(
    }


#ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE
    int16_t nSamplesFlushed = 0;

    /* decode and get samples */
@@ -3166,7 +3161,6 @@ static ivas_error decodeVoIP(
            }
        }
    }
#endif


    /*------------------------------------------------------------------------------------------*
+0 −4
Original line number Diff line number Diff line
@@ -1612,12 +1612,8 @@ void decoder_tcx_imdct_fx(
    Word32 x_fx[N_MAX],
    Word16 q_x,
    Word16 xn_buf_fx[],
#ifdef FIX_1348_BIT_PRECISION_IMPROVEMENT_QWIN
    Word16 *q_win,
    Word16 *q_winFB,
#else
    Word16 q_win,
#endif
    const UWord16 kernelType, /* i  : TCX transform kernel type               */
    const Word16 fUseTns,     /* i  : flag that is set if TNS data is present */
    Word16 synth_fx[],        /* i/o: synth[-M..L_frame]                      */
+0 −13
Original line number Diff line number Diff line
@@ -606,9 +606,6 @@ Word64 dot_product_cholesky_fixed(
{
    Word16 i, j;
    Word64 suma, tmp_sum;
#ifndef OPT_MCT_ENC_V3_BE
    Word32 mul;
#endif
    Word32 tmp;
    const Word32 *pt_x, *pt_A;
    pt_A = A;
@@ -623,20 +620,10 @@ Word64 dot_product_cholesky_fixed(

        FOR( j = 0; j <= i; j++ )
        {
#ifdef OPT_MCT_ENC_V3_BE
            tmp_sum = W_add( tmp_sum, Mpy_32_32( *pt_x++, *pt_A++ ) );
#else
            mul = Mpy_32_32( *pt_x++, *pt_A++ );
            tmp_sum = W_add( tmp_sum, W_deposit32_l( mul ) );
#endif
        }

#ifdef OPT_MCT_ENC_V3_BE
        tmp = W_shl_sat_l( tmp_sum, -4 ); // to make sure that the tmp_sum will not overflow
#else
        tmp_sum = W_shr( tmp_sum, 4 ); // to make sure that the tmp_sum will not overflow
        tmp = W_extract_l( tmp_sum );
#endif
        suma = W_mac_32_32( suma, tmp, tmp );
    }

+4 −31
Original line number Diff line number Diff line
@@ -72,52 +72,29 @@
#endif

/* Note: each compile switch (FIX_1101_...) is independent from the other ones */
#define OPT_MCT_ENC_V3_BE
#define OPT_BIN_REND_V2_NBE

#define FIX_1348_BIT_PRECISION_IMPROVEMENT
#define FIX_1348_BIT_PRECISION_IMPROVEMENT_QWIN
#define FIX_1348_BIT_PRECISION_IMPROVEMENT_DYNAMIC_QOLD

#define NONBE_FIX_864_JBM_RENDER_FRAMESIZE                    /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */

#define FIX_1762_COMPILER_ISSUE_NEW                          /* FhG: fix compiler issues with W_mac_32_32() + ONE_IN_Q30 */
#define ISSUE_1796_replace_shl_o                             /* FhG: replace shl_ro by overflow-free alternatives - BE*/
#define ISSUE_1799_replace_L_shr_o                           /* FhG: replace by non-overflow-alternative - BE */
#define ISSUE_1836_replace_overflow_libcom                   /* FhG: replace overflow operators by non-overflow-alternatives - BE */
#define ISSUE_1866_replace_overflow_libdec                   /* FhG: BE - Replace BASOPoverflow operators all over the lib_dec module if Overflow result is not used */

#define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */
#define FIX_1917_DIRAC_RENDER_PTR_INCR                       /* FhG: fix wrong pointer increment in ivas_dirac_dec_render_sf_fx() for object rendering */
#define FIX_CDLFB_BUFFER_SCALING                             /* FhG: fix wrong buffer scaling in ivas_dirac_dec_render_sf_fx() for object rendering */

#define FIX_1824
#define FIX_1822

#define FIX_ISSUE_1764                       /* NTT: update renorm and use abs */
#define FIX_ISSUE_1817_REPLACE_CARRY_OVERFLOW                /* FhG: bit-exact, replace carry and overflow operations by 64-bit operations, MR 1931 */
#define FIX_1844_MISSING_FREE                                /* FhG: add missing free in ivas_binRenderer_convModuleClose_fx() */
#define	NONBE_SVD_OPTIMIZATION                               /* FhG: reduce WMOPS of HouseHolderReduction() in ivas_svd_dec.c() by removing redundant mathematics and using 64 bit additions */
#define FIX_1766_TCX2ACELP_BWE_ISSUE                         /* VA : Fix rare BWE issue when switching from TCX to ACELP */

#define	NONBE_SVD_OPTIMIZATION /* FhG: reduce WMOPS of HouseHolderReduction() in ivas_svd_dec.c() by removing redundant mathematics and using 64 bit additions.*/
/* #################### Start BASOP porting switches ############################ */

#define FIX_1372_ISAR_POST_REND
#define NONBE_FIX_984_OMASA_EXT_OUTPUT                  /* Nokia: issue #984: complete the OMASA EXT output implementation */
#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */

#define FIX_1052_EXT_OUTPUT                             /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */
#define NONBE_1215_FIX_JBM_MAX_SCALING                  /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */

#define NONBE_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */
#define FIX_1050_EFAP_ALLOC                             /* FhG: issue 1050: reduction of memory allocated to EFAP handle */
#define NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS            /* FhG: fix for #1091, fix limit calculation for the regularized inverse of Kx to avoid bursts in very low signals */

#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/

#define FIX_1741_REVERB_TIMES_Q_FORMAT                  /* Philips: reverberation times in Q26 format instead of Q31 */
#define FIX_1831_REVERB_REGRESSION                      /* Philips: fixes reverb regression issues  */
#define FIX_1835_REVERB_ACTIVATION                      /* FhG: Modified reverberation activation logic and corrected factEQ calculation */
#define LC3PLUS_LEA_COMPAT_BITRATES_48_6                /* FhG: treat split-rendering 256kbps lc3plus 10ms 0dof bitrate as sentinel value for LEA compatible 48_6 bitrate (124 kbps per channel)  */
#define NONBE_FIX_ISM_XOVER_BR                          /* FhG: issue 1072: select OSBA coding method depending on number of object and bitrate */
#define FIX_1053_REVERB_RECONFIGURATION                 /* Philips: issue 1053: fix for dynamic switching of acoustic environment */
@@ -140,16 +117,12 @@
#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */
#define NONBE_FIX_1052_SBA_EXT_FIX                      /* VA: SBA external output support fix - do not overwrite "output_config" parameter */
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING       /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */

#define NONBE_1894_OSBA_SCALING                          /* FhG: do not scale OSBA inputs by 0.5 any more */
#define NONBE_FIX_1141_OSBA_ROOM_RENDERING               /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect  */
#define NONBE_1360_LFE_DELAY                           /* Dlb: LFE delay alignment when rendering in CLDFB domain*/

#define NONBE_1229_FIX_ISM1_DPID                        /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */
#define NONBE_SVD_OPTIMIZATION 

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

#define FIX_1766_TCX2ACELP_BWE_ISSUE    /* VA : Fix rare BWE issue when switching from TCX to ACELP */

#endif
+0 −13
Original line number Diff line number Diff line
@@ -9376,19 +9376,12 @@ void IMDCT_fx( Word32 *x, Word16 x_e, Word16 *old_syn_overl, Word16 *syn_Overl_T
void IMDCT_ivas_fx(
    Word32 *x_fx,
    Word16 q_x,
#ifdef FIX_1348_BIT_PRECISION_IMPROVEMENT_QWIN
    Word16 *old_syn_overl_fx,
    Word16 *Q_old_syn_overl_fx,
    Word16 *syn_Overl_TDAC_fx,
    Word16 *Q_syn_Overl_TDAC_fx,
#else
    Word16 *old_syn_overl_fx,
    Word16 *syn_Overl_TDAC_fx,
#endif
    Word16 *xn_buf_fx,
#ifdef FIX_1348_BIT_PRECISION_IMPROVEMENT_QWIN
    Word16 q_xn_buf_fx,
#endif
    const Word16 *tcx_aldo_window_1_fx,
    const PWord16 *tcx_aldo_window_1_trunc_fx,
    const PWord16 *tcx_aldo_window_2_fx,
@@ -9409,19 +9402,13 @@ void IMDCT_ivas_fx(
    const Word16 frame_cnt,
    const Word16 bfi,
    Word16 *old_out_fx,
#ifdef FIX_1348_BIT_PRECISION_IMPROVEMENT_DYNAMIC_QOLD
    Word16 *q_old_out_fx,
#endif
    const Word16 FB_flag,
    Decoder_State *st,
    const Word16 fullbandScale,
    Word16 *acelp_zir_fx,
#ifdef FIX_1348_BIT_PRECISION_IMPROVEMENT_QWIN
    Word16 *q_acelp_zir_fx,
    Word16 *pq_win );
#else
    Word16 q_win );
#endif
void v_mult16_fixed(
    const Word16 x1[], /* i  : Input vector 1                                   */
Loading