-from Components.config import config, ConfigSubsection, ConfigSlider, ConfigSelection, ConfigNothing, NoSave
+from Components.config import config, ConfigSubsection, ConfigSlider, ConfigSelection, ConfigBoolean, ConfigNothing, NoSave
from Tools.CList import CList
from os import path as os_path
# The "VideoEnhancement" is the interface to /proc/stb/vmpeg/0.
else:
config.av.scaler_sharpness = NoSave(ConfigNothing())
+ if os_path.exists("/proc/stb/vmpeg/0/pep_scaler_vertical_dejagging"):
+ def setScaler_vertical_dejagging(configElement):
+ myval = configElement.value and "enable" or "disable"
+ try:
+ print "--> setting scaler_vertical_dejagging to: %s" % myval
+ open("/proc/stb/vmpeg/0/pep_scaler_vertical_dejagging", "w").write(myval)
+ except IOError:
+ print "couldn't write pep_scaler_vertical_dejagging."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.scaler_vertical_dejagging = ConfigBoolean(default=False, descriptions = {False: "Disable", True: "Enable"} )
+ config.pep.scaler_vertical_dejagging.addNotifier(setScaler_vertical_dejagging)
+ else:
+ config.pep.scaler_vertical_dejagging = NoSave(ConfigNothing())
+
+ if os_path.exists("/proc/stb/vmpeg/0/smooth"):
+ def setSmooth(configElement):
+ myval = configElement.value and "enable" or "disable"
+ try:
+ print "--> setting smooth to: %s" % myval
+ open("/proc/stb/vmpeg/0/smooth", "w").write(myval)
+ except IOError:
+ print "couldn't write smooth."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.smooth = ConfigBoolean(default=False, descriptions = {False: "Disable", True: "Enable"} )
+ config.pep.smooth.addNotifier(setSmooth)
+ else:
+ config.pep.smooth = NoSave(ConfigNothing())
+
if VideoEnhancement.firstRun:
self.setConfiguredValues()
self.oldMosquito_noise = config.pep.mosquito_noise_reduction.value
self.oldDigital_contour = config.pep.digital_contour_removal.value
self.oldScaler_sharpness = config.av.scaler_sharpness.value
+ self.oldScaler_vertical_dejagging = config.pep.scaler_vertical_dejagging.value
+ self.oldSmooth = config.pep.smooth.value
self.oldSplit = config.pep.split.value
self.oldSharpness = config.pep.sharpness.value
self.oldAuto_flesh = config.pep.auto_flesh.value
self.hueEntry = addToConfigList(_("Hue"), config.pep.hue)
self.brightnessEntry = addToConfigList(_("Brightness"), config.pep.brightness)
self.scaler_sharpnessEntry = addToConfigList(_("Scaler sharpness"), config.av.scaler_sharpness)
+ self.scaler_vertical_dejaggingEntry = addToConfigList(_("Scaler vertical dejagging"), config.pep.scaler_vertical_dejagging)
+ self.smoothEntry = addToConfigList(_("Smooth"), config.pep.smooth)
self.splitEntry = addToConfigList(_("Split preview mode"), config.pep.split, True)
add_to_xtdlist = self.splitEntry is not None
self.sharpnessEntry = addToConfigList(_("Sharpness"), config.pep.sharpness, add_to_xtdlist)
current = self["config"].getCurrent()
if current == self.splitEntry:
ConfigListScreen.keyLeft(self)
+ elif (current == self.scaler_vertical_dejaggingEntry) or (current == self.smoothEntry):
+ ConfigListScreen.keyLeft(self)
elif current != self.splitEntry and current in self.xtdlist:
self.previewlist = [
current,
current = self["config"].getCurrent()
if current == self.splitEntry:
ConfigListScreen.keyRight(self)
+ elif (current == self.scaler_vertical_dejaggingEntry) or (current == self.smoothEntry):
+ ConfigListScreen.keyRight(self)
elif current != self.splitEntry and current in self.xtdlist:
self.previewlist = [
current,
maxvalue = current[1].max
self.session.openWithCallback(self.PreviewClosed, VideoEnhancementPreview, configEntry = self.previewlist, oldSplitMode = None, maxValue = maxvalue)
+
def confirm(self, confirmed):
if not confirmed:
print "not confirmed"
config.pep.digital_contour_removal.setValue(self.oldDigital_contour)
if self.scaler_sharpnessEntry is not None:
config.av.scaler_sharpness.setValue(self.oldScaler_sharpness)
+ if self.scaler_vertical_dejaggingEntry is not None:
+ config.pep.scaler_vertical_dejagging.setValue(self.oldScaler_vertical_dejagging)
+ if self.smoothEntry is not None:
+ config.pep.smooth.setValue(self.oldSmooth)
if self.splitEntry is not None:
config.pep.split.setValue('off')
if self.sharpnessEntry is not None:
config.pep.digital_contour_removal.setValue(0)
if self.scaler_sharpnessEntry is not None:
config.av.scaler_sharpness.setValue(13)
+ if self.scaler_vertical_dejaggingEntry is not None:
+ config.pep.scaler_vertical_dejagging.setValue(False)
+ if self.smoothEntry is not None:
+ config.pep.smooth.setValue(False)
if self.splitEntry is not None:
config.pep.split.setValue('off')
if self.sharpnessEntry is not None: