summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--config.c6
-rw-r--r--config.h4
-rwxr-xr-xconfigure7
-rw-r--r--device.c10
-rw-r--r--device.h6
-rw-r--r--frontend.c11
-rw-r--r--frontend.h4
-rw-r--r--menu.c17
-rw-r--r--po/cs_CZ.po10
-rw-r--r--po/de_DE.po10
-rw-r--r--po/fi_FI.po12
-rw-r--r--po/it_IT.po10
-rw-r--r--po/ru_RU.po10
-rw-r--r--setup_menu.c34
-rw-r--r--xine_input_vdr.c35
16 files changed, 139 insertions, 48 deletions
diff --git a/HISTORY b/HISTORY
index b87257ce..21a7f889 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3,6 +3,7 @@ VDR Plugin 'xineliboutput' Revision History
????-??-??: Version 1.1.0
+- Added sharpness and noise reduction setup options for VDPAU.
- Added '-C'/'--config' command-line option to specify xine's configuration file.
- Replaced cIConv with VDR's cCharConv.
- Supports only for vdr-1.6.0 or later.
diff --git a/config.c b/config.c
index f60ba69f..61e7f651 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c,v 1.76 2008-12-19 16:01:54 rofafor Exp $
+ * $Id: config.c,v 1.77 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -568,6 +568,8 @@ config_t::config_t() {
saturation = -1;
contrast = -1;
brightness = -1;
+ sharpness = -1;
+ noise_reduction = -1;
vo_aspect_ratio = 0;
live_mode_sync = 1; // Sync SCR to transponder clock in live mode
@@ -802,6 +804,8 @@ bool config_t::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Video.Saturation")) saturation = atoi(Value);
else if (!strcasecmp(Name, "Video.Contrast")) contrast = atoi(Value);
else if (!strcasecmp(Name, "Video.Brightness")) brightness = atoi(Value);
+ else if (!strcasecmp(Name, "Video.Sharpness")) sharpness = atoi(Value);
+ else if (!strcasecmp(Name, "Video.NoiseReduction")) noise_reduction = atoi(Value);
else if (!strcasecmp(Name, "Video.Overscan")) overscan = atoi(Value);
else if (!strcasecmp(Name, "Video.IBPTrickSpeed")) ibp_trickspeed = atoi(Value);
else if (!strcasecmp(Name, "Video.MaxTrickSpeed")) max_trickspeed = atoi(Value);
diff --git a/config.h b/config.h
index dd2c3fdb..e961383b 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h,v 1.58 2008-12-19 16:01:55 rofafor Exp $
+ * $Id: config.h,v 1.59 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -276,6 +276,8 @@ class config_t {
int saturation; // 0...0xffff, -1 == off
int contrast; // 0...0xffff, -1 == off
int brightness; // 0...0xffff, -1 == off
+ int sharpness; // 0...0xffff, -1 == off
+ int noise_reduction; // 0...0xffff, -1 == off
int vo_aspect_ratio;
// OSD settings
diff --git a/configure b/configure
index 82a903d5..d09773de 100755
--- a/configure
+++ b/configure
@@ -7,7 +7,7 @@
# See the main source file 'xineliboutput.c' for copyright information and
# how to reach the author.
#
-# * $Id: configure,v 1.12 2008-11-18 00:04:06 phintuka Exp $
+# * $Id: configure,v 1.13 2009-01-08 11:58:33 rofafor Exp $
#
PKG_CONFIG="pkg-config"
@@ -230,6 +230,7 @@ FEATURES="
xinerama
xrandr
xrender
+ vdpau
"
# set defaults
@@ -261,6 +262,7 @@ show_help(){
echo " --disable-xinerama disable Xinerama support [no]"
echo " --disable-xrandr disable Xrandr support (video mode switching) [no]"
echo " --disable-xrender disable Xrender support (HUD OSD) [no]"
+ echo " --disable-vdpau disable VDPAU support (X11) [no]"
echo
echo " --debug debug configure script"
echo " --disable-pkgconfig do not use pkg-config"
@@ -314,7 +316,7 @@ done
check_deps(){
disabled libxine && disable x11 fb libavutil libjpeg
- disabled x11 && disable xshm xrender xrandr xdpms xinerama
+ disabled x11 && disable xshm xrender xrandr xdpms xinerama vdpau
disabled vdr && disable libextractor
}
@@ -353,6 +355,7 @@ if enabled libxine; then
test_library X11 xrandr "X11/extensions/Xrandr.h" "-lXrandr" "XRRGetScreenInfo(0,0)"
test_library X11 xdpms "X11/extensions/dpms.h" "-lXext" "DPMSDisable(0)"
test_library X11 xinerama "X11/extensions/Xinerama.h" "-lXinerama" "XineramaQueryScreens(0,0)"
+ test_library X11 vdpau "vdpau/vdpau_x11.h" "-lvdpau" "vdp_device_create_x11(0,0,0,0)"
fi
fi
diff --git a/device.c b/device.c
index 2a5534dd..bca0168e 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c,v 1.63 2008-11-20 11:46:30 rofafor Exp $
+ * $Id: device.c,v 1.64 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -436,15 +436,15 @@ void cXinelibDevice::ConfigurePostprocessing(const char *name, bool on,
m_server->ConfigurePostprocessing(name, on, args);
}
-void cXinelibDevice::ConfigureVideo(int hue, int saturation, int brightness, int contrast,
- int overscan, int vo_aspect_ratio)
+void cXinelibDevice::ConfigureVideo(int hue, int saturation, int brightness, int sharpness,
+ int noise_reduction, int contrast, int overscan, int vo_aspect_ratio)
{
TRACEF("cXinelibDevice::ConfigureVideo");
if(m_local)
- m_local->ConfigureVideo(hue, saturation, brightness, contrast, overscan, vo_aspect_ratio);
+ m_local->ConfigureVideo(hue, saturation, brightness, sharpness, noise_reduction, contrast, overscan, vo_aspect_ratio);
if(m_server)
- m_server->ConfigureVideo(hue, saturation, brightness, contrast, overscan, vo_aspect_ratio);
+ m_server->ConfigureVideo(hue, saturation, brightness, sharpness, noise_reduction, contrast, overscan, vo_aspect_ratio);
}
void cXinelibDevice::ConfigureDecoder(int pes_buffers)
diff --git a/device.h b/device.h
index 370f6815..26c8050f 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h,v 1.38 2008-11-20 11:46:30 rofafor Exp $
+ * $Id: device.h,v 1.39 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -198,8 +198,8 @@ class cXinelibDevice : public cDevice
int speaker_type);
void ConfigurePostprocessing(const char *name, bool on=true,
const char *args=NULL);
- void ConfigureVideo(int hue, int saturation, int brightness, int contrast,
- int overscan, int vo_aspect_ratio);
+ void ConfigureVideo(int hue, int saturation, int brightness, int sharpness,
+ int noise_reduction, int contrast, int overscan, int vo_aspect_ratio);
// local mode:
void ConfigureWindow(int fullscreen, int width, int height,
int modeswitch, const char *modeline,
diff --git a/frontend.c b/frontend.c
index 0604e993..690e2f66 100644
--- a/frontend.c
+++ b/frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend.c,v 1.65 2008-11-20 11:46:30 rofafor Exp $
+ * $Id: frontend.c,v 1.66 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -781,7 +781,7 @@ void cXinelibThread::Configure(void)
ConfigurePostprocessing(xc.deinterlace_method, xc.audio_delay,
xc.audio_compression, xc.audio_equalizer,
xc.audio_surround, xc.speaker_type);
- ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.contrast, xc.overscan, xc.vo_aspect_ratio);
+ ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness, xc.noise_reduction, xc.contrast, xc.overscan, xc.vo_aspect_ratio);
ConfigurePostprocessing("upmix", xc.audio_upmix ? true : false, NULL);
ConfigurePostprocessing("autocrop", xc.autocrop ? true : false,
xc.AutocropOptions());
@@ -870,14 +870,15 @@ int cXinelibThread::ConfigurePostprocessing(const char *name, bool on, const cha
}
int cXinelibThread::ConfigureVideo(int hue, int saturation,
- int brightness, int contrast,
+ int brightness, int sharpness,
+ int noise_reduction, int contrast,
int overscan, int vo_aspect_ratio)
{
char cmd[128];
Xine_Control("OVERSCAN", overscan);
snprintf(cmd, sizeof(cmd),
- "VIDEO_PROPERTIES %d %d %d %d %d",
- hue, saturation, brightness, contrast, vo_aspect_ratio);
+ "VIDEO_PROPERTIES %d %d %d %d %d %d %d",
+ hue, saturation, brightness, sharpness, noise_reduction, contrast, vo_aspect_ratio);
return Xine_Control(cmd);
}
diff --git a/frontend.h b/frontend.h
index 0d3c8fc9..08702e92 100644
--- a/frontend.h
+++ b/frontend.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend.h,v 1.25 2008-11-20 11:46:31 rofafor Exp $
+ * $Id: frontend.h,v 1.26 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -119,7 +119,7 @@ class cXinelibThread : public cThread, public cListObject
int speaker_type);
virtual int ConfigurePostprocessing(const char *name, bool on, const char *args);
virtual int ConfigureVideo(int hue, int saturation,
- int brightness, int contrast,
+ int brightness, int sharpness, int noise_reduction, int contrast,
int overscan, int vo_aspect_ratio);
// Local frontend:
virtual void ConfigureWindow(int fullscreen, int width, int height,
diff --git a/menu.c b/menu.c
index 25ebe5a5..71f7e70b 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c,v 1.60 2008-11-20 11:46:31 rofafor Exp $
+ * $Id: menu.c,v 1.61 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -549,8 +549,9 @@ cMenuXinelib::~cMenuXinelib()
xc.audio_surround, xc.speaker_type);
if(xc.overscan != overscan)
- cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness,
- xc.contrast, xc.overscan, xc.vo_aspect_ratio);
+ cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness,
+ xc.noise_reduction, xc.contrast, xc.overscan,
+ xc.vo_aspect_ratio);
if(xc.headphone != headphone)
cXinelibDevice::Instance().ConfigurePostprocessing("headphone",
@@ -627,8 +628,9 @@ eOSState cMenuXinelib::ProcessKey(eKeys Key)
compression, xc.audio_equalizer,
xc.audio_surround, xc.speaker_type);
else if(item == ctrl_overscan)
- cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness,
- xc.contrast, overscan, xc.vo_aspect_ratio);
+ cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness,
+ xc.noise_reduction, xc.contrast, overscan,
+ xc.vo_aspect_ratio);
}
if(Key==kLeft || Key==kRight) {
if(item == ctrl_headphone)
@@ -738,8 +740,9 @@ eOSState cMenuXinelib::ProcessHotkey(eKeys Key)
/* auto, square, 4:3, anamorphic or DVB */
if(!OnlyInfo) {
xc.vo_aspect_ratio = (xc.vo_aspect_ratio < VO_ASPECT_count-1) ? xc.vo_aspect_ratio + 1 : 0;
- cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness,
- xc.contrast, xc.overscan, xc.vo_aspect_ratio);
+ cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, xc.brightness, xc.sharpness,
+ xc.noise_reduction, xc.contrast, xc.overscan,
+ xc.vo_aspect_ratio);
}
Message = cString::sprintf("%s %s %s", tr("Video aspect ratio"),
OnlyInfo ? ":" : "->",
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index 4a2f714a..4cd41613 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -4,9 +4,9 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Xineliboutput 1.0.2\n"
+"Project-Id-Version: Xineliboutput 1.1.0\n"
"Report-Msgid-Bugs-To: <phintuka@users.sourceforge.net>\n"
-"POT-Creation-Date: 2008-10-18 13:34+0300\n"
+"POT-Creation-Date: 2009-01-07 15:46+0200\n"
"PO-Revision-Date: 2008-03-20 23:57+0100\n"
"Last-Translator: Maya <maja373@gmail.com>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -461,6 +461,12 @@ msgstr "Kontrast"
msgid "Brightness"
msgstr "Jas"
+msgid "Sharpness"
+msgstr ""
+
+msgid "Noise Reduction"
+msgstr ""
+
msgid "Smooth fast forward"
msgstr "Plynulé pøetáèení"
diff --git a/po/de_DE.po b/po/de_DE.po
index 98ad8e92..f1840bbf 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: VDR 1.5.7\n"
+"Project-Id-Version: Xineliboutput 1.1.0\n"
"Report-Msgid-Bugs-To: <phintuka@users.sourceforge.net>\n"
-"POT-Creation-Date: 2008-10-18 13:34+0300\n"
+"POT-Creation-Date: 2009-01-07 15:46+0200\n"
"PO-Revision-Date: 2007-11-23 10:17+0200\n"
"Last-Translator: Udo Richter\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -460,6 +460,12 @@ msgstr "Kontrast"
msgid "Brightness"
msgstr "Helligkeit"
+msgid "Sharpness"
+msgstr ""
+
+msgid "Noise Reduction"
+msgstr ""
+
msgid "Smooth fast forward"
msgstr ""
diff --git a/po/fi_FI.po b/po/fi_FI.po
index ab841b35..e3c8a9b9 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Xineliboutput 1.1.0\n"
"Report-Msgid-Bugs-To: <phintuka@users.sourceforge.net>\n"
-"POT-Creation-Date: 2008-10-17 23:59+0300\n"
+"POT-Creation-Date: 2009-01-07 15:46+0200\n"
"PO-Revision-Date: 2008-10-06 11:19+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -417,7 +417,7 @@ msgid " Chroma Filter"
msgstr " Käytä Chroma-suodinta"
msgid "Sharpen / Blur"
-msgstr "Terävöinti / Sumennus"
+msgstr "Terävöinti / sumennus"
msgid " Width of the luma matrix"
msgstr " Luma-matriisin leveys"
@@ -438,7 +438,7 @@ msgid " Amount of chroma sharpness/blur"
msgstr " Chroma-terävöinti/-sumennus"
msgid "3D Denoiser"
-msgstr "3D kohinanpoisto"
+msgstr "3D-kohinanpoisto"
msgid " Spatial luma strength"
msgstr " Luman tilavoimakkuus"
@@ -461,6 +461,12 @@ msgstr "Kontrasti"
msgid "Brightness"
msgstr "Kirkkaus"
+msgid "Sharpness"
+msgstr "Terävöinti"
+
+msgid "Noise Reduction"
+msgstr "Kohinanpoisto"
+
msgid "Smooth fast forward"
msgstr "Tasainen kuvakelaus"
diff --git a/po/it_IT.po b/po/it_IT.po
index 355ec612..d0473a0c 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -4,9 +4,9 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Xineliboutput 1.0.2\n"
+"Project-Id-Version: Xineliboutput 1.1.0\n"
"Report-Msgid-Bugs-To: <phintuka@users.sourceforge.net>\n"
-"POT-Creation-Date: 2008-10-18 13:34+0300\n"
+"POT-Creation-Date: 2009-01-07 15:46+0200\n"
"PO-Revision-Date: 2008-10-05 02:58+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -459,6 +459,12 @@ msgstr "Contrasto"
msgid "Brightness"
msgstr "Luminosità"
+msgid "Sharpness"
+msgstr ""
+
+msgid "Noise Reduction"
+msgstr ""
+
msgid "Smooth fast forward"
msgstr "Avanzamento veloce leggero"
diff --git a/po/ru_RU.po b/po/ru_RU.po
index a945b4dd..27a45d25 100644
--- a/po/ru_RU.po
+++ b/po/ru_RU.po
@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: VDR 1.5.7\n"
+"Project-Id-Version: Xineliboutput 1.1.0\n"
"Report-Msgid-Bugs-To: <phintuka@users.sourceforge.net>\n"
-"POT-Creation-Date: 2008-10-18 13:34+0300\n"
+"POT-Creation-Date: 2009-01-07 15:46+0200\n"
"PO-Revision-Date: 2007-11-23 10:17+0200\n"
"Last-Translator: Vladimir Monchenko\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -460,6 +460,12 @@ msgstr "ºÞÝâàÐáâÝÞáâì"
msgid "Brightness"
msgstr "ÏàÚÞáâì"
+msgid "Sharpness"
+msgstr ""
+
+msgid "Noise Reduction"
+msgstr ""
+
msgid "Smooth fast forward"
msgstr ""
diff --git a/setup_menu.c b/setup_menu.c
index 27704e4c..4269fd05 100644
--- a/setup_menu.c
+++ b/setup_menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: setup_menu.c,v 1.65 2008-11-20 11:46:31 rofafor Exp $
+ * $Id: setup_menu.c,v 1.66 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -498,6 +498,8 @@ class cMenuSetupVideo : public cMenuSetupPage
cOsdItem *ctrl_saturation;
cOsdItem *ctrl_contrast;
cOsdItem *ctrl_brightness;
+ cOsdItem *ctrl_sharpness;
+ cOsdItem *ctrl_noise_reduction;
cOsdItem *ctrl_overscan;
cOsdItem *ctrl_pp;
cOsdItem *ctrl_deinterlace;
@@ -528,6 +530,8 @@ cMenuSetupVideo::cMenuSetupVideo(void)
newconfig.saturation = CONTROL_TO_INDEX(newconfig.saturation);
newconfig.contrast = CONTROL_TO_INDEX(newconfig.contrast);
newconfig.brightness = CONTROL_TO_INDEX(newconfig.brightness);
+ newconfig.sharpness = CONTROL_TO_INDEX(newconfig.sharpness);
+ newconfig.noise_reduction = CONTROL_TO_INDEX(newconfig.noise_reduction);
deinterlace = strstra(xc.deinterlace_method, xc.s_deinterlaceMethods, 0);
@@ -539,7 +543,8 @@ cMenuSetupVideo::cMenuSetupVideo(void)
cMenuSetupVideo::~cMenuSetupVideo(void)
{
cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation,
- xc.brightness, xc.contrast,
+ xc.brightness, xc.sharpness,
+ xc.noise_reduction, xc.contrast,
xc.overscan, xc.vo_aspect_ratio);
cXinelibDevice::Instance().ConfigurePostprocessing(
"autocrop", xc.autocrop ? true : false, xc.AutocropOptions());
@@ -678,6 +683,10 @@ void cMenuSetupVideo::Set(void)
Add(new cMenuEditIntItem(tr("Saturation"), &newconfig.saturation,-1,0xffff));
Add(new cMenuEditIntItem(tr("Contrast"), &newconfig.contrast, -1, 0xffff));
Add(new cMenuEditIntItem(tr("Brightness"), &newconfig.brightness,-1,0xffff));
+#ifdef HAVE_VDPAU
+ Add(new cMenuEditIntItem(tr("Sharpness"), &newconfig.sharpness, -1,0xffff));
+ Add(new cMenuEditIntItem(tr("Noise Reduction"), &newconfig.noise_reduction, -1,0xffff));
+#endif
#else
Add(ctrl_hue = new cMenuEditStraItem(tr("HUE"), &newconfig.hue, 33,
controls));
@@ -690,6 +699,14 @@ void cMenuSetupVideo::Set(void)
Add(ctrl_brightness =
new cMenuEditStraItem(tr("Brightness"), &newconfig.brightness, 33,
controls));
+#ifdef HAVE_VDPAU
+ Add(ctrl_sharpness =
+ new cMenuEditStraItem(tr("Sharpness"), &newconfig.sharpness, 33,
+ controls));
+ Add(ctrl_noise_reduction =
+ new cMenuEditStraItem(tr("Noise Reduction"), &newconfig.noise_reduction, 33,
+ controls));
+#endif
#endif
#ifdef DEVICE_SUPPORTS_IBP_TRICKSPEED
@@ -717,12 +734,15 @@ eOSState cMenuSetupVideo::ProcessKey(eKeys Key)
return state;
if(item == ctrl_hue || item == ctrl_saturation ||
+ item == ctrl_sharpness || item == ctrl_noise_reduction ||
item == ctrl_contrast || item == ctrl_brightness ||
item == ctrl_overscan || item == ctrl_vo_aspect_ratio)
#ifdef INTEGER_CONFIG_VIDEO_CONTROLS
cXinelibDevice::Instance().ConfigureVideo(newconfig.hue,
newconfig.saturation,
newconfig.brightness,
+ newconfig.sharpness,
+ newconfig.noise_reduction,
newconfig.contrast,
newconfig.overscan,
newconfig.vo_aspect_ratio);
@@ -731,6 +751,8 @@ eOSState cMenuSetupVideo::ProcessKey(eKeys Key)
INDEX_TO_CONTROL(newconfig.hue),
INDEX_TO_CONTROL(newconfig.saturation),
INDEX_TO_CONTROL(newconfig.brightness),
+ INDEX_TO_CONTROL(newconfig.sharpness),
+ INDEX_TO_CONTROL(newconfig.noise_reduction),
INDEX_TO_CONTROL(newconfig.contrast),
newconfig.overscan, newconfig.vo_aspect_ratio);
#endif
@@ -789,6 +811,8 @@ void cMenuSetupVideo::Store(void)
xc.saturation = INDEX_TO_CONTROL(xc.saturation);
xc.contrast = INDEX_TO_CONTROL(xc.contrast);
xc.brightness = INDEX_TO_CONTROL(xc.brightness);
+ xc.sharpness = INDEX_TO_CONTROL(xc.sharpness);
+ xc.noise_reduction = INDEX_TO_CONTROL(xc.noise_reduction);
#endif
strn0cpy(xc.deinterlace_method, xc.s_deinterlaceMethods[deinterlace], sizeof(xc.deinterlace_method));
@@ -811,6 +835,8 @@ void cMenuSetupVideo::Store(void)
SetupStore("Video.Saturation", xc.saturation);
SetupStore("Video.Contrast", xc.contrast);
SetupStore("Video.Brightness", xc.brightness);
+ SetupStore("Video.Sharpness", xc.sharpness);
+ SetupStore("Video.NoiseReduction", xc.noise_reduction);
SetupStore("Video.Overscan", xc.overscan);
SetupStore("Video.IBPTrickSpeed", xc.ibp_trickspeed);
SetupStore("Video.MaxTrickSpeed", xc.max_trickspeed);
@@ -1730,7 +1756,7 @@ eOSState cTestGrayscale::ProcessKey(eKeys key)
br -= 0xffff/1024;
sprintf(s, "b %d", br);
m_Osd->DrawText(400, 100, s, 0xff000000, 0xffffffff, cFont::GetFont(fontSml));
- cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, br, co, xc.overscan, xc.vo_aspect_ratio);
+ cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, br, xc.sharpness, xc.noise_reduction, co, xc.overscan, xc.vo_aspect_ratio);
m_Osd->Flush();
return osContinue;
case kUp:
@@ -1739,7 +1765,7 @@ eOSState cTestGrayscale::ProcessKey(eKeys key)
co -= 0xffff/1024;
sprintf(s, "c %d", co);
m_Osd->DrawText(400, 130, s, 0xff000000, 0xffffffff, cFont::GetFont(fontSml));
- cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, br, co, xc.overscan, xc.vo_aspect_ratio);
+ cXinelibDevice::Instance().ConfigureVideo(xc.hue, xc.saturation, br, xc.sharpness, xc.noise_reduction, co, xc.overscan, xc.vo_aspect_ratio);
m_Osd->Flush();
return osContinue;
}
diff --git a/xine_input_vdr.c b/xine_input_vdr.c
index 83649e71..5e644b03 100644
--- a/xine_input_vdr.c
+++ b/xine_input_vdr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_input_vdr.c,v 1.207 2008-12-06 22:25:25 phintuka Exp $
+ * $Id: xine_input_vdr.c,v 1.208 2009-01-08 11:58:33 rofafor Exp $
*
*/
@@ -336,6 +336,8 @@ typedef struct vdr_input_plugin_s {
int orig_hue;
int orig_brightness;
int orig_saturation;
+ int orig_sharpness;
+ int orig_noise_reduction;
int orig_contrast;
int orig_vo_aspect_ratio;
@@ -1717,7 +1719,8 @@ static int set_deinterlace_method(vdr_input_plugin_t *this, const char *method_n
static int set_video_properties(vdr_input_plugin_t *this,
int hue, int saturation,
- int brightness, int contrast,
+ int brightness, int sharpness,
+ int noise_reduction, int contrast,
int vo_aspect_ratio)
{
pthread_mutex_lock(&this->lock);
@@ -1733,6 +1736,14 @@ static int set_video_properties(vdr_input_plugin_t *this,
XINE_PARAM_VO_SATURATION );
this->orig_brightness = xine_get_param(this->stream,
XINE_PARAM_VO_BRIGHTNESS );
+#ifdef XINE_PARAM_VO_SHARPNESS
+ this->orig_sharpness = xine_get_param(this->stream,
+ XINE_PARAM_VO_SHARPNESS );
+#endif
+#ifdef XINE_PARAM_VO_NOISE_REDUCTION
+ this->orig_noise_reduction = xine_get_param(this->stream,
+ XINE_PARAM_VO_NOISE_REDUCTION );
+#endif
this->orig_contrast = xine_get_param(this->stream,
XINE_PARAM_VO_CONTRAST );
this->orig_vo_aspect_ratio = xine_get_param(this->stream,
@@ -1749,6 +1760,16 @@ static int set_video_properties(vdr_input_plugin_t *this,
if(brightness>=0 || this->video_properties_saved)
xine_set_param(this->stream, XINE_PARAM_VO_BRIGHTNESS,
brightness>=0 ? brightness : this->orig_brightness );
+#ifdef XINE_PARAM_VO_SHARPNESS
+ if(sharpness>=0 || this->video_properties_saved)
+ xine_set_param(this->stream, XINE_PARAM_VO_SHARPNESS,
+ sharpness>=0 ? sharpness : this->orig_sharpness );
+#endif
+#ifdef XINE_PARAM_VO_NOISE_REDUCTION
+ if(noise_reduction>=0 || this->video_properties_saved)
+ xine_set_param(this->stream, XINE_PARAM_VO_NOISE_REDUCTION,
+ noise_reduction>=0 ? noise_reduction : this->orig_noise_reduction );
+#endif
if(contrast>=0 || this->video_properties_saved)
xine_set_param(this->stream, XINE_PARAM_VO_CONTRAST,
contrast>=0 ? contrast : this->orig_contrast );
@@ -2618,10 +2639,10 @@ static int vdr_plugin_parse_control(vdr_input_plugin_if_t *this_if, const char *
err = handle_control_osdcmd(this);
} else if(!strncasecmp(cmd, "VIDEO_PROPERTIES ", 17)) {
- int hue, saturation, brightness, contrast, vo_aspect_ratio;
- if(5 == sscanf(cmd+17, "%d %d %d %d %d",
- &hue, &saturation, &brightness, &contrast, &vo_aspect_ratio))
- err = set_video_properties(this, hue, saturation, brightness, contrast, vo_aspect_ratio);
+ int hue, saturation, brightness, sharpness, noise_reduction, contrast, vo_aspect_ratio;
+ if(7 == sscanf(cmd+17, "%d %d %d %d %d %d %d",
+ &hue, &saturation, &brightness, &sharpness, &noise_reduction, &contrast, &vo_aspect_ratio))
+ err = set_video_properties(this, hue, saturation, brightness, sharpness, noise_reduction, contrast, vo_aspect_ratio);
else
err = CONTROL_PARAM_ERROR;
@@ -4980,7 +5001,7 @@ static void vdr_plugin_dispose (input_plugin_t *this_gen)
/* restore video properties */
if(this->video_properties_saved)
- set_video_properties(this, -1,-1,-1,-1,-1); /* restore defaults */
+ set_video_properties(this, -1,-1,-1,-1,-1, -1, -1); /* restore defaults */
signal_buffer_pool_not_empty(this);
signal_buffer_not_empty(this);