From 1345f4ed6ce47a89b4200a7d865d6a19e99454da Mon Sep 17 00:00:00 2001
From: Diego Biurrun <diego@biurrun.de>
Date: Wed, 1 Nov 2006 21:28:36 +0000
Subject: [PATCH] Rename SWAP macro to FFSWAP.

Originally committed as revision 6865 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 libavcodec/dsicinav.c  | 2 +-
 libavcodec/mpegvideo.c | 8 ++++----
 libavformat/utils.c    | 2 +-
 libavutil/common.h     | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index 59a4345abdf..ded53c45abf 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -278,7 +278,7 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
           cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width,
           cin->avctx->width);
 
-    SWAP(uint8_t *, cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_table[CIN_PRE_BMP]);
+    FFSWAP(uint8_t *, cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_table[CIN_PRE_BMP]);
 
     *data_size = sizeof(AVFrame);
     *(AVFrame *)data = cin->frame;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 576a6b8accd..9bfb66b04c4 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1705,8 +1705,8 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h
 
     if(FFABS(ex - sx) > FFABS(ey - sy)){
         if(sx > ex){
-            SWAP(int, sx, ex);
-            SWAP(int, sy, ey);
+            FFSWAP(int, sx, ex);
+            FFSWAP(int, sy, ey);
         }
         buf+= sx + sy*stride;
         ex-= sx;
@@ -1719,8 +1719,8 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h
         }
     }else{
         if(sy > ey){
-            SWAP(int, sx, ex);
-            SWAP(int, sy, ey);
+            FFSWAP(int, sx, ex);
+            FFSWAP(int, sy, ey);
         }
         buf+= sx + sy*stride;
         ey-= sy;
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e396cf545c2..d99ecc015b3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2230,7 +2230,7 @@ static int compute_pkt_fields2(AVStream *st, AVPacket *pkt){
         for(i=1; i<delay+1 && st->pts_buffer[i] == AV_NOPTS_VALUE; i++)
             st->pts_buffer[i]= (i-delay-1) * pkt->duration;
         for(i=0; i<delay && st->pts_buffer[i] > st->pts_buffer[i+1]; i++)
-            SWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);
+            FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);
 
         pkt->dts= st->pts_buffer[0];
     }
diff --git a/libavutil/common.h b/libavutil/common.h
index 583273aed1e..babdab20643 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -198,7 +198,7 @@ typedef uint64_t      uint_fast64_t;
 #define FFMAX(a,b) ((a) > (b) ? (a) : (b))
 #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
 
-#define SWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
+#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
 
 /* misc math functions */
 extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256];
-- 
GitLab