mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 20:03:10 +02:00
intense -> intensity + capability extension
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4319 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d125461d6a
commit
eb43310e3e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user