|
|
@ -1687,7 +1687,7 @@ void MPV_frame_end(MpegEncContext *s) |
|
|
|
* @param color color of the arrow |
|
|
|
* @param color color of the arrow |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color){ |
|
|
|
static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h, int stride, int color){ |
|
|
|
int t, x, y, fr, f; |
|
|
|
int x, y, fr, f; |
|
|
|
|
|
|
|
|
|
|
|
sx= clip(sx, 0, w-1); |
|
|
|
sx= clip(sx, 0, w-1); |
|
|
|
sy= clip(sy, 0, h-1); |
|
|
|
sy= clip(sy, 0, h-1); |
|
|
@ -1698,8 +1698,8 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h |
|
|
|
|
|
|
|
|
|
|
|
if(ABS(ex - sx) > ABS(ey - sy)){ |
|
|
|
if(ABS(ex - sx) > ABS(ey - sy)){ |
|
|
|
if(sx > ex){ |
|
|
|
if(sx > ex){ |
|
|
|
t=sx; sx=ex; ex=t; |
|
|
|
SWAP(int, sx, ex); |
|
|
|
t=sy; sy=ey; ey=t; |
|
|
|
SWAP(int, sy, ey); |
|
|
|
} |
|
|
|
} |
|
|
|
buf+= sx + sy*stride; |
|
|
|
buf+= sx + sy*stride; |
|
|
|
ex-= sx; |
|
|
|
ex-= sx; |
|
|
@ -1712,8 +1712,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){ |
|
|
|
t=sx; sx=ex; ex=t; |
|
|
|
SWAP(int, sx, ex); |
|
|
|
t=sy; sy=ey; ey=t; |
|
|
|
SWAP(int, sy, ey); |
|
|
|
} |
|
|
|
} |
|
|
|
buf+= sx + sy*stride; |
|
|
|
buf+= sx + sy*stride; |
|
|
|
ey-= sy; |
|
|
|
ey-= sy; |
|
|
|