Commit 8e21d447 authored by vaclav's avatar vaclav
Browse files

swap() -> SWAP()

parent c4cae994
Loading
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -9,15 +9,7 @@
#include "prot_fx.h"
#include "basop_util.h"

#ifndef swap
#define swap( x, y, type ) \
    {                      \
        type u__p;         \
        u__p = x;          \
        x = y;             \
        y = u__p;          \
    }
#endif

/*---------------------------------------------------------------------*
 * midlsf_dec()
 *
+1 −13
Original line number Diff line number Diff line
@@ -57,19 +57,7 @@
 *----------------------------------------------------------------------------------*/

#ifndef SWAP
#define SWAP( a, b )   \
    {                  \
        tempr = ( a ); \
        ( a ) = ( b ); \
        ( b ) = tempr; \
        move32();      \
        move32();      \
        move32();      \
    }
#endif

#ifndef swap
#define swap( x, y, type ) \
#define SWAP( x, y, type ) \
    {                      \
        type u__p;         \
        u__p = x;          \
+1 −9
Original line number Diff line number Diff line
@@ -10,15 +10,7 @@
#include "basop_util.h"
#include "rom_com.h"

#ifndef swap
#define swap( x, y, type ) \
    {                      \
        type u__p;         \
        u__p = x;          \
        x = y;             \
        y = u__p;          \
    }
#endif

/*---------------------------------------------------------------------*
 * lsf_msvq_ma_decprm()
 *
+4 −12
Original line number Diff line number Diff line
@@ -22,15 +22,7 @@
/********************************
 * External functions            *
 ********************************/
#ifndef swap
#define swap( x, y, type ) \
    {                      \
        type u__p;         \
        u__p = x;          \
        x = y;             \
        y = u__p;          \
    }
#endif

extern void BASOP_getTables( const PWord16 **ptwiddle, const PWord16 **sin_twiddle, Word16 *psin_step, Word16 length );

/*************************************
@@ -936,9 +928,9 @@ static void msvq_encoder( const Word16 *const cb[], /* i : Codebook (indexed cb
        cb_stage = cbp;

        /* Set up pointers to parent and current nodes */
        swap( indices[0], indices[1], Word16 * );
        swap( resid[0], resid[1], Word16 * );
        swap( dist[0], dist[1], Word32 * );
        SWAP( indices[0], indices[1], Word16 * );
        SWAP( resid[0], resid[1], Word16 * );
        SWAP( dist[0], dist[1], Word32 * );

        /* p_max points to maximum distortion node (worst of best) */
        p_max = 0;
+10 −50
Original line number Diff line number Diff line
@@ -22,15 +22,6 @@
#define kMaxC 8

#define MAXINT32 2147483647
#ifndef swap
#define swap( x, y, type ) \
    {                      \
        type u__p;         \
        u__p = x;          \
        x = y;             \
        y = u__p;          \
    }
#endif

#define depack_4_values( cbp, val0, val1, val2, val3 ) \
    val0 = shr( ( cbp )[0], 4 );                       \
@@ -760,18 +751,9 @@ void msvq_enc_fx(
        move16();

        /* Set up pointers to parent and current nodes */
        swap( indices[0], indices[1], Word16 * );
        move16();
        move16();
        move16();
        swap( resid[0], resid[1], Word16 * );
        move16();
        move16();
        move16();
        swap( dist[0], dist[1], Word32 * );
        move32();
        move32();
        move32();
        SWAP( indices[0], indices[1], Word16 * );
        SWAP( resid[0], resid[1], Word16 * );
        SWAP( dist[0], dist[1], Word32 * );

        /* p_max points to maximum distortion node (worst of best) */
        p_max = 0;
@@ -978,19 +960,9 @@ void msvq_enc_lsf_fx64(
        move16();

        /* Set up pointers to parent and current nodes */
        swap( indices[0], indices[1], Word16 * );
        move16();
        move16();
        move16();
        move16();
        swap( resid[0], resid[1], Word16 * );
        move16();
        move16();
        move16();
        swap( dist_64[0], dist_64[1], Word64 * );
        move64();
        move64();
        move64();
        SWAP( indices[0], indices[1], Word16 * );
        SWAP( resid[0], resid[1], Word16 * );
        SWAP( dist_64[0], dist_64[1], Word64 * );

        /* p_max points to maximum distortion node (worst of best) */
        p_max = 0;
@@ -1214,22 +1186,10 @@ void msvq_enc_ivas_fx(
        cb_stage = cbp;

        /* Set up pointers to parent and current nodes */
        swap( indices[0], indices[1], Word16 * );
        move16();
        move16();
        move16();
        swap( resid_fx[0], resid_fx[1], Word32 * );
        move32();
        move32();
        move32();
        swap( dist_fx[0], dist_fx[1], Word32 * );
        swap( dist_e[0], dist_e[1], Word16 * );
        move32();
        move32();
        move32();
        move16();
        move16();
        move16();
        SWAP( indices[0], indices[1], Word16 * );
        SWAP( resid_fx[0], resid_fx[1], Word32 * );
        SWAP( dist_fx[0], dist_fx[1], Word32 * );
        SWAP( dist_e[0], dist_e[1], Word16 * );

        /* p_max points to maximum distortion node (worst of best) */
        p_max = 0;
Loading