changeset 2295:d48e1d714586

divx4 brightness etc support patch by Adam Tla/lka
author arpi
date Fri, 19 Oct 2001 15:21:36 +0000
parents 9475a75dde9c
children 1d100b2d668c
files dec_video.c
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dec_video.c	Fri Oct 19 15:09:57 2001 +0000
+++ b/dec_video.c	Fri Oct 19 15:21:36 2001 +0000
@@ -174,11 +174,27 @@
 
 int set_video_colors(sh_video_t *sh_video,char *item,int value){
 #ifdef USE_DIRECTSHOW
-    if(!strcmp(sh_video->codec->name,"divxds")){
+    if(sh_video->codec->driver==VFM_DSHOW){
 	DS_SetValue_DivX(item,value);
 	return 1;
     }
 #endif
+#ifdef NEW_DECORE
+#ifdef DECORE_VERSION
+#if DECORE_VERSION >= 20011010
+    if(sh_video->codec->driver==VFM_DIVX4){
+         int option;
+         if(!strcmp(item,"Brightness")) option=DEC_GAMMA_BRIGHTNESS;
+         else if(!strcmp(item, "Contrast")) option=DEC_GAMMA_CONTRAST;
+         else if(!strcmp(item,"Saturation")) option=DEC_GAMMA_SATURATION;
+         else return 0;
+         value = (value * 256) / 100 - 128;
+         decore(0x123, DEC_OPT_GAMMA, (void *)option, (void *) value);
+         return 1;
+    }
+#endif
+#endif
+#endif
     return 0;
 }