summaryrefslogtreecommitdiffstats
path: root/dec_video.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 15:21:36 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 15:21:36 +0000
commitd59d26f1ea5250011ec3684cad7b9f7be31f41a3 (patch)
tree1a96bfba95cb7818aed019fd6b53e259cb3f3ac3 /dec_video.c
parent3640ce3005b884d0a77ce7e97f9aaddb32f2042e (diff)
downloadmpv-d59d26f1ea5250011ec3684cad7b9f7be31f41a3.tar.bz2
mpv-d59d26f1ea5250011ec3684cad7b9f7be31f41a3.tar.xz
divx4 brightness etc support patch by Adam Tla/lka
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2296 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r--dec_video.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/dec_video.c b/dec_video.c
index 6bea0a1929..fb9e4226dc 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -174,11 +174,27 @@ void set_video_quality(sh_video_t *sh_video,int quality){
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;
}