Commit cbb5cdd1 authored by diego's avatar diego

Rename SWAP macro to FFSWAP.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6865 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 47e5cb85
...@@ -278,7 +278,7 @@ static int cinvideo_decode_frame(AVCodecContext *avctx, ...@@ -278,7 +278,7 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width, cin->bitmap_table[CIN_CUR_BMP] + y * cin->avctx->width,
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); *data_size = sizeof(AVFrame);
*(AVFrame *)data = cin->frame; *(AVFrame *)data = cin->frame;
......
...@@ -1705,8 +1705,8 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h ...@@ -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(FFABS(ex - sx) > FFABS(ey - sy)){
if(sx > ex){ if(sx > ex){
SWAP(int, sx, ex); FFSWAP(int, sx, ex);
SWAP(int, sy, ey); FFSWAP(int, sy, ey);
} }
buf+= sx + sy*stride; buf+= sx + sy*stride;
ex-= sx; 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 ...@@ -1719,8 +1719,8 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h
} }
}else{ }else{
if(sy > ey){ if(sy > ey){
SWAP(int, sx, ex); FFSWAP(int, sx, ex);
SWAP(int, sy, ey); FFSWAP(int, sy, ey);
} }
buf+= sx + sy*stride; buf+= sx + sy*stride;
ey-= sy; ey-= sy;
......
...@@ -2230,7 +2230,7 @@ static int compute_pkt_fields2(AVStream *st, AVPacket *pkt){ ...@@ -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++) for(i=1; i<delay+1 && st->pts_buffer[i] == AV_NOPTS_VALUE; i++)
st->pts_buffer[i]= (i-delay-1) * pkt->duration; st->pts_buffer[i]= (i-delay-1) * pkt->duration;
for(i=0; i<delay && st->pts_buffer[i] > st->pts_buffer[i+1]; i++) 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]; pkt->dts= st->pts_buffer[0];
} }
......
...@@ -198,7 +198,7 @@ typedef uint64_t uint_fast64_t; ...@@ -198,7 +198,7 @@ typedef uint64_t uint_fast64_t;
#define FFMAX(a,b) ((a) > (b) ? (a) : (b)) #define FFMAX(a,b) ((a) > (b) ? (a) : (b))
#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) #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 */ /* misc math functions */
extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256]; extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment