Commit b940c013 authored by emerit's avatar emerit
Browse files

Merge branch 'main' into update_crend

parents 917f0587 5732e5a2
Loading
Loading
Loading
Loading
+28 −27
Original line number Diff line number Diff line
@@ -324,15 +324,15 @@ build-codec-linux-instrumented-make:
# Short test jobs 
# ---------------------------------------------------------------

ivas-pytest-mld-enc-dec:
  extends:
    - .rules-pytest-mld
    - .test-job-linux
  before_script:
    - USE_LTV=0
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-mld-anchor  
#ivas-pytest-mld-enc-dec:
#  extends:
#    - .rules-pytest-mld
#    - .test-job-linux
#  before_script:
#    - USE_LTV=0
#    - TEST_SUITE="$SHORT_TEST_SUITE"
#    - LEVEL_SCALING=1.0
#  <<: *ivas-pytest-mld-anchor  
  
ivas-pytest-mld-dec:
  extends:
@@ -345,15 +345,15 @@ ivas-pytest-mld-dec:
    - LEVEL_SCALING=1.0
  <<: *ivas-pytest-mld-anchor
  
ivas-pytest-mld-enc-dec-lev-10:
  extends:
    - .rules-pytest-mld
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-mld-anchor  
#ivas-pytest-mld-enc-dec-lev-10:
#  extends:
#    - .rules-pytest-mld
#    - .test-job-linux    
#  before_script:
#    - USE_LTV=0  
#    - TEST_SUITE="$SHORT_TEST_SUITE"
#    - LEVEL_SCALING=0.3162
#  <<: *ivas-pytest-mld-anchor  
  
ivas-pytest-mld-dec-lev-10:
  extends:
@@ -366,15 +366,15 @@ ivas-pytest-mld-dec-lev-10:
    - LEVEL_SCALING=0.3162
  <<: *ivas-pytest-mld-anchor

ivas-pytest-mld-enc-dec-lev+10:
  extends:
    - .rules-pytest-mld
    - .test-job-linux    
  before_script:
    - USE_LTV=0  
    - TEST_SUITE="$SHORT_TEST_SUITE"
    - LEVEL_SCALING=3.162
  <<: *ivas-pytest-mld-anchor  
#ivas-pytest-mld-enc-dec-lev+10:
#  extends:
#    - .rules-pytest-mld
#    - .test-job-linux    
#  before_script:
#    - USE_LTV=0  
#    - TEST_SUITE="$SHORT_TEST_SUITE"
#    - LEVEL_SCALING=3.162
#  <<: *ivas-pytest-mld-anchor  
  
ivas-pytest-mld-dec-lev+10:
  extends:
@@ -560,6 +560,7 @@ be-2-evs-26444:
    - .test-job-linux
  rules:
    - if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == "evs-26444"
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
  tags:
    - be-2-evs-basop
  stage: test
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ Word32 expfp( /* o: Q31 */
 * Returns: *pout1 = ( (base/65536)^(2*exp - 1) ) * 65536
 *          *pout2 = ( (base/65536)^(2*exp + 1) ) * 65536
 *
 * NOTE: This function must be in sync with ari_decode_14bits_pow() */
 * NOTE: This function must be in sync with ari_decode_14bits_pow_fx() */
void powfp_odd2(
    const  Word16 base,     /* Q15 */
    const Word16 exp,      /* Q0  */
+1 −0
Original line number Diff line number Diff line
@@ -239,6 +239,7 @@ Word32 L_abs( Word32 L_var1 ); /*
Word32 DEPR_L_sat_co( Word32 L_var1, Flag Overflow, Flag Carry );            /* Long saturation,       4  */
Word16 norm_s( Word16 var1 );                                                /* Short norm,            1  */
Word16 div_s( Word16 var1, Word16 var2 );                                    /* Short division,       18  */
Word32 div_w(Word32 L_num, Word32 L_den);
Word16 norm_l( Word32 L_var1 );                                              /* Long norm,             1  */
#endif                                    /* BASOP_NOGLOB */

+98 −0
Original line number Diff line number Diff line
@@ -933,6 +933,104 @@ Word16 BASOP_Util_Divide3232_uu_1616_Scale(Word32 x, Word32 y, Word16 *s)
  return (z);
}

Word32 div_w( Word32 L_num, Word32 L_den )
{
    Word32 L_var_out = (Word32) 0;
    Word16 iteration;


    if ( L_den == (Word32) 0 )
    {
        /* printf("Division by 0 in div_l, Fatal error in "); printStack(); */
        return ( 0 );
    }

    if ( ( L_num < (Word32) 0 ) || ( L_den < (Word32) 0 ) )
    {
        /* printf("Division Error in div_l, Fatal error in "); printStack(); */
        return ( 0 );
    }
    Word64 W_num, W_den;
    W_num = W_deposit32_h( L_num );
    W_den = W_deposit32_h( L_den );

    if ( W_num >= W_den )
    {
        return MAX_32;
    }
    else
    {
        W_num = W_shr( W_num, (Word16) 1 );
        W_den = W_shr( W_den, (Word16) 1 );

        for ( iteration = (Word16) 0; iteration < (Word16) 31; iteration++ )
        {
            L_var_out = L_shl( L_var_out, (Word16) 1 );
            W_num = W_shl( W_num, (Word16) 1 );

            if ( W_num >= W_den )
            {
                W_num = W_sub( W_num, W_den );
                L_var_out = L_add( L_var_out, (Word32) 1 );
            }
        }

        return L_var_out;
    }
}

Word32 BASOP_Util_Divide3232_Scale_cadence( Word32 x, Word32 y, Word16 *s )
{
    Word32 z;
    Word16 sx;
    Word16 sy;
    Word32 sign;

    /* assert (x >= (Word32)0); */
    assert( y != (Word32) 0 );

    sign = 0;
    move16();

    IF( x < 0 )
    {
        x = L_negate( x );
        sign = L_xor( sign, 1 );
    }

    IF( y < 0 )
    {
        y = L_negate( y );
        sign = L_xor( sign, 1 );
    }

    IF( x == (Word32) 0 )
    {
        *s = 0;
        return ( (Word32) 0 );
    }

    sx = norm_l( x );
    x = L_shl( x, sx );
    x = L_shr( x, 1 );
    move16();
    *s = sub( 1, sx );

    sy = norm_l( y );
    y = L_shl( y, sy );
    move16();
    *s = add( *s, sy );

    z = div_w( x, y );

    if ( sign != 0 )
    {
        z = L_negate( z );
    }

    return z;
}

Word16 BASOP_Util_Divide3232_Scale(Word32 x, Word32 y, Word16 *s)
{
  Word16 z;
+4 −0
Original line number Diff line number Diff line
@@ -325,6 +325,10 @@ Word16 BASOP_Util_Divide3232_Scale(Word32 x, /*!< i : Numerator*/
  Word32 y,   /*!< i  : Denominator*/
  Word16 *s); /*!< o  : Additional scalefactor difference*/

Word32 BASOP_Util_Divide3232_Scale_cadence(Word32 x,   /*!< i  : Numerator*/
  Word32 y,   /*!< i  : Denominator*/
  Word16 *s); /*!< o  : Additional scalefactor difference*/


/************************************************************************/
/*!
Loading