changeset 6803:05571867bf3d

video eq: - ignore case - -100..100 -> -128..128 remapping
author arpi
date Thu, 25 Jul 2002 22:18:49 +0000
parents c04345113340
children 1ac83dfb6725
files libmpcodecs/vd_divx4.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_divx4.c	Thu Jul 25 22:14:45 2002 +0000
+++ b/libmpcodecs/vd_divx4.c	Thu Jul 25 22:18:49 2002 +0000
@@ -60,12 +60,12 @@
 	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;
     }