summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_out/video_out_fb.c70
-rw-r--r--src/video_out/video_out_opengl.c13
-rw-r--r--src/video_out/video_out_pgx64.c20
-rw-r--r--src/video_out/video_out_xshm.c13
4 files changed, 57 insertions, 59 deletions
diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c
index a7ce8f8e1..70d59bf21 100644
--- a/src/video_out/video_out_fb.c
+++ b/src/video_out/video_out_fb.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_fb.c,v 1.41 2005/08/28 01:11:21 dsalt Exp $
+ * $Id: video_out_fb.c,v 1.42 2005/09/05 14:56:31 mshopf Exp $
*
* video_out_fb.c, frame buffer xine driver by Miguel Freitas
*
@@ -127,6 +127,8 @@ typedef struct fb_driver_s
int yuv2rgb_mode;
int yuv2rgb_swap;
int yuv2rgb_brightness;
+ int yuv2rgb_contrast;
+ int yuv2rgb_saturation;
uint8_t *yuv2rgb_cmap;
yuv2rgb_factory_t *yuv2rgb_factory;
@@ -632,6 +634,10 @@ static int fb_get_property(vo_driver_t *this_gen, int property)
case VO_PROP_BRIGHTNESS:
return this->yuv2rgb_brightness;
+ case VO_PROP_CONTRAST:
+ return this->yuv2rgb_contrast;
+ case VO_PROP_saturation:
+ return this->yuv2rgb_saturation;
case VO_PROP_WINDOW_WIDTH:
return this->sc.gui_width;
@@ -663,9 +669,26 @@ static int fb_set_property(vo_driver_t *this_gen, int property, int value)
case VO_PROP_BRIGHTNESS:
this->yuv2rgb_brightness = value;
- this->yuv2rgb_factory->
- set_csc_levels(this->yuv2rgb_factory, value, 128, 128);
- xprintf(this->xine, XINE_VERBOSITY_DEBUG, "video_out_fb: brightness changed to %d\n", value);
+ this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory,
+ this->yuv2rgb_brightness,
+ this->yuv2rgb_contrast,
+ this->yuv2rgb_saturation);
+ break;
+
+ case VO_PROP_CONTRAST:
+ this->yuv2rgb_contrast = value;
+ this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory,
+ this->yuv2rgb_brightness,
+ this->yuv2rgb_contrast,
+ this->yuv2rgb_saturation);
+ break;
+
+ case VO_PROP_SATURATION:
+ this->yuv2rgb_saturation = value;
+ this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory,
+ this->yuv2rgb_brightness,
+ this->yuv2rgb_contrast,
+ this->yuv2rgb_saturation);
break;
default:
@@ -680,16 +703,21 @@ static void fb_get_property_min_max(vo_driver_t *this_gen,
int property, int *min, int *max)
{
/* fb_driver_t *this = (fb_driver_t *) this_gen; */
-
- if(property == VO_PROP_BRIGHTNESS)
- {
- *min = -100;
- *max = +100;
- }
- else
- {
+
+ switch (property) {
+ case VO_PROP_BRIGHTNESS:
+ *min = -128;
+ *max = +127;
+ break;
+ case VO_PROP_CONTRAST:
+ case VO_PROP_SATURATION:
+ *min = 0;
+ *max = 255;
+ break;
+ default:
*min = 0;
*max = 0;
+ break;
}
}
@@ -906,21 +934,17 @@ static int setup_yuv2rgb(fb_driver_t *this, config_values_t *config,
if(!this->yuv2rgb_mode)
return 0;
- this->yuv2rgb_swap = 0;
- this->yuv2rgb_brightness =
- config->register_range(config, "video.output.fb_gamma", 0,
- -100, 100,
- _("brightness correction"),
- _("The brightness correction can be used to lighten or darken the image. "
- "It changes the blacklevel without modifying the contrast, but it "
- "limits the tonal range."),
- 0, NULL, NULL);
+ this->yuv2rgb_swap = 0;
+ this->yuv2rgb_brightness = 0;
+ this->yuv2rgb_contrast = this->yuv2rgb_saturation = 128;
this->yuv2rgb_factory = yuv2rgb_factory_init(this->yuv2rgb_mode,
this->yuv2rgb_swap,
this->yuv2rgb_cmap);
- this->yuv2rgb_factory->set_csc_levels(this->yuv2rgb_factory,
- this->yuv2rgb_brightness, 128, 128);
+ this->yuv2rgb_factory->set_csc_levels (this->yuv2rgb_factory,
+ this->yuv2rgb_brightness,
+ this->yuv2rgb_contrast,
+ this->yuv2rgb_saturation);
return 1;
}
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c
index caf7c570b..d1f78633b 100644
--- a/src/video_out/video_out_opengl.c
+++ b/src/video_out/video_out_opengl.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_opengl.c,v 1.51 2005/07/05 11:10:31 mshopf Exp $
+ * $Id: video_out_opengl.c,v 1.52 2005/09/05 14:56:31 mshopf Exp $
*
* video_out_opengl.c, OpenGL based interface for xine
*
@@ -1858,15 +1858,8 @@ static vo_driver_t *opengl_open_plugin (video_driver_class_t *class_gen, const v
this->vo_driver.dispose = opengl_dispose;
this->vo_driver.redraw_needed = opengl_redraw_needed;
- this->yuv2rgb_brightness = config->register_range (config, "video.output.opengl_gamma", 0,
- -128, 127,
- _("brightness correction"),
- _("The brightness correction can be used to "
- "lighten or darken the image. It changes the "
- "blacklevel without modifying the contrast, "
- "but it limits the tonal range."),
- 0, NULL, NULL);
- this->yuv2rgb_contrast = 128;
+ this->yuv2rgb_brightness = 0;
+ this->yuv2rgb_contrast = 128;
this->yuv2rgb_saturation = 128;
this->yuv2rgb_factory = yuv2rgb_factory_init (YUV_FORMAT, YUV_SWAP_MODE,
diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c
index 1900cb5db..b1f590c84 100644
--- a/src/video_out/video_out_pgx64.c
+++ b/src/video_out/video_out_pgx64.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_pgx64.c,v 1.72 2004/12/12 22:01:27 mroi Exp $
+ * $Id: video_out_pgx64.c,v 1.73 2005/09/05 14:56:31 mshopf Exp $
*
* video_out_pgx64.c, Sun XVR100/PGX64/PGX24 output plugin for xine
*
@@ -1322,13 +1322,7 @@ static void pgx64_config_changed(void *user_data, xine_cfg_entry_t *entry)
pgx64_set_property(this_gen, VO_PROP_COLORKEY, entry->num_value);
update_colour_key_rgb(this);
}
- else if (strcmp(entry->key, "video.output.pgx64_brightness") == 0) {
- pgx64_set_property(this_gen, VO_PROP_BRIGHTNESS, entry->num_value);
- }
- else if (strcmp(entry->key, "video.output.pgx64_saturation") == 0) {
- pgx64_set_property(this_gen, VO_PROP_SATURATION, entry->num_value);
- }
- else if (strcmp(entry->key, "") == 0) {
+ else if (strcmp(entry->key, "video.device.pgx64_chromakey_en") == 0) {
this->chromakey_en = entry->num_value;
}
else if (strcmp(entry->key, "video.device.pgx64_multibuf_en") == 0) {
@@ -1470,14 +1464,8 @@ static vo_driver_t *pgx64_init_driver(video_driver_class_t *class_gen, const voi
"Try using different values if you see the video showing through other windows."),
20, pgx64_config_changed, this);
update_colour_key_rgb(this);
- this->brightness = class->config->register_range(this->class->config, "video.output.pgx64_brightness", 0, -64, 63,
- _("video brightness"),
- _("The brightness of the video image."),
- 10, pgx64_config_changed, this);
- this->saturation = class->config->register_range(this->class->config, "video.output.pgx64_saturation", 16, 0, 31,
- _("video saturation"),
- _("The saturation of the video image."),
- 10, pgx64_config_changed, this);
+ this->brightness = 0;
+ this->saturation = 16;
this->chromakey_en = class->config->register_bool(this->class->config, "video.device.pgx64_chromakey_en", 0,
_("enable chroma keying"),
_("Draw OSD graphics on top of the overlay colour key rather than blend them into each frame."),
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 35efb7107..bb8e8a8b3 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xshm.c,v 1.138 2004/12/12 22:01:29 mroi Exp $
+ * $Id: video_out_xshm.c,v 1.139 2005/09/05 14:56:31 mshopf Exp $
*
* video_out_xshm.c, X11 shared memory extension interface for xine
*
@@ -1236,15 +1236,8 @@ static vo_driver_t *xshm_open_plugin (video_driver_class_t *class_gen, const voi
this->yuv2rgb_mode = mode;
this->yuv2rgb_swap = swapped;
- this->yuv2rgb_brightness = config->register_range (config, "video.output.xshm_gamma", 0,
- -128, 127,
- _("brightness correction"),
- _("The brightness correction can be used to "
- "lighten or darken the image. It changes the "
- "blacklevel without modifying the contrast, "
- "but it limits the tonal range."),
- 0, NULL, NULL);
- this->yuv2rgb_contrast = 128;
+ this->yuv2rgb_brightness = 0
+ this->yuv2rgb_contrast = 128;
this->yuv2rgb_saturation = 128;
this->yuv2rgb_factory = yuv2rgb_factory_init (mode, swapped,