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 341bf60444..a40f934ee5 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -101,11 +101,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) :(
@@ -267,14 +267,14 @@ static int control(uint32_t request, void *data)
if (ioctl(f,MGA_VID_GET_LUMA,&prev)) {
perror("Error in mga_vid_config ioctl()");
- mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Could not get luma values from the kernel module!\n");
+ mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Could not get luma values from the kernel module!\n");
return VO_FALSE;
}
// printf("GET: 0x%4X 0x%4X \n",(prev>>16),(prev&0xffff));
value = args->value;
-
+
// 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_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Could not set luma values from the kernel module!\n");
@@ -298,7 +298,7 @@ static int control(uint32_t request, void *data)
short val;
uint32_t luma;
struct voctrl_get_equalizer_args *args = data;
-
+
if (strcmp(args->name, "brightness") && strcmp(args->name, "contrast"))
return VO_FALSE;
@@ -307,17 +307,17 @@ static int control(uint32_t request, void *data)
mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Could not get luma values from the kernel module!\n");
return VO_FALSE;
}
-
+
if (!strcmp(args->name, "contrast"))
val=(luma & 0xFFFF);
else
val=(luma >> 16);
-
+
*args->valueptr = (val*200)/255;
return VO_TRUE;
}
-
+
#ifndef VO_XMGA
case VOCTRL_FULLSCREEN:
if (vo_screenwidth && vo_screenheight)
@@ -352,7 +352,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;
@@ -379,7 +379,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_tmsg(MSGT_VO,MSGL_WARN, "[MGA] invalid output format %0X\n",format);
return -1;
}
@@ -392,7 +392,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;
@@ -430,7 +430,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);
@@ -473,10 +473,10 @@ static int preinit(const char *vo_subdevice)
mp_tmsg(MSGT_VO,MSGL_WARN, "[MGA] Couldn't open: %s\n",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)
{