Fixed the HQ3x and HQ4x filters by forcing 32bit output. Hooked up the zBRZ filter in the wx build.
This commit is contained in:
parent
d9a87f7a3d
commit
003a67e17d
|
@ -62,6 +62,11 @@ void hq4x32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h);
|
||||||
void hq4x32_32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h);
|
void hq4x32_32(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h);
|
||||||
void hq4x16(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h);
|
void hq4x16(u8 *src, u32 spitch, u8 *, u8 *dst, u32 dstp, int w, int h);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
// call ifc to ignore previous frame / when starting new
|
// call ifc to ignore previous frame / when starting new
|
||||||
void InterframeCleanup();
|
void InterframeCleanup();
|
||||||
// all 4 are MMX-accelerated if enabled
|
// all 4 are MMX-accelerated if enabled
|
||||||
|
|
|
@ -133,7 +133,7 @@ opt_desc opts[] = {
|
||||||
ENUMOPT("Display/Filter", wxTRANSLATE("Full-screen filter to apply"), gopts.filter,
|
ENUMOPT("Display/Filter", wxTRANSLATE("Full-screen filter to apply"), gopts.filter,
|
||||||
wxTRANSLATE("none|2xsai|super2xsai|supereagle|pixelate|advmame|"
|
wxTRANSLATE("none|2xsai|super2xsai|supereagle|pixelate|advmame|"
|
||||||
L"bilinear|bilinearplus|scanlines|tvmode|hq2x|lq2x|"
|
L"bilinear|bilinearplus|scanlines|tvmode|hq2x|lq2x|"
|
||||||
L"simple2x|simple3x|hq3x|simple4x|hq4x|xbrz|plugin")),
|
L"simple2x|simple3x|hq3x|simple4x|hq4x|xbrz2x|xbrz3x|xbrz4x|xbrz5x|plugin")),
|
||||||
STROPT ("Display/FilterPlugin", wxTRANSLATE("Filter plugin library"), gopts.filter_plugin),
|
STROPT ("Display/FilterPlugin", wxTRANSLATE("Filter plugin library"), gopts.filter_plugin),
|
||||||
ENUMOPT("Display/IFB", wxTRANSLATE("Interframe blending function"), gopts.ifb, wxTRANSLATE("none|smart|motionblur")),
|
ENUMOPT("Display/IFB", wxTRANSLATE("Interframe blending function"), gopts.ifb, wxTRANSLATE("none|smart|motionblur")),
|
||||||
INTOPT ("Display/MaxThreads", wxTRANSLATE("Maximum number of threads to run filters in"), gopts.max_threads, 1, 8),
|
INTOPT ("Display/MaxThreads", wxTRANSLATE("Maximum number of threads to run filters in"), gopts.max_threads, 1, 8),
|
||||||
|
|
|
@ -1037,15 +1037,6 @@ DrawingPanel::DrawingPanel(int _width, int _height) :
|
||||||
} while(0);
|
} while(0);
|
||||||
} else {
|
} else {
|
||||||
scale = builtin_ff_scale(gopts.filter);
|
scale = builtin_ff_scale(gopts.filter);
|
||||||
#ifndef NO_ASM
|
|
||||||
// while there is a 32->16 frontend for these, it's probably more
|
|
||||||
// efficient to just use 16 to start with
|
|
||||||
// unfortunately, this also means that the 32-bit output needs to
|
|
||||||
// be sensed in lower code
|
|
||||||
if(gopts.filter == FF_HQ3X || gopts.filter == FF_HQ4X)
|
|
||||||
systemColorDepth = 16;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
#define out_16 (systemColorDepth == 16)
|
#define out_16 (systemColorDepth == 16)
|
||||||
systemColorDepth = 32;
|
systemColorDepth = 32;
|
||||||
}
|
}
|
||||||
|
@ -1230,21 +1221,23 @@ public:
|
||||||
hq2x32(src, instride, delta, dst, outstride, width, height);
|
hq2x32(src, instride, delta, dst, outstride, width, height);
|
||||||
break;
|
break;
|
||||||
case FF_HQ3X:
|
case FF_HQ3X:
|
||||||
hq3x32(src, instride, delta, dst, outstride, width, height);
|
hq3x32_32(src, instride, delta, dst, outstride, width, height);
|
||||||
break;
|
break;
|
||||||
case FF_HQ4X:
|
case FF_HQ4X:
|
||||||
hq4x32(src, instride, delta, dst, outstride, width, height);
|
hq4x32_32(src, instride, delta, dst, outstride, width, height);
|
||||||
break;
|
break;
|
||||||
/* Placeholder for xbrz support
|
|
||||||
case FF_XBRZ2X:
|
case FF_XBRZ2X:
|
||||||
break;
|
xbrz2x32(src, instride, delta, dst, outstride, width, height);
|
||||||
|
break;
|
||||||
case FF_XBRZ3X:
|
case FF_XBRZ3X:
|
||||||
break;
|
xbrz3x32(src, instride, delta, dst, outstride, width, height);
|
||||||
|
break;
|
||||||
case FF_XBRZ4X:
|
case FF_XBRZ4X:
|
||||||
break;
|
xbrz4x32(src, instride, delta, dst, outstride, width, height);
|
||||||
|
break;
|
||||||
case FF_XBRZ5X:
|
case FF_XBRZ5X:
|
||||||
break;
|
xbrz5x32(src, instride, delta, dst, outstride, width, height);
|
||||||
*/
|
break;
|
||||||
case FF_PLUGIN:
|
case FF_PLUGIN:
|
||||||
// MFC interface did not do plugins in parallel
|
// MFC interface did not do plugins in parallel
|
||||||
// Probably because it's almost certain they carry state or do
|
// Probably because it's almost certain they carry state or do
|
||||||
|
|
|
@ -309,11 +309,12 @@ enum filtfunc {
|
||||||
FF_NONE, FF_2XSAI, FF_SUPER2XSAI, FF_SUPEREAGLE, FF_PIXELATE,
|
FF_NONE, FF_2XSAI, FF_SUPER2XSAI, FF_SUPEREAGLE, FF_PIXELATE,
|
||||||
FF_ADVMAME, FF_BILINEAR, FF_BILINEARPLUS, FF_SCANLINES, FF_TV,
|
FF_ADVMAME, FF_BILINEAR, FF_BILINEARPLUS, FF_SCANLINES, FF_TV,
|
||||||
FF_HQ2X, FF_LQ2X, FF_SIMPLE2X, FF_SIMPLE3X, FF_HQ3X, FF_SIMPLE4X,
|
FF_HQ2X, FF_LQ2X, FF_SIMPLE2X, FF_SIMPLE3X, FF_HQ3X, FF_SIMPLE4X,
|
||||||
FF_HQ4X, FF_PLUGIN // plugin must always be last
|
FF_HQ4X, FF_XBRZ2X, FF_XBRZ3X, FF_XBRZ4X, FF_XBRZ5X, FF_PLUGIN // plugin must always be last
|
||||||
};
|
};
|
||||||
#define builtin_ff_scale(x) \
|
#define builtin_ff_scale(x) \
|
||||||
((x == FF_HQ4X || x == FF_SIMPLE4X) ? 4 : \
|
((x == FF_XBRZ5X) ? 5 : \
|
||||||
(x == FF_HQ3X || x == FF_SIMPLE3X) ? 3 : \
|
(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)
|
x == FF_PLUGIN ? 0 : x == FF_NONE ? 1 : 2)
|
||||||
|
|
||||||
enum ifbfunc {
|
enum ifbfunc {
|
||||||
|
|
|
@ -280,15 +280,15 @@
|
||||||
<item>TV Mode</item>
|
<item>TV Mode</item>
|
||||||
<item>HQ 2x</item>
|
<item>HQ 2x</item>
|
||||||
<item>LQ 2x</item>
|
<item>LQ 2x</item>
|
||||||
<item>Simple 2X</item>
|
<item>Simple 2x</item>
|
||||||
<item>Simple 3x</item>
|
<item>Simple 3x</item>
|
||||||
<item>HQ 3x</item>
|
<item>HQ 3x</item>
|
||||||
<item>Simple 4x</item>
|
<item>Simple 4x</item>
|
||||||
<item>HQ 4x</item>
|
<item>HQ 4x</item>
|
||||||
<item>XBRz 2x (note: Not available yet)</item>
|
<item>xBRZ 2x</item>
|
||||||
<item>XBRz 3x (note: Not available yet)</item>
|
<item>xBRZ 3x</item>
|
||||||
<item>XBRz 4x (note: Not available yet)</item>
|
<item>xBRZ 4x</item>
|
||||||
<item>XBRz 5x (note: Not available yet)</item>
|
<item>xBRZ 5x</item>
|
||||||
<item>Plugin</item>
|
<item>Plugin</item>
|
||||||
</content>
|
</content>
|
||||||
</object>
|
</object>
|
||||||
|
|
Loading…
Reference in New Issue