From 68e67b7269018103e48fb6819eabcef599dac76c Mon Sep 17 00:00:00 2001
From: DoctorWho11 <11doctorwhocanada@gmail.com>
Date: Sat, 19 Sep 2015 04:08:13 -0400
Subject: [PATCH] added xbrz 6x support to the wxwidgets interface, will take
care of the gtk end shortly.
---
src/wx/filters.h | 1 +
src/wx/opts.cpp | 2 +-
src/wx/panel.cpp | 4 ++++
src/wx/wxvbam.h | 5 +++--
src/wx/xrc/DisplayConfig.xrc | 1 +
5 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/wx/filters.h b/src/wx/filters.h
index 1018a0a7..69694adb 100644
--- a/src/wx/filters.h
+++ b/src/wx/filters.h
@@ -66,6 +66,7 @@ void xbrz2x32(u8* src, u32 spitch, u8*, u8* dst, u32 dstp, int w, int h);
void xbrz3x32(u8* src, u32 spitch, u8*, u8* dst, u32 dstp, int w, int h);
void xbrz4x32(u8* src, u32 spitch, u8*, u8* dst, u32 dstp, int w, int h);
void xbrz5x32(u8* src, u32 spitch, u8*, u8* dst, u32 dstp, int w, int h);
+void xbrz6x32(u8* src, u32 spitch, u8*, u8* dst, u32 dstp, int w, int h);
// call ifc to ignore previous frame / when starting new
void InterframeCleanup();
diff --git a/src/wx/opts.cpp b/src/wx/opts.cpp
index c683e74d..7ea9bc57 100644
--- a/src/wx/opts.cpp
+++ b/src/wx/opts.cpp
@@ -138,7 +138,7 @@ opt_desc opts[] =
ENUMOPT("Display/Filter", "", wxTRANSLATE("Full-screen filter to apply"), gopts.filter,
wxTRANSLATE("none|2xsai|super2xsai|supereagle|pixelate|advmame|"
L"bilinear|bilinearplus|scanlines|tvmode|hq2x|lq2x|"
- L"simple2x|simple3x|hq3x|simple4x|hq4x|xbrz2x|xbrz3x|xbrz4x|xbrz5x|plugin")),
+ L"simple2x|simple3x|hq3x|simple4x|hq4x|xbrz2x|xbrz3x|xbrz4x|xbrz5x|xbrz6x|plugin")),
STROPT("Display/FilterPlugin", "", wxTRANSLATE("Filter plugin library"), gopts.filter_plugin),
ENUMOPT("Display/IFB", "", wxTRANSLATE("Interframe blending function"), gopts.ifb, wxTRANSLATE("none|smart|motionblur")),
BOOLOPT("Display/KeepOnTop", "KeepOnTop", wxTRANSLATE("Keep window on top"), gopts.keep_on_top),
diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp
index 607bfb32..748a68f6 100644
--- a/src/wx/panel.cpp
+++ b/src/wx/panel.cpp
@@ -1652,6 +1652,10 @@ public:
case FF_XBRZ5X:
xbrz5x32(src, instride, delta, dst, outstride, width, height);
break;
+
+ case FF_XBRZ6X:
+ xbrz6x32(src, instride, delta, dst, outstride, width, height);
+ break;
case FF_PLUGIN:
// MFC interface did not do plugins in parallel
diff --git a/src/wx/wxvbam.h b/src/wx/wxvbam.h
index 28e8b0ae..102fd70e 100644
--- a/src/wx/wxvbam.h
+++ b/src/wx/wxvbam.h
@@ -345,10 +345,11 @@ enum filtfunc
FF_NONE, FF_2XSAI, FF_SUPER2XSAI, FF_SUPEREAGLE, FF_PIXELATE,
FF_ADVMAME, FF_BILINEAR, FF_BILINEARPLUS, FF_SCANLINES, FF_TV,
FF_HQ2X, FF_LQ2X, FF_SIMPLE2X, FF_SIMPLE3X, FF_HQ3X, FF_SIMPLE4X,
- FF_HQ4X, FF_XBRZ2X, FF_XBRZ3X, FF_XBRZ4X, FF_XBRZ5X, FF_PLUGIN // plugin must always be last
+ FF_HQ4X, FF_XBRZ2X, FF_XBRZ3X, FF_XBRZ4X, FF_XBRZ5X, FF_XBRZ6X, FF_PLUGIN // plugin must always be last
};
#define builtin_ff_scale(x) \
- ((x == FF_XBRZ5X) ? 5 : \
+ ((x == FF_XBRZ6X) ? 6 : \
+ (x == FF_XBRZ5X) ? 5 : \
(x == FF_XBRZ4X || x == FF_HQ4X || x == FF_SIMPLE4X) ? 4 : \
(x == FF_XBRZ3X || x == FF_HQ3X || x == FF_SIMPLE3X) ? 3 : \
x == FF_PLUGIN ? 0 : x == FF_NONE ? 1 : 2)
diff --git a/src/wx/xrc/DisplayConfig.xrc b/src/wx/xrc/DisplayConfig.xrc
index 4450d871..9a5b0a7b 100644
--- a/src/wx/xrc/DisplayConfig.xrc
+++ b/src/wx/xrc/DisplayConfig.xrc
@@ -239,6 +239,7 @@
- xBRZ 3x
- xBRZ 4x
- xBRZ 5x
+ - xBRZ 6x
- Plugin