Commit 93f27ef3 authored by vaillancour's avatar vaillancour
Browse files

Merge branch 'main' into basop-2248-basop-assert-in-evs-encoder

parents 1f525044 24e8bdab
Loading
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -988,7 +988,6 @@ Word32 div_w( Word32 L_num, Word32 L_den )
}


static Word32 div_w_newton( Word32 num, Word32 den );
/*
Table of 256 precalculated estimates to be used by the "div_w_newton"
function using the Newton/Raphson method.
@@ -1283,7 +1282,7 @@ static Word32 L_dmult( Word32 L_var1, Word32 L_var2 )
 * BASOP weights: 24 (incl. L_dmult)
 */

static Word32 div_w_newton( Word32 num, Word32 den )
Word32 div_w_newton( Word32 num, Word32 den )
{
    Word32 x0, x1, x2, x3, diff, result;

@@ -2969,3 +2968,21 @@ Word64 Mpy_64_32( Word64 W_var1, Word32 L_var2 )
    var_out = W_mac_32_32( W_shr( var_out, 31 ), W_extract_h( W_var1 ), L_var2 );
    return var_out;
}

#ifndef FUNCTION_W_msu0_32_32
Word64 W_msu0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 )
{
    /* no saturation */
    L64_var1 = W_sub_nosat( L64_var1, W_mult0_32_32( L_var2, L_var3 ) );
    return L64_var1;
}
#endif

#ifndef FUNCTION_W_mac0_32_32
Word64 W_mac0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 )
{
    /* no saturation */
    L64_var1 = W_add_nosat( L64_var1, W_mult0_32_32( L_var2, L_var3 ) );
    return L64_var1;
}
#endif
+10 −0
Original line number Diff line number Diff line
@@ -328,6 +328,9 @@ Word16 BASOP_Util_Divide3232_Scale( Word32 x, /*!< i : Numerator*/
                                    Word32 y,    /*!< i  : Denominator*/
                                    Word16 *s ); /*!< o  : Additional scalefactor difference*/

Word32 div_w_newton( Word32 num,   /*!< i  : Numerator*/
                     Word32 den ); /*!< i  : Denominator*/

Word32 BASOP_Util_Divide3232_Scale_newton( Word32 x,    /*!< i  : Numerator*/
                                           Word32 y,    /*!< i  : Denominator*/
                                           Word16 *s ); /*!< o  : Additional scalefactor difference*/
@@ -926,4 +929,11 @@ cmplx CL_mult_32x16( cmplx input, cmplx_s coeff );
*/
Word64 Mpy_64_32( Word64 W_var1, Word32 L_var2 );

#ifndef FUNCTION_W_msu0_32_32
Word64 W_msu0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 );
#endif
#ifndef FUNCTION_W_mac0_32_32
Word64 W_mac0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 );
#endif

#endif /* __BASOP_UTIL_H__ */
+9 −3
Original line number Diff line number Diff line
@@ -58,7 +58,13 @@ ivas_error createFdCngCom_fx(
 *
 *-------------------------------------------------------------------*/

void ivas_initFdCngCom_fx( HANDLE_FD_CNG_COM hFdCngCom, Word16 scale )
#ifdef FIX_2245_INIT_FD_CNG_EVS
void initFdCngCom(
#else
void ivas_initFdCngCom_fx(
#endif
    HANDLE_FD_CNG_COM hFdCngCom,
    Word16 scale )
{
    /* Calculate CLDFB scaling factor */
    /* shl(i_mult2(scale, scale), 3) does not fit in 16 bit */
@@ -172,7 +178,7 @@ void ivas_initFdCngCom_fx( HANDLE_FD_CNG_COM hFdCngCom, Word16 scale )
    return;
}


#ifndef FIX_2245_INIT_FD_CNG_EVS
void initFdCngCom( HANDLE_FD_CNG_COM hFdCngCom, Word16 scale )
{
    /* Calculate CLDFB scaling factor */
@@ -277,7 +283,7 @@ void initFdCngCom( HANDLE_FD_CNG_COM hFdCngCom, Word16 scale )

    return;
}

#endif
/*-------------------------------------------------------------------
 * deleteFdCngCom()
 *
+2 −1
Original line number Diff line number Diff line
@@ -1990,6 +1990,7 @@ ivas_error stereo_memory_dec_fx(
    const Word16 nchan_transport                                /* i  : number of transport channels            */
);

#ifndef FIX_2245_INIT_FD_CNG_EVS
void initFdCngDec_ivas_fx(
    DEC_CORE_HANDLE st,                                         /* i/o: decoder state structure                 */
    Word16 scale 
@@ -1998,7 +1999,7 @@ void initFdCngDec_ivas_fx(
void ivas_initFdCngCom_fx( 
    HANDLE_FD_CNG_COM hFdCngCom, Word16 scale 
);

#endif
Word16 set_ACELP_flag_IVAS(
    const Word16 element_mode,                                  /* i  : element mode                            */
    const Word32 element_brate,                                 /* i  : element bitrate                         */
+7 −4
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_1435_MOVE_STEREO_PANNING                    /* VA: issue 1435: do the EVS stereo panning in the renderer */
#define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */
#define FIX_2245_INIT_FD_CNG_EVS                        /* Dolby/VA: Issue 2245: initialize FD CNG with EVS-type of init function */
#define FIX_2248_EVS_ASSERT                             /* VA: Include _sat in an EVS related part of the code */

/* #################### End BE switches ################################## */
@@ -110,6 +111,8 @@
#define OPT_2182_MATRIX_SCALE_OPS           /* Dolby: Issue 2181, move matrix scale operations outside mul operations. */
#define OPT_2185_MATRIX_OUT_SCALING         /* Dolby: Issue 2185, optimize matrix-mul output-format. */
#define OPT_2239_IVAS_FILTER_PROCESS        /* Dolby: Issue 2239, optimize ivas_filter_process_fx. */
#define NONBE_OPT_2193_EIG2X2               /* Dolby: Issue 2193, optimize eig2x2_fx. */
#define BE_FIX_2240_COMPUTE_COV_MTC_FX_FAST /* FhG: Speeds up covariance calculation e.g. 60 WMOPS for encoding -mc 7_1_4 24400 48 */

/* #################### End BASOP optimization switches ############################ */

Loading