Commit 7c55b173 authored by vaclav's avatar vaclav
Browse files

swap() -> SWAP()

parent 8e21d447
Loading
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -563,14 +563,12 @@ static ivas_error acelp_FCB_allocator_fx(
    /* TRANSITION coding: allocate highest FCBQ bit-budget to the subframe with the glottal-shape codebook */
    IF( GE_16( tc_subfr, L_SUBFR ) )
    {
        Word16 tempr;

        SWAP( fixed_cdk_index[0], fixed_cdk_index[tc_subfr / L_SUBFR] );
        SWAP( fixed_cdk_index[0], fixed_cdk_index[tc_subfr / L_SUBFR], Word16 );

        /* TRANSITION coding: allocate second highest FCBQ bit-budget to the last subframe */
        IF( LT_16( idiv1616( tc_subfr, L_SUBFR ), sub( nb_subfr, 1 ) ) )
        {
            SWAP( fixed_cdk_index[sub( tc_subfr, L_SUBFR ) / L_SUBFR], fixed_cdk_index[nb_subfr - 1] );
            SWAP( fixed_cdk_index[sub( tc_subfr, L_SUBFR ) / L_SUBFR], fixed_cdk_index[nb_subfr - 1], Word16 );
        }
    }

+6 −8
Original line number Diff line number Diff line
@@ -202,40 +202,38 @@ static void sort4_D_eigVec_fx(
    Word32 *eigVec // Q31
)
{
    Word32 tempr;

    IF( LT_32( D[0], D[1] ) )
    {
        SWAP( D[0], D[1] );
        SWAP( D[0], D[1], Word32 );
        swap_eigvec_fx( eigVec, 0, 1 );
    }

    IF( LT_32( D[2], D[3] ) )
    {
        SWAP( D[2], D[3] );
        SWAP( D[2], D[3], Word32 );
        swap_eigvec_fx( eigVec, 2, 3 );
    }

    IF( LT_32( D[0], D[2] ) )
    {
        SWAP( D[0], D[2] );
        SWAP( D[0], D[2], Word32 );
        swap_eigvec_fx( eigVec, 0, 2 );
    }

    IF( LT_32( D[1], D[3] ) )
    {
        SWAP( D[1], D[3] );
        SWAP( D[1], D[3], Word32 );
        swap_eigvec_fx( eigVec, 1, 3 );
    }

    IF( LT_32( D[1], D[2] ) )
    {
        SWAP( D[1], D[2] );
        SWAP( D[1], D[2], Word32 );
        swap_eigvec_fx( eigVec, 1, 2 );
    }

    /* swap last 2 values */
    SWAP( D[2], D[3] );
    SWAP( D[2], D[3], Word32 );
    swap_eigvec_fx( eigVec, 2, 3 );

    return;