[MPlayer-cvslog] r32282 - in trunk/libvo: vo_directfb2.c vo_vesa.c
diego
subversion at mplayerhq.hu
Fri Sep 17 10:59:36 CEST 2010
Author: diego
Date: Fri Sep 17 10:59:36 2010
New Revision: 32282
Log:
Replace local min/max macros by FFMIN/FFMAX.
Modified:
trunk/libvo/vo_directfb2.c
trunk/libvo/vo_vesa.c
Modified: trunk/libvo/vo_directfb2.c
==============================================================================
--- trunk/libvo/vo_directfb2.c Fri Sep 17 10:18:47 2010 (r32281)
+++ trunk/libvo/vo_directfb2.c Fri Sep 17 10:59:36 2010 (r32282)
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <libavutil/common.h>
#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 @@ static int draw_slice(uint8_t *src[], in
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 @@ static uint32_t put_image(mp_image_t *mp
primarylocked = 1;
};
- p=min(mpi->w,pitch);
+ p = FFMIN(mpi->w, pitch);
src = mpi->planes[0]+mpi->y*mpi->stride[0]+mpi->x;
Modified: trunk/libvo/vo_vesa.c
==============================================================================
--- trunk/libvo/vo_vesa.c Fri Sep 17 10:18:47 2010 (r32281)
+++ trunk/libvo/vo_vesa.c Fri Sep 17 10:59:36 2010 (r32282)
@@ -42,7 +42,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-
+#include <libavutil/common.h>
#include <vbe.h>
#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 @@ static void vbeCopyBlock(unsigned long o
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 @@ unsigned fillMultiBuffer( unsigned long
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 @@ config(uint32_t width, uint32_t height,
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)
More information about the MPlayer-cvslog
mailing list