Merge branch 'master' of git.opendreambox.org:/git/enigma2
authorFraxinas <andreas.frisch@multimedia-labs.de>
Tue, 6 Oct 2009 22:50:36 +0000 (00:50 +0200)
committerFraxinas <andreas.frisch@multimedia-labs.de>
Tue, 6 Oct 2009 22:50:36 +0000 (00:50 +0200)
lib/python/Plugins/SystemPlugins/VideoEnhancement/VideoEnhancement.py
lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py

index b18f559..4ba4958 100755 (executable)
@@ -238,6 +238,26 @@ class VideoEnhancement:
                else:
                        config.pep.dynamic_contrast = NoSave(ConfigNothing())
 
+               try:
+                       x = config.av.scaler_sharpness.value
+               except KeyError:
+                       if os_path.exists("/proc/stb/vmpeg/0/pep_scaler_sharpness"):
+                               def setScaler_sharpness(config):
+                                       myval = int(config.value)
+                                       try:
+                                               print "--> setting scaler_sharpness to: %0.8X" % myval
+                                               open("/proc/stb/vmpeg/0/pep_scaler_sharpness", "w").write("%0.8X" % myval)
+                                       except IOError:
+                                               print "couldn't write pep_scaler_sharpness."
+
+                                       if not VideoEnhancement.firstRun:
+                                               self.setConfiguredValues()
+
+                               config.av.scaler_sharpness = ConfigSlider(default=13, limits=(0,26))
+                               config.av.scaler_sharpness.addNotifier(setScaler_sharpness)
+                       else:
+                               config.av.scaler_sharpness = NoSave(ConfigNothing())
+
                if VideoEnhancement.firstRun:
                        self.setConfiguredValues()
 
index bceb6bc..3759c21 100644 (file)
@@ -105,8 +105,9 @@ class VideoWizard(WizardLanguage, Rc):
                modeList = self.hw.getModeList(self.selection)
                print "modeList:", modeList
                self.port = port
-               ratesList = self.listRates(modeList[0][0])
-               self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0])
+               if (len(modeList) > 0):
+                       ratesList = self.listRates(modeList[0][0])
+                       self.hw.setMode(port = port, mode = modeList[0][0], rate = ratesList[0][0])
                
        def listModes(self):
                list = []