Skip to content
This repository

More post-processing options: different post processing modes per video #258

Closed
wants to merge 1 commit into from

5 participants

Farkas Szilard wmyrda Joakim Plate Martijn Kaijser bulkzooi
Farkas Szilard

2011.Oct.12 Updated for no conflicts with master.

Post-processing all videos with high quality pp filter combination 'ha:128:7,va,dr' makes videos too blurred. Not all videos need so much vertical/horizontal de-blocking. From experience with MPlayer's video filter settings I would suggest the following changes:

Introduce 3 PP Modes that can be switched in the GUI and saved per video:

  • Default: 'ha,va,dr' (this is accurate but not too aggressive and it is based on FFMpeg default that is 'hb:a,vb:a,dr:a', only changed horizontal/vertical deblocking to accurate and disabled auto switch-off flag). Because this is the mode that can be overridden in xml, advanced users with own pp settings won't be affected by this change.

  • Aggressive: 'ha:128:7,va,dr' (high quality but not suitable for all videos this is FFMpeg high quality pp filter combination 'ha:a:128:7,va:a,dr:a' without the ':a' flag)

  • Auto (slow CPU): 'hb:a,vb:a,dr:a' (FFMpeg's default setting that automatically switches the subfilters off if the CPU is too slow)

See: http://trac.xbmc.org/ticket/11556

@elupus: libavfilter was put in place but the currently integrated version does not have a filter named 'mp' so we could use what we have now until ffmpeg will be updated.

wmyrda

idea itself seems great to me. any chance this gets implemented? BTW I am using external ffmpeg 1.0 and would like to move to the 1.1 as well. Would it work with them as well?

Joakim Plate
Collaborator
wmyrda

I updated the patch http://pastebin.com/0h5g1UdB with polish translation and added additional post-processing settings which I personally like to use and tested it with external ffmpeg 1.0.3 and seems to work well with that combination.
One thing I didn't personally like in the original patch is naming one of the options SLOW_CPU as fast cpus might like this setting too for some videos hence the change to AUTO. BASIC or AUTO_BASIC would probably be more appropriate as well.

Martijn Kaijser

Translations must be handled through Transifex and should not be added directly. Only English strings

Farkas Szilard
Please change:
ha:a:128:7,va:a:128:7,dr:a -> ha:a:128:7,va:a,dr:a

See man-page of mplayer:
"The horizontal and vertical deblocking filters share the difference and flatness values so you cannot set different horizontal and vertical thresholds."

Also do not use name "Auto" for the filter:

hb:a,vb:a,dr:a - this filter should be used only on slow CPU's

It's ok to name the filter Auto internally in the source but not as a setting to the user

wmyrda

I read mplayer manual filtering (pp) section http://www8.mplayerhq.hu/DOCS/man/en/mplayer.1.txt back and forward several times and could not find information about thresholds, but then I typed "mplayer -pphelp" and it sure mentioned that setting it the same for H & V is required. Still I believe that mine should work too as I set same levels for both. It probably was just redundant, but I could be wrong. In either case definatly extra 128:7 should be removed.
That said is is possible to add INSANE/EXTREME/SLOWEST filter with levels od something like 255:3 for example? What is the limit there if any?
What about h1 & v1 filetrs. Are there any better than any of the below combinations or if somebody says so it is just a placebo?

Localy I already switch "Auto" to "Basic", but before I post it I consider changing it a bit to something like this. Please take a look if it makes sense

Highest = "ha:255:3,va,dr";
Higher = "ha:128:7,va,dr";
High = "ha:a:128:7,va:a,dr:a";
Normal [set to default] = "ha,va,dr";
Fast = "hb:a:128:7,vb:a,dr:a";
Faster = "hb,vb,dr";
Fastest = "hb:a,vb:a,dr:a";

Farkas Szilard

This is the HTML version of the documentation: http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html

About setting "ha:255:3,va,dr" – I don’t know the upper limit for difference and flatness the documentation says nothing about that. I think we could use ha:128:7,va,dr as the maximum. Other than that, 8 different settings for pp is just too much. And hb:a,vb:a,dr:a is not faster than hb,vb,dr, the difference is that some or all filters are switched of when computer is too slow. On a fast computer they are the same setting.

I think 3 settings are just fine let’s just take defaults from mplayer:

  • Default: "ha:a,va:a,dr:a" (mplayer de/default option)
  • Accurate: "ha:a:128:7,va:a,dr:a" (mplayer ac option)
  • Fast: "h1:a,v1:a,dr:a" (mplayer fa/fast option)
wmyrda

I must have missed notification about your post so hence only now the response. I agree having to many choices may not be what one desires, and sticking to those automatic once will be better choice for more users, but I would keep that ha:255:3 in there as I tested it with some very bad quality low res samples and it did in fact not only work but made them look better. With that said it would get it down to only 4.

Highest = "ha:a:255:3,va:a,dr:a";
High = "ha:a:128:7,va:a,dr:a";
Default = "ha:a,va:a,dr:a";
Fast = "h1:a,v1:a,dr:a";

Following is what I had used till now http://pastebin.com/pHgXzpSM with FernetMenta tree which worked quite fine for me for the past month until recent changes in the settings directory. Another one http://pastebin.com/EawcXZSk is current WiP reflecting that change however I am not able to find reason why it would not compile for me with errors in MediaSettings.cpp and VideoDatabase.cpp

On the side note to further extend on the idea I believe a quite welcomed feature would be to add an ability for an users to pick different postprocessing method for different resolution/s. Once they enable PP if they do not take additional action then the default would be picked. Then they could enter as many resolutions as they want just like with "adjustrefreshrate" and then pick among those 4 above PP methods.
That way I could for instance set Highest for 576, High for 720, Default for 1080

Farkas Szilard CrHasher closed this April 07, 2013
Farkas Szilard

@wmyrda
Don’t really understand the Highest = "ha 255:3,va:a,dr:a"; setting but if you tested and works fine than I see no reason not to add it. About the "PP settings"/resolution, video quality is not related to resolution, you can have a 1080p video that was up-scaled from a very bad quality low-res video and then you want to let the user set the PP option for that video. Currently the user sees the video and decides what PP option to use (that's just fine). Personally I keep PP off until I play an SD quality video that looks awful, than I switch PP to an option I like. If you can somehow detect HD quality video (I think we do show icon for SD and HD) then you could add an option to turn off PP for HD and that would be more useful.

Farkas Szilard CrHasher reopened this April 07, 2013
Farkas Szilard

Sorry for closing pull, my mistake :dancer:

bulkzooi

I think this needs some work after all the FFMPEG changes....

Farkas Szilard

At the time avfilter was introduced, post-processing filters were unavailable. We should add the new pp filter to our filter chain and remove the old code completely.
@wmyrda:
You can add the pp filter (with same options) to the filter chain in function:

unsigned int CDVDVideoCodecFFmpeg::SetFilters(unsigned int flags)

This function is called from:

void CDVDPlayerVideo::Process()
  • here you can see how other filter flags are set (deinterlace, rotate)
  • also mPostProcess and anything related should be removed from CDVDPlayerVideo
Farkas Szilard CrHasher closed this June 25, 2013
Farkas Szilard

@wmyrda: Please if you make changes submit a new pull request from your fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 12, 2011
Farkas Szilard Different post processing modes per video b5ee163
This page is out of date. Refresh to see the latest.
4  language/English/strings.xml
@@ -1538,6 +1538,10 @@
1538 1538
   <string id="16324">Software Blend</string>
1539 1539
   
1540 1540
   <string id="16400">Post-processing</string>
  1541
+  <string id="16401">Post-processing Mode</string>
  1542
+  <string id="16402">Default</string>
  1543
+  <string id="16403">Aggressive</string>
  1544
+  <string id="16404">Auto (slow CPU)</string>
1541 1545
 
1542 1546
   <string id="17500">Display sleep timeout</string>
1543 1547
 
22  xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -623,8 +623,26 @@ void CDVDPlayerVideo::Process()
623 623
             {
624 624
               if (!sPostProcessType.empty())
625 625
                 sPostProcessType += ",";
626  
-              // This is what mplayer uses for its "high-quality filter combination"
627  
-              sPostProcessType += g_advancedSettings.m_videoPPFFmpegPostProc;
  626
+
  627
+              switch (g_settings.m_currentVideoSettings.m_PostProcessingMode)
  628
+              {
  629
+              case VS_PPMODE_DEFAULT:
  630
+                {
  631
+                  // this is the one that will be overwritten by settings in Advancedsettings.xml
  632
+                  sPostProcessType += g_advancedSettings.m_videoPPFFmpegPostProcDefault;
  633
+                }
  634
+                break;
  635
+              case VS_PPMODE_AGGRESSIVE:
  636
+                {
  637
+                  sPostProcessType += g_advancedSettings.m_videoPPFFmpegPostProcAggressive;
  638
+                }
  639
+                break;
  640
+              case VS_PPMODE_SLOW_CPU:
  641
+                {
  642
+                  sPostProcessType += g_advancedSettings.m_videoPPFFmpegPostProcAutoQuality;
  643
+                }
  644
+                break;
  645
+              }
628 646
             }
629 647
 
630 648
             if (!sPostProcessType.empty())
6  xbmc/settings/AdvancedSettings.cpp
@@ -82,7 +82,9 @@ void CAdvancedSettings::Initialize()
82 82
   m_videoPercentSeekBackwardBig = -10;
83 83
   m_videoBlackBarColour = 0;
84 84
   m_videoPPFFmpegDeint = "linblenddeint";
85  
-  m_videoPPFFmpegPostProc = "ha:128:7,va,dr";
  85
+  m_videoPPFFmpegPostProcDefault = "ha,va,dr"; // ha:32:39,va,dr
  86
+  m_videoPPFFmpegPostProcAggressive = "ha:128:7,va,dr";
  87
+  m_videoPPFFmpegPostProcAutoQuality = "hb:a,vb:a,dr:a"; // ":a"=automatically switch the subfilter off if the CPU is too slow
86 88
   m_videoDefaultPlayer = "dvdplayer";
87 89
   m_videoDefaultDVDPlayer = "dvdplayer";
88 90
   m_videoIgnoreSecondsAtStart = 3*60;
@@ -449,7 +451,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
449 451
 
450 452
     XMLUtils::GetString(pElement,"cleandatetime", m_videoCleanDateTimeRegExp);
451 453
     XMLUtils::GetString(pElement,"ppffmpegdeinterlacing",m_videoPPFFmpegDeint);
452  
-    XMLUtils::GetString(pElement,"ppffmpegpostprocessing",m_videoPPFFmpegPostProc);
  454
+    XMLUtils::GetString(pElement,"ppffmpegpostprocessing",m_videoPPFFmpegPostProcDefault);
453 455
     XMLUtils::GetBoolean(pElement,"vdpauscaling",m_videoVDPAUScaling);
454 456
     XMLUtils::GetFloat(pElement, "nonlinearstretchratio", m_videoNonLinStretchRatio, 0.01f, 1.0f);
455 457
     XMLUtils::GetBoolean(pElement,"enablehighqualityhwscalers", m_videoEnableHighQualityHwScalers);
4  xbmc/settings/AdvancedSettings.h
@@ -100,7 +100,9 @@ class CAdvancedSettings
100 100
     int m_videoPercentSeekForwardBig;
101 101
     int m_videoPercentSeekBackwardBig;
102 102
     CStdString m_videoPPFFmpegDeint;
103  
-    CStdString m_videoPPFFmpegPostProc;
  103
+    CStdString m_videoPPFFmpegPostProcDefault;
  104
+    CStdString m_videoPPFFmpegPostProcAggressive;
  105
+    CStdString m_videoPPFFmpegPostProcAutoQuality;
104 106
     bool m_musicUseTimeSeeking;
105 107
     int m_musicTimeSeekForward;
106 108
     int m_musicTimeSeekBackward;
4  xbmc/settings/Settings.cpp
@@ -711,6 +711,9 @@ bool CSettings::LoadSettings(const CStdString& strSettingsFile)
711 711
     GetFloat(pElement, "volumeamplification", m_defaultVideoSettings.m_VolumeAmplification, VOLUME_DRC_MINIMUM * 0.01f, VOLUME_DRC_MINIMUM * 0.01f, VOLUME_DRC_MAXIMUM * 0.01f);
712 712
     GetFloat(pElement, "noisereduction", m_defaultVideoSettings.m_NoiseReduction, 0.0f, 0.0f, 1.0f);
713 713
     XMLUtils::GetBoolean(pElement, "postprocess", m_defaultVideoSettings.m_PostProcess);
  714
+    int postProcessingMode;
  715
+    GetInteger(pElement, "postprocessingmode", postProcessingMode, VS_PPMODE_DEFAULT, VS_PPMODE_DEFAULT, VS_PPMODE_SLOW_CPU);
  716
+    m_defaultVideoSettings.m_PostProcessingMode = (EPOSTPROCESSINGMODE)postProcessingMode;
714 717
     GetFloat(pElement, "sharpness", m_defaultVideoSettings.m_Sharpness, 0.0f, -1.0f, 1.0f);
715 718
     XMLUtils::GetBoolean(pElement, "outputtoallspeakers", m_defaultVideoSettings.m_OutputToAllSpeakers);
716 719
     XMLUtils::GetBoolean(pElement, "showsubtitles", m_defaultVideoSettings.m_SubtitleOn);
@@ -878,6 +881,7 @@ bool CSettings::SaveSettings(const CStdString& strSettingsFile, CGUISettings *lo
878 881
   XMLUtils::SetInt(pNode, "scalingmethod", m_defaultVideoSettings.m_ScalingMethod);
879 882
   XMLUtils::SetFloat(pNode, "noisereduction", m_defaultVideoSettings.m_NoiseReduction);
880 883
   XMLUtils::SetBoolean(pNode, "postprocess", m_defaultVideoSettings.m_PostProcess);
  884
+  XMLUtils::SetInt(pNode, "postprocessingmode", m_defaultVideoSettings.m_PostProcessingMode);
881 885
   XMLUtils::SetFloat(pNode, "sharpness", m_defaultVideoSettings.m_Sharpness);
882 886
   XMLUtils::SetInt(pNode, "viewmode", m_defaultVideoSettings.m_ViewMode);
883 887
   XMLUtils::SetFloat(pNode, "zoomamount", m_defaultVideoSettings.m_CustomZoomAmount);
2  xbmc/settings/VideoSettings.cpp
@@ -50,6 +50,7 @@ CVideoSettings::CVideoSettings()
50 50
   m_Sharpness = 0.0f;
51 51
   m_NoiseReduction = 0;
52 52
   m_PostProcess = false;
  53
+  m_PostProcessingMode = VS_PPMODE_DEFAULT;
53 54
   m_VolumeAmplification = 0;
54 55
   m_AudioDelay = 0.0f;
55 56
   m_OutputToAllSpeakers = false;
@@ -82,6 +83,7 @@ bool CVideoSettings::operator!=(const CVideoSettings &right) const
82 83
   if (m_Sharpness != right.m_Sharpness) return true;
83 84
   if (m_NoiseReduction != right.m_NoiseReduction) return true;
84 85
   if (m_PostProcess != right.m_PostProcess) return true;
  86
+  if (m_PostProcessingMode != right.m_PostProcessingMode) return true;
85 87
   if (m_VolumeAmplification != right.m_VolumeAmplification) return true;
86 88
   if (m_AudioDelay != right.m_AudioDelay) return true;
87 89
   if (m_OutputToAllSpeakers != right.m_OutputToAllSpeakers) return true;
8  xbmc/settings/VideoSettings.h
@@ -92,6 +92,13 @@ enum ESCALINGMETHOD
92 92
   VS_SCALINGMETHOD_SPLINE36
93 93
 };
94 94
 
  95
+enum EPOSTPROCESSINGMODE
  96
+{
  97
+  VS_PPMODE_DEFAULT=0,
  98
+  VS_PPMODE_AGGRESSIVE,
  99
+  VS_PPMODE_SLOW_CPU
  100
+};
  101
+
95 102
 class CVideoSettings
96 103
 {
97 104
 public:
@@ -120,6 +127,7 @@ class CVideoSettings
120 127
   float m_Gamma;
121 128
   float m_NoiseReduction;
122 129
   bool m_PostProcess;
  130
+  EPOSTPROCESSINGMODE m_PostProcessingMode;
123 131
   float m_Sharpness;
124 132
   float m_AudioDelay;
125 133
   int m_ResumeTime;
16  xbmc/video/VideoDatabase.cpp
@@ -101,7 +101,7 @@ bool CVideoDatabase::CreateTables()
101 101
                 "SubtitleDelay float, SubtitlesOn bool, Brightness float, Contrast float, Gamma float,"
102 102
                 "VolumeAmplification float, AudioDelay float, OutputToAllSpeakers bool, ResumeTime integer, Crop bool, CropLeft integer,"
103 103
                 "CropRight integer, CropTop integer, CropBottom integer, Sharpness float, NoiseReduction float, NonLinStretch bool, PostProcess bool,"
104  
-                "ScalingMethod integer, DeinterlaceMode integer)\n");
  104
+                "ScalingMethod integer, DeinterlaceMode integer, PostProcessingMode integer)\n");
105 105
     m_pDS->exec("CREATE UNIQUE INDEX ix_settings ON settings ( idFile )\n");
106 106
 
107 107
     CLog::Log(LOGINFO, "create stacktimes table");
@@ -3015,6 +3015,7 @@ bool CVideoDatabase::GetVideoSettings(const CStdString &strFilenameAndPath, CVid
3015 3015
       settings.m_CustomNonLinStretch = m_pDS->fv("NonLinStretch").get_asBool();
3016 3016
       settings.m_NoiseReduction = m_pDS->fv("NoiseReduction").get_asFloat();
3017 3017
       settings.m_PostProcess = m_pDS->fv("PostProcess").get_asBool();
  3018
+      settings.m_PostProcessingMode = (EPOSTPROCESSINGMODE)m_pDS->fv("PostProcessingMode").get_asInt();
3018 3019
       settings.m_Sharpness = m_pDS->fv("Sharpness").get_asFloat();
3019 3020
       settings.m_CustomZoomAmount = m_pDS->fv("ZoomAmount").get_asFloat();
3020 3021
       settings.m_CustomVerticalShift = m_pDS->fv("VerticalShift").get_asFloat();
@@ -3067,12 +3068,12 @@ void CVideoDatabase::SetVideoSettings(const CStdString& strFilenameAndPath, cons
3067 3068
       strSQL=PrepareSQL("update settings set Deinterlace=%i,ViewMode=%i,ZoomAmount=%f,PixelRatio=%f,VerticalShift=%f,"
3068 3069
                        "AudioStream=%i,SubtitleStream=%i,SubtitleDelay=%f,SubtitlesOn=%i,Brightness=%f,Contrast=%f,Gamma=%f,"
3069 3070
                        "VolumeAmplification=%f,AudioDelay=%f,OutputToAllSpeakers=%i,Sharpness=%f,NoiseReduction=%f,NonLinStretch=%i,PostProcess=%i,ScalingMethod=%i,"
3070  
-                       "DeinterlaceMode=%i,",
  3071
+                       "DeinterlaceMode=%i,PostProcessingMode=%i,",
3071 3072
                        setting.m_InterlaceMethod, setting.m_ViewMode, setting.m_CustomZoomAmount, setting.m_CustomPixelRatio, setting.m_CustomVerticalShift,
3072 3073
                        setting.m_AudioStream, setting.m_SubtitleStream, setting.m_SubtitleDelay, setting.m_SubtitleOn,
3073 3074
                        setting.m_Brightness, setting.m_Contrast, setting.m_Gamma, setting.m_VolumeAmplification, setting.m_AudioDelay,
3074 3075
                        setting.m_OutputToAllSpeakers,setting.m_Sharpness,setting.m_NoiseReduction,setting.m_CustomNonLinStretch,setting.m_PostProcess,setting.m_ScalingMethod,
3075  
-                       setting.m_DeinterlaceMode);
  3076
+                       setting.m_DeinterlaceMode,setting.m_PostProcessingMode);
3076 3077
       CStdString strSQL2;
3077 3078
       strSQL2=PrepareSQL("ResumeTime=%i,Crop=%i,CropLeft=%i,CropRight=%i,CropTop=%i,CropBottom=%i where idFile=%i\n", setting.m_ResumeTime, setting.m_Crop, setting.m_CropLeft, setting.m_CropRight, setting.m_CropTop, setting.m_CropBottom, idFile);
3078 3079
       strSQL += strSQL2;
@@ -3086,7 +3087,7 @@ void CVideoDatabase::SetVideoSettings(const CStdString& strFilenameAndPath, cons
3086 3087
                 "AudioStream,SubtitleStream,SubtitleDelay,SubtitlesOn,Brightness,"
3087 3088
                 "Contrast,Gamma,VolumeAmplification,AudioDelay,OutputToAllSpeakers,"
3088 3089
                 "ResumeTime,Crop,CropLeft,CropRight,CropTop,CropBottom,"
3089  
-                "Sharpness,NoiseReduction,NonLinStretch,PostProcess,ScalingMethod,DeinterlaceMode) "
  3090
+                "Sharpness,NoiseReduction,NonLinStretch,PostProcess,ScalingMethod,DeinterlaceMode,PostProcessingMode) "
3090 3091
               "VALUES ";
3091 3092
       strSQL += PrepareSQL("(%i,%i,%i,%f,%f,%f,%i,%i,%f,%i,%f,%f,%f,%f,%f,%i,%i,%i,%i,%i,%i,%i,%f,%f,%i,%i,%i,%i)",
3092 3093
                            idFile, setting.m_InterlaceMethod, setting.m_ViewMode, setting.m_CustomZoomAmount, setting.m_CustomPixelRatio, setting.m_CustomVerticalShift,
@@ -3094,7 +3095,7 @@ void CVideoDatabase::SetVideoSettings(const CStdString& strFilenameAndPath, cons
3094 3095
                            setting.m_Contrast, setting.m_Gamma, setting.m_VolumeAmplification, setting.m_AudioDelay, setting.m_OutputToAllSpeakers,
3095 3096
                            setting.m_ResumeTime, setting.m_Crop, setting.m_CropLeft, setting.m_CropRight, setting.m_CropTop, setting.m_CropBottom,
3096 3097
                            setting.m_Sharpness, setting.m_NoiseReduction, setting.m_CustomNonLinStretch, setting.m_PostProcess, setting.m_ScalingMethod,
3097  
-                           setting.m_DeinterlaceMode);
  3098
+                           setting.m_DeinterlaceMode,setting.m_PostProcessingMode);
3098 3099
       m_pDS->exec(strSQL.c_str());
3099 3100
     }
3100 3101
   }
@@ -3497,6 +3498,11 @@ bool CVideoDatabase::UpdateOldVersion(int iVersion)
3497 3498
                                           "join path on files.idPath=path.idPath",VIDEODB_ID_TV_TITLE, VIDEODB_ID_TV_STUDIOS, VIDEODB_ID_TV_PREMIERED, VIDEODB_ID_TV_MPAA, VIDEODB_ID_TV_BASEPATH);
