summaryrefslogtreecommitdiffstats
path: root/libvo/mga_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/mga_common.c')
-rw-r--r--libvo/mga_common.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 6981123eb8..13b73d1b45 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -100,11 +100,11 @@ draw_slice_g400(uint8_t *image[], int stride[], int w,int h,int x,int y)
dest = vid_data + bespitch * y + x;
mem2agpcpy_pic(dest, image[0], w, h, bespitch, stride[0]);
-
+
w/=2;h/=2;x/=2;y/=2;
dest = vid_data + bespitch*mga_vid_config.src_height + bespitch2 * y + x;
- dest2= dest + bespitch2*mga_vid_config.src_height / 2;
+ dest2= dest + bespitch2*mga_vid_config.src_height / 2;
if(mga_vid_config.format==MGA_VID_FORMAT_YV12){
// mga_vid's YV12 assumes Y,U,V order (insteda of Y,V,U) :(
@@ -265,7 +265,7 @@ static int control(uint32_t request, void *data, ...)
if (ioctl(f,MGA_VID_GET_LUMA,&prev)) {
perror("Error in mga_vid_config ioctl()");
- mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotGetLumaValuesFromTheKernelModule);
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotGetLumaValuesFromTheKernelModule);
return VO_FALSE;
}
@@ -274,7 +274,7 @@ static int control(uint32_t request, void *data, ...)
va_start(ap, data);
value = va_arg(ap, int);
va_end(ap);
-
+
// printf("value: %d -> ",value);
value=((value+100)*255)/200-128; // maps -100=>-128 and +100=>127
// printf("%d \n",value);
@@ -283,7 +283,7 @@ static int control(uint32_t request, void *data, ...)
luma = (prev&0xFFFF0000)|(value&0xFFFF);
else
luma = (prev&0xFFFF)|(value<<16);
-
+
if (ioctl(f,MGA_VID_SET_LUMA,luma)) {
perror("Error in mga_vid_config ioctl()");
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotSetLumaValuesFromTheKernelModule);
@@ -299,7 +299,7 @@ static int control(uint32_t request, void *data, ...)
int * value;
short val;
uint32_t luma;
-
+
if ( strcmp( data,"brightness" ) && strcmp( data,"contrast" ) ) return VO_FALSE;
if (ioctl(f,MGA_VID_GET_LUMA,&luma)) {
@@ -307,12 +307,12 @@ static int control(uint32_t request, void *data, ...)
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotGetLumaValuesFromTheKernelModule);
return VO_FALSE;
}
-
+
if ( !strcmp( data,"contrast" ) )
val=(luma & 0xFFFF);
else
val=(luma >> 16);
-
+
va_start(ap, data);
value = va_arg(ap, int*);
va_end(ap);
@@ -321,7 +321,7 @@ static int control(uint32_t request, void *data, ...)
return VO_TRUE;
}
-
+
#ifndef VO_XMGA
case VOCTRL_FULLSCREEN:
if (vo_screenwidth && vo_screenheight)
@@ -356,7 +356,7 @@ static int control(uint32_t request, void *data, ...)
{
// int old_y = vo_panscan_y;
panscan_calc();
-// if ( old_y != vo_panscan_y )
+// if ( old_y != vo_panscan_y )
set_window();
}
return VO_TRUE;
@@ -383,7 +383,7 @@ static int mga_init(int width,int height,unsigned int format){
case IMGFMT_UYVY:
mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
mga_vid_config.format=MGA_VID_FORMAT_UYVY; break;
- default:
+ default:
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format);
return -1;
}
@@ -396,7 +396,7 @@ static int mga_init(int width,int height,unsigned int format){
mga_vid_config.dest_height= height;
mga_vid_config.colkey_on=0;
-
+
mga_vid_config.num_frames=(vo_directrendering && !vo_doublebuffering)?1:3;
mga_vid_config.version=MGA_VID_VERSION;
@@ -434,7 +434,7 @@ static int mga_init(int width,int height,unsigned int format){
return -1;
}
}
-
+
mp_msg(MSGT_VO,MSGL_V,"[MGA] Using %d buffers.\n",mga_vid_config.num_frames);
frames[0] = (char*)mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,f,0);
@@ -477,10 +477,10 @@ static int preinit(const char *vo_subdevice)
mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname);
return -1;
}
-
+
// check whether the mga_vid driver has the same
// version as we expect
-
+
ioctl(f,MGA_VID_GET_VERSION,&ver);
if(MGA_VID_VERSION != ver)
{