From 72afb2c60cc7cf1529b0e41d12569173de0a80a8 Mon Sep 17 00:00:00 2001 From: arpi Date: Thu, 25 Jul 2002 22:18:49 +0000 Subject: [PATCH] video eq: - ignore case - -100..100 -> -128..128 remapping git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6804 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_divx4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libmpcodecs/vd_divx4.c b/libmpcodecs/vd_divx4.c index b0023000b8..c775bc3765 100644 --- a/libmpcodecs/vd_divx4.c +++ b/libmpcodecs/vd_divx4.c @@ -60,12 +60,12 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ value=va_arg(ap, int); va_end(ap); - if(!strcmp(arg,"Brightness")) option=DEC_GAMMA_BRIGHTNESS; - else if(!strcmp(arg, "Contrast")) option=DEC_GAMMA_CONTRAST; - else if(!strcmp(arg,"Saturation")) option=DEC_GAMMA_SATURATION; + if(!strcasecmp(arg,"Brightness")) option=DEC_GAMMA_BRIGHTNESS; + else if(!strcasecmp(arg, "Contrast")) option=DEC_GAMMA_CONTRAST; + else if(!strcasecmp(arg,"Saturation")) option=DEC_GAMMA_SATURATION; else return CONTROL_FALSE; - value = (value * 256) / 100 - 128; + value = (value * 128) / 100; decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value); return CONTROL_OK; }