# HG changeset patch # User diego # Date 1284713976 0 # Node ID 5c91b872759157bd93c259744984f3551831f2c9 # Parent ed12c6f6abd86be836302731f95329034668095c Replace local min/max macros by FFMIN/FFMAX. diff -r ed12c6f6abd8 -r 5c91b8727591 libvo/vo_directfb2.c --- a/libvo/vo_directfb2.c Fri Sep 17 08:18:47 2010 +0000 +++ b/libvo/vo_directfb2.c Fri Sep 17 08:59:36 2010 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include #include "config.h" #include "video_out.h" @@ -38,10 +39,6 @@ #include "subopt-helper.h" #include "mp_fifo.h" -#ifndef min -#define min(x,y) (((x)<(y))?(x):(y)) -#endif - // triple buffering #define TRIPLE 1 @@ -1185,7 +1182,7 @@ primarylocked = 1; }; - p=min(w,pitch); + p = FFMIN(w, pitch); dst += y*pitch + x; dst2 = dst + pitch*height - y*pitch + y*pitch/4 - x/2; @@ -1281,7 +1278,7 @@ primarylocked = 1; }; - p=min(mpi->w,pitch); + p = FFMIN(mpi->w, pitch); src = mpi->planes[0]+mpi->y*mpi->stride[0]+mpi->x; diff -r ed12c6f6abd8 -r 5c91b8727591 libvo/vo_vesa.c --- a/libvo/vo_vesa.c Fri Sep 17 08:18:47 2010 +0000 +++ b/libvo/vo_vesa.c Fri Sep 17 08:59:36 2010 +0000 @@ -42,7 +42,7 @@ #include #include #include - +#include #include #include "video_out.h" @@ -65,13 +65,6 @@ #define MAX_BUFFERS 3 -#ifndef max -#define max(a,b) ((a)>(b)?(a):(b)) -#endif -#ifndef min -#define min(a,b) ((a)<(b)?(a):(b)) -#endif - #define UNUSED(x) ((void)(x)) /**< Removes warning about unused arguments */ static const vo_info_t info = @@ -238,7 +231,7 @@ while(size) { if(!VALID_WIN_FRAME(offset)) vbeSwitchBank(offset); - delta = min(size,win.high - offset); + delta = FFMIN(size, win.high - offset); fast_memcpy(VIDEO_PTR(offset),&image[src_idx],delta); src_idx += delta; offset += delta; @@ -547,7 +540,7 @@ mp_msg(MSGT_VO,MSGL_V, "vo_vesa: Can use up to %u video buffers\n",total); i = 0; offset = 0; - total = min(total,nbuffs); + total = FFMIN(total, nbuffs); while(i < total) { multi_buff[i++] = offset; offset += screen_size; } if(!i) mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_VESA_YouHaveTooLittleVideoMemory, screen_size, vsize); @@ -738,9 +731,9 @@ dstH = d_height; } if(vo_screenwidth) w = vo_screenwidth; - else w = max(dstW,width); + else w = FFMAX(dstW, width); if(vo_screenheight) h = vo_screenheight; - else h = max(dstH,height); + else h = FFMAX(dstH, height); for(i=0;i < num_modes;i++) { if((err=vbeGetModeInfo(mode_ptr[i],&vmib)) != VBE_OK)