mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 05:22:23 +00:00
video eq:
- ignore case - -100..100 -> -128..128 remapping git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6804 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c473afb58e
commit
72afb2c60c
@ -60,12 +60,12 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
|
|||||||
value=va_arg(ap, int);
|
value=va_arg(ap, int);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
if(!strcmp(arg,"Brightness")) option=DEC_GAMMA_BRIGHTNESS;
|
if(!strcasecmp(arg,"Brightness")) option=DEC_GAMMA_BRIGHTNESS;
|
||||||
else if(!strcmp(arg, "Contrast")) option=DEC_GAMMA_CONTRAST;
|
else if(!strcasecmp(arg, "Contrast")) option=DEC_GAMMA_CONTRAST;
|
||||||
else if(!strcmp(arg,"Saturation")) option=DEC_GAMMA_SATURATION;
|
else if(!strcasecmp(arg,"Saturation")) option=DEC_GAMMA_SATURATION;
|
||||||
else return CONTROL_FALSE;
|
else return CONTROL_FALSE;
|
||||||
|
|
||||||
value = (value * 256) / 100 - 128;
|
value = (value * 128) / 100;
|
||||||
decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value);
|
decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value);
|
||||||
return CONTROL_OK;
|
return CONTROL_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user