Revision 67eca72d

View differences:

libavcodec/mpegvideo.c
1687 1687
 * @param color color of the arrow
1688 1688
 */
1689 1689
static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color){
1690
    int t, x, y, fr, f;
1690
    int x, y, fr, f;
1691 1691

  
1692 1692
    sx= clip(sx, 0, w-1);
1693 1693
    sy= clip(sy, 0, h-1);
......
1698 1698

  
1699 1699
    if(ABS(ex - sx) > ABS(ey - sy)){
1700 1700
        if(sx > ex){
1701
            t=sx; sx=ex; ex=t;
1702
            t=sy; sy=ey; ey=t;
1701
            SWAP(int, sx, ex);
1702
            SWAP(int, sy, ey);
1703 1703
        }
1704 1704
        buf+= sx + sy*stride;
1705 1705
        ex-= sx;
......
1712 1712
        }
1713 1713
    }else{
1714 1714
        if(sy > ey){
1715
            t=sx; sx=ex; ex=t;
1716
            t=sy; sy=ey; ey=t;
1715
            SWAP(int, sx, ex);
1716
            SWAP(int, sy, ey);
1717 1717
        }
1718 1718
        buf+= sx + sy*stride;
1719 1719
        ey-= sy;
libavutil/common.h
169 169
#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
170 170
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
171 171

  
172
#define SWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
173

  
172 174
/* misc math functions */
173 175
extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256];
174 176

  

Also available in: Unified diff