3498 3499
       m_pDS->exec(episodeview.c_str());
3499 3500
     }
  3501
+    if (iVersion < 57)
  3502
+    {
  3503
+      m_pDS->exec("ALTER table settings add PostProcessingMode integer");
  3504
+      m_pDS->exec(PrepareSQL("UPDATE settings set PostProcessingMode=%i", g_settings.m_defaultVideoSettings.m_PostProcessingMode));
  3505
+    }
3500 3506
   }
3501 3507
   catch (...)
3502 3508
   {
2  xbmc/video/VideoDatabase.h
@@ -721,7 +721,7 @@ class CVideoDatabase : public CDatabase
721 721
    */
722 722
   bool LookupByFolders(const CStdString &path, bool shows = false);
723 723
 
724  
-  virtual int GetMinVersion() const { return 56; };
  724
+  virtual int GetMinVersion() const { return 57; };
725 725
   virtual int GetExportVersion() const { return 1; };
726 726
   const char *GetBaseDBName() const { return "MyVideos"; };
727 727
 
13  xbmc/video/dialogs/GUIDialogVideoSettings.cpp
@@ -67,6 +67,7 @@ CGUIDialogVideoSettings::~CGUIDialogVideoSettings(void)
67 67
 #define VIDEO_SETTINGS_POSTPROCESS        22
68 68
 #define VIDEO_SETTINGS_VERTICAL_SHIFT     23
69 69
 #define VIDEO_SETTINGS_DEINTERLACEMODE    24
  70
+#define VIDEO_SETTINGS_POSTPROCESS_MODE   25
70 71
 
71 72
 void CGUIDialogVideoSettings::CreateSettings()
72 73
 {
@@ -164,7 +165,12 @@ void CGUIDialogVideoSettings::CreateSettings()
164 165
   AddSlider(VIDEO_SETTINGS_VERTICAL_SHIFT, 225, &g_settings.m_currentVideoSettings.m_CustomVerticalShift, -2.0f, 0.01f, 2.0f, FormatFloat);
165 166
   AddSlider(VIDEO_SETTINGS_PIXEL_RATIO, 217, &g_settings.m_currentVideoSettings.m_CustomPixelRatio, 0.5f, 0.01f, 2.0f, FormatFloat);
166 167
   AddBool(VIDEO_SETTINGS_POSTPROCESS, 16400, &g_settings.m_currentVideoSettings.m_PostProcess);
167  
-
  168
+  {
  169
+    const int entries[] = {16402, 16403, 16404};
  170
+    AddSpin(VIDEO_SETTINGS_POSTPROCESS_MODE, 16401, (int*)&g_settings.m_currentVideoSettings.m_PostProcessingMode, 3, entries);
  171
+    EnableSettings(VIDEO_SETTINGS_POSTPROCESS_MODE, g_settings.m_currentVideoSettings.m_PostProcess);
  172
+    UpdateSetting(VIDEO_SETTINGS_POSTPROCESS_MODE);
  173
+  }
168 174
 #ifdef HAS_VIDEO_PLAYBACK
169 175
   if (g_renderManager.Supports(RENDERFEATURE_BRIGHTNESS))
170 176
     AddSlider(VIDEO_SETTINGS_BRIGHTNESS, 464, &g_settings.m_currentVideoSettings.m_Brightness, 0, 1, 100, FormatInteger);
@@ -241,6 +247,11 @@ void CGUIDialogVideoSettings::OnSettingChanged(SettingInfo &setting)
241 247
   {
242 248
     EnableSettings(VIDEO_SETTINGS_INTERLACEMETHOD, g_settings.m_currentVideoSettings.m_DeinterlaceMode != VS_DEINTERLACEMODE_OFF);
243 249
   }
  250
+  else if (setting.id == VIDEO_SETTINGS_POSTPROCESS)
  251
+  {
  252
+    EnableSettings(VIDEO_SETTINGS_POSTPROCESS_MODE, g_settings.m_currentVideoSettings.m_PostProcess);
  253
+    UpdateSetting(VIDEO_SETTINGS_POSTPROCESS_MODE);
  254
+  }
244 255
 }
245 256
 
246 257
 CStdString CGUIDialogVideoSettings::FormatInteger(float value, float minimum)
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.