diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-18 09:11:11 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-18 09:11:11 +0000 |
commit | 555c6766839e256aebd2ad27307c74947abe0823 (patch) | |
tree | 977d2153ce201a6a745d8bbf0dab6feee544bb3f /libvo | |
parent | 6a8715f9b95a30b213f34792521b9e5386316825 (diff) | |
download | mpv-555c6766839e256aebd2ad27307c74947abe0823.tar.bz2 mpv-555c6766839e256aebd2ad27307c74947abe0823.tar.xz |
gamma correction support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4230 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/video_out.c | 11 | ||||
-rw-r--r-- | libvo/vosub_vidix.c | 36 |
2 files changed, 46 insertions, 1 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c index df4d773f9c..1e2eac5b13 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -47,7 +47,16 @@ int vo_pts=0; // for hw decoding float vo_fps=0; // for mp1e rte char *vo_subdevice = NULL; - +/**************************************** +* GAMMA CORRECTION * +****************************************/ +int vo_gamma_brightness=0; +int vo_gamma_saturation=0; +int vo_gamma_contrast=0; +int vo_gamma_hue=0; +int vo_gamma_red_intense=0; +int vo_gamma_green_intense=0; +int vo_gamma_blue_intense=0; // // Externally visible list of all vo drivers // diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c index db937ae99c..8cde3748f3 100644 --- a/libvo/vosub_vidix.c +++ b/libvo/vosub_vidix.c @@ -154,15 +154,51 @@ int vidix_init(unsigned src_width,unsigned src_height, return 0; } +extern int vo_gamma_brightness; +extern int vo_gamma_saturation; +extern int vo_gamma_contrast; +extern int vo_gamma_hue; +extern int vo_gamma_red_intense; +extern int vo_gamma_green_intense; +extern int vo_gamma_blue_intense; + +vidix_video_eq_t vid_eq; + void vidix_start(void) { int err; + if(verbose > 1) + { + printf("vosub_vidix: vo_gamma_brightness=%i\n" + "vosub_vidix: vo_gamma_saturation=%i\n" + "vosub_vidix: vo_gamma_contrast=%i\n" + "vosub_vidix: vo_gamma_hue=%i\n" + "vosub_vidix: vo_gamma_red_intense=%i\n" + "vosub_vidix: vo_gamma_green_intense=%i\n" + "vosub_vidix: vo_gamma_blue_intense=%i\n" + ,vo_gamma_brightness + ,vo_gamma_saturation + ,vo_gamma_contrast + ,vo_gamma_hue + ,vo_gamma_red_intense + ,vo_gamma_green_intense + ,vo_gamma_blue_intense); + } if((err=vdlPlaybackOn(vidix_handler))!=0) { printf("vosub_vidix: Can't start playback: %s\n",strerror(err)); return -1; } + vid_eq.brightness = vo_gamma_brightness; + vid_eq.saturation = vo_gamma_saturation; + vid_eq.contrast = vo_gamma_contrast; + vid_eq.hue = vo_gamma_hue; + vid_eq.red_intense = vo_gamma_red_intense; + vid_eq.green_intense = vo_gamma_green_intense; + vid_eq.blue_intense = vo_gamma_blue_intense; + vid_eq.flags = VEQ_FLG_ITU_R_BT_601; + vdlPlaybackSetEq(vidix_handler,&vid_eq); return 0; } |