From eb43310e3e6426c764809534f91023d00e2c47f0 Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 23 Jan 2002 16:55:26 +0000 Subject: intense -> intensity + capability extension git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4319 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/drivers/mga_vid.c | 12 +++++++++--- vidix/vidix.h | 14 +++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'vidix') diff --git a/vidix/drivers/mga_vid.c b/vidix/drivers/mga_vid.c index 8effcd3f34..f7e4ae5666 100644 --- a/vidix/drivers/mga_vid.c +++ b/vidix/drivers/mga_vid.c @@ -1441,12 +1441,17 @@ int vixSetGrKeys(const vidix_grkey_t *grkey) } #ifdef MGA_EQUALIZER -static vidix_video_eq_t equal = { 0, 0, 0, 0, 0, 0, 0, 0 }; +static vidix_video_eq_t equal = +{ + VEQ_CAP_BRIGHTNESS | VEQ_CAP_CONTRAST, + 0, 0, 0, 0, 0, 0, 0, 0 }; int vixPlaybackSetEq( const vidix_video_eq_t * eq) { uint32_t beslumactl; int brightness,contrast; - memcpy(&equal,eq,sizeof(vidix_video_eq_t)); + if(eq->cap & VEQ_CAP_BRIGHTNESS) equal.brightness = eq->brightness; + if(eq->cap & VEQ_CAP_CONTRAST) equal.contrast = eq->contrast; + equal.flags = eq->flags; //Enable contrast and brightness control writel(readl(mga_mmio_base + BESGLOBCTL) & ~((1<<5) + (1<<7)),mga_mmio_base + BESGLOBCTL); brightness = (equal.brightness * 128) / 1000; @@ -1460,7 +1465,8 @@ int vixPlaybackSetEq( const vidix_video_eq_t * eq) if (is_g400) writel(beslumactl,mga_mmio_base + BESLUMACTL); else - printf("[mga] equalizer isn't supported with G200\n"); + if (mga_verbose > 1) + printf("[mga] equalizer isn't supported with G200\n"); return 0; } diff --git a/vidix/vidix.h b/vidix/vidix.h index cdc6061658..10e97cbbbf 100644 --- a/vidix/vidix.h +++ b/vidix/vidix.h @@ -183,14 +183,22 @@ extern int vixSetGrKeys( const vidix_grkey_t * ); typedef struct vidix_video_eq_s { +#define VEQ_CAP_NONE 0x00000000UL +#define VEQ_CAP_BRIGHTNESS 0x00000001UL +#define VEQ_CAP_CONTRAST 0x00000002UL +#define VEQ_CAP_SATURATION 0x00000004UL +#define VEQ_CAP_HUE 0x00000008UL +#define VEQ_CAP_RGB_INTENSITY 0x00000010UL + int cap; /* on get_eq should contain capability of equalizer + on set_eq should contain using fields */ /* end-user app can have presets like: cold-normal-hot picture and so on */ int brightness; /* -1000 : +1000 */ int contrast; /* -1000 : +1000 */ int saturation; /* -1000 : +1000 */ int hue; /* -1000 : +1000 */ - int red_intense; /* -1000 : +1000 */ - int green_intense; /* -1000 : +1000 */ - int blue_intense; /* -1000 : +1000 */ + int red_intensity; /* -1000 : +1000 */ + int green_intensity;/* -1000 : +1000 */ + int blue_intensity; /* -1000 : +1000 */ #define VEQ_FLG_ITU_R_BT_601 0x00000000 /* ITU-R BT.601 colour space (default) */ #define VEQ_FLG_ITU_R_BT_709 0x00000001 /* ITU-R BT.709 colour space */ #define VEQ_FLG_ITU_MASK 0x0000000f -- cgit v1.2.3