Fixed the HQ3x and HQ4x filters by forcing 32bit output. Hooked up the zBRZ filter in the wx build.

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1369 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
skidau 2015-04-28 12:19:15 +00:00
parent 6f85e29631
commit 4797211210
5 changed files with 25 additions and 26 deletions

View File

@ -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 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
void InterframeCleanup();
// all 4 are MMX-accelerated if enabled

View File

@ -133,7 +133,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|xbrz|plugin")),
L"simple2x|simple3x|hq3x|simple4x|hq4x|xbrz2x|xbrz3x|xbrz4x|xbrz5x|plugin")),
STROPT ("Display/FilterPlugin", wxTRANSLATE("Filter plugin library"), gopts.filter_plugin),
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),

View File

@ -1037,15 +1037,6 @@ DrawingPanel::DrawingPanel(int _width, int _height) :
} while(0);
} else {
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)
systemColorDepth = 32;
}
@ -1230,21 +1221,23 @@ public:
hq2x32(src, instride, delta, dst, outstride, width, height);
break;
case FF_HQ3X:
hq3x32(src, instride, delta, dst, outstride, width, height);
hq3x32_32(src, instride, delta, dst, outstride, width, height);
break;
case FF_HQ4X:
hq4x32(src, instride, delta, dst, outstride, width, height);
hq4x32_32(src, instride, delta, dst, outstride, width, height);
break;
/* Placeholder for xbrz support
case FF_XBRZ2X:
break;
xbrz2x32(src, instride, delta, dst, outstride, width, height);
break;
case FF_XBRZ3X:
break;
xbrz3x32(src, instride, delta, dst, outstride, width, height);
break;
case FF_XBRZ4X:
break;
xbrz4x32(src, instride, delta, dst, outstride, width, height);
break;
case FF_XBRZ5X:
break;
*/
xbrz5x32(src, instride, delta, dst, outstride, width, height);
break;
case FF_PLUGIN:
// MFC interface did not do plugins in parallel
// Probably because it's almost certain they carry state or do

View File

@ -309,11 +309,12 @@ 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_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) \
((x == FF_HQ4X || x == FF_SIMPLE4X) ? 4 : \
(x == FF_HQ3X || x == FF_SIMPLE3X) ? 3 : \
((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)
enum ifbfunc {

View File

@ -280,15 +280,15 @@
<item>TV Mode</item>
<item>HQ 2x</item>
<item>LQ 2x</item>
<item>Simple 2X</item>
<item>Simple 2x</item>
<item>Simple 3x</item>
<item>HQ 3x</item>
<item>Simple 4x</item>
<item>HQ 4x</item>
<item>XBRz 2x (note: Not available yet)</item>
<item>XBRz 3x (note: Not available yet)</item>
<item>XBRz 4x (note: Not available yet)</item>
<item>XBRz 5x (note: Not available yet)</item>
<item>xBRZ 2x</item>
<item>xBRZ 3x</item>
<item>xBRZ 4x</item>
<item>xBRZ 5x</item>
<item>Plugin</item>
</content>
</object>