[Mplayer-cvslog] CVS: main/vidix/drivers mga_vid.c,1.15,1.16
Zoltan Ponekker
pontscho at mplayerhq.hu
Fri Jul 19 22:51:51 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/libvo mga_common.c,1.37,1.38 video_out.c,1.52,1.53 video_out.h,1.36,1.37 vo_xmga.c,1.73,1.74 vo_xv.c,1.104,1.105 vo_xvidix.c,1.46,1.47 vosub_vidix.c,1.48,1.49
- Next message: [Mplayer-cvslog] CVS: main mplayer.c,1.527,1.528
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/vidix/drivers
In directory mail:/var/tmp.root/cvs-serv27481/vidix/drivers
Modified Files:
mga_vid.c
Log Message:
- fix audio equalizer
- rewrite video equalizer handling (i teszted with mga g400 [x]mga,xv,xvidix and radeon xv,xvidix )
- fix some small gtk bug
- i dunno, i don't remember ... :)
Index: mga_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/mga_vid.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mga_vid.c 5 Jul 2002 15:29:12 -0000 1.15
+++ mga_vid.c 19 Jul 2002 20:51:48 -0000 1.16
@@ -1437,6 +1437,8 @@
{
uint32_t luma = 0;
float factor = 256.0 / 2000;
+ static int32_t prev_br = 0;
+ static int32_t prev_c = 0;
/* contrast and brightness control isn't supported on G200 - alex */
if (!is_g400)
@@ -1444,11 +1446,11 @@
if (mga_verbose) printf("[mga] equalizer isn't supported with G200\n");
return(ENOTSUP);
}
-
- if (eq->cap & VEQ_CAP_BRIGHTNESS)
- luma += ((int)(eq->brightness * factor) << 16);
- if (eq->cap & VEQ_CAP_CONTRAST)
- luma += ((int)(eq->contrast * factor) & 0xFFFF);
+
+ if (eq->cap & VEQ_CAP_BRIGHTNESS) { prev_br=eq->brightness; if ( prev_br == 1000 ) prev_br=999; }
+ if (eq->cap & VEQ_CAP_CONTRAST) { prev_c=eq->contrast; if ( prev_c == 1000 ) prev_c=999; }
+
+ luma = ((int)(prev_br * factor) << 16) + ((int)(prev_c * factor) & 0xFFFF);
regs.beslumactl = luma+0x80;
@@ -1471,8 +1473,8 @@
regs.beslumactl = readl(mga_mmio_base + BESLUMACTL);
luma = regs.beslumactl-0x80;
- eq->brightness = (luma >> 16) * factor;
- eq->contrast = (luma & 0xFFFF) * factor;
+ eq->brightness = (signed short int)(luma >> 16) * factor;
+ eq->contrast = (signed short int)(luma & 0xFFFF) * factor;
eq->cap = VEQ_CAP_BRIGHTNESS | VEQ_CAP_CONTRAST;
return(0);
- Previous message: [Mplayer-cvslog] CVS: main/libvo mga_common.c,1.37,1.38 video_out.c,1.52,1.53 video_out.h,1.36,1.37 vo_xmga.c,1.73,1.74 vo_xv.c,1.104,1.105 vo_xvidix.c,1.46,1.47 vosub_vidix.c,1.48,1.49
- Next message: [Mplayer-cvslog] CVS: main mplayer.c,1.527,1.528
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list