diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-08-14 00:47:29 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-08-14 00:47:29 +0000 |
| commit | beafede6f7fa361e990ab06fe48a91680dd4c76d (patch) | |
| tree | 721a0a648152ad1f2bafa5ff1ccdf27d5c7b176d | |
| parent | d310056a1a1dc1305735178bc57b499001e92b4d (diff) | |
| download | pcsxr-beafede6f7fa361e990ab06fe48a91680dd4c76d.tar.gz | |
dfxvideo: fixed hq2x/hq3x under windows (was an issue introduced by me).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@56090 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rw-r--r-- | ChangeLog | 13 | ||||
| -rw-r--r-- | plugins/dfxvideo/draw.c | 108 | ||||
| -rw-r--r-- | plugins/dfxvideo/hq2x.h | 48 | ||||
| -rw-r--r-- | plugins/dfxvideo/hq3x.h | 55 | ||||
| -rw-r--r-- | win32/plugins/dfxvideo/winsrc/draw.c | 170 |
5 files changed, 267 insertions, 127 deletions
@@ -1,12 +1,9 @@ -August 14, 2010 edgbla <edgbla@yandex.ru>
+August 14, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
- * gui/Plugin.c: Added gpu busy interface.
- * macosx/Plugin.c: Likewise.
- * win32/gui/plugin.c: Likewise.
- * libpcsxcore/r3000a.c: Likewise.
- * libpcsxcore/r3000a.h: Likewise.
- * libpcsxcore/plugins.c: Likewise.
- * libpcsxcore/plugins.h: Likewise.
+ * plugins/dfxvideo/draw.c: Fixed hq2x/hq3x under Windows.
+ * plugins/dfxvideo/hq2x.h: Likewise.
+ * plugins/dfxvideo/hq3x.h: Likewise.
+ * win32/plugins/dfxvideo/draw.c: Likewise.
August 13, 2010 Wei Mingzhi <whistler_wmz@users.sf.net>
diff --git a/plugins/dfxvideo/draw.c b/plugins/dfxvideo/draw.c index fe7f87a6..a94a892b 100644 --- a/plugins/dfxvideo/draw.c +++ b/plugins/dfxvideo/draw.c @@ -1897,11 +1897,55 @@ static void hq2x_32_def(uint32_t * dst0, uint32_t * dst1, const uint32_t * src0, mask |= cache_vert_mask[i] << 5; // << 1 << 5 == << 6 mask |= interp_32_diff(c[8], c[4]) << 7; - +#define P0 dst0[0]
+#define P1 dst0[1]
+#define P2 dst1[0]
+#define P3 dst1[1]
+#define MUR interp_32_diff(c[1], c[5])
+#define MDR interp_32_diff(c[5], c[7])
+#define MDL interp_32_diff(c[7], c[3])
+#define MUL interp_32_diff(c[3], c[1])
+#define IC(p0) c[p0]
+#define I11(p0,p1) interp_32_11(c[p0], c[p1])
+#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2])
+#define I31(p0,p1) interp_32_31(c[p0], c[p1])
+#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2])
+#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2])
+#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2])
+#define I53(p0,p1) interp_32_53(c[p0], c[p1])
+#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2])
+#define I71(p0,p1) interp_32_71(c[p0], c[p1])
+#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2])
+#define I97(p0,p1) interp_32_97(c[p0], c[p1])
+#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2])
+#define I151(p0,p1) interp_32_151(c[p0], c[p1])
+
switch (mask) { #include "hq2x.h" - } - + }
+ +#undef P0
+#undef P1
+#undef P2
+#undef P3
+#undef MUR
+#undef MDR
+#undef MDL
+#undef MUL
+#undef IC
+#undef I11
+#undef I211
+#undef I31
+#undef I332
+#undef I431
+#undef I521
+#undef I53
+#undef I611
+#undef I71
+#undef I772
+#undef I97
+#undef I1411
+#undef I151 src0 += 1; src1 += 1; @@ -1993,10 +2037,66 @@ static void hq3x_32_def(uint32_t* dst0, uint32_t* dst1, uint32_t* dst2, const cache_vert_mask[i] = interp_32_diff(c[7], c[4]) << 1; mask |= cache_vert_mask[i] << 5; // << 1 << 5 == << 6 mask |= interp_32_diff(c[8], c[4]) << 7; +
+#define P0 dst0[0]
+#define P1 dst0[1]
+#define P2 dst0[2]
+#define P3 dst1[0]
+#define P4 dst1[1]
+#define P5 dst1[2]
+#define P6 dst2[0]
+#define P7 dst2[1]
+#define P8 dst2[2]
+#define MUR interp_32_diff(c[1], c[5])
+#define MDR interp_32_diff(c[5], c[7])
+#define MDL interp_32_diff(c[7], c[3])
+#define MUL interp_32_diff(c[3], c[1])
+#define IC(p0) c[p0]
+#define I11(p0,p1) interp_32_11(c[p0], c[p1])
+#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2])
+#define I31(p0,p1) interp_32_31(c[p0], c[p1])
+#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2])
+#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2])
+#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2])
+#define I53(p0,p1) interp_32_53(c[p0], c[p1])
+#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2])
+#define I71(p0,p1) interp_32_71(c[p0], c[p1])
+#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2])
+#define I97(p0,p1) interp_32_97(c[p0], c[p1])
+#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2])
+#define I151(p0,p1) interp_32_151(c[p0], c[p1])
switch (mask) { #include "hq3x.h" - } + }
+ +#undef P0
+#undef P1
+#undef P2
+#undef P3
+#undef P4
+#undef P5
+#undef P6
+#undef P7
+#undef P8
+#undef MUR
+#undef MDR
+#undef MDL
+#undef MUL
+#undef IC
+#undef I11
+#undef I211
+#undef I31
+#undef I332
+#undef I431
+#undef I521
+#undef I53
+#undef I611
+#undef I71
+#undef I772
+#undef I97
+#undef I1411
+#undef I151
src0 += 1; src1 += 1; diff --git a/plugins/dfxvideo/hq2x.h b/plugins/dfxvideo/hq2x.h index e69b8e1a..7c6097b7 100644 --- a/plugins/dfxvideo/hq2x.h +++ b/plugins/dfxvideo/hq2x.h @@ -1,26 +1,3 @@ -#define P0 dst0[0] -#define P1 dst0[1] -#define P2 dst1[0] -#define P3 dst1[1] -#define MUR interp_32_diff(c[1], c[5]) -#define MDR interp_32_diff(c[5], c[7]) -#define MDL interp_32_diff(c[7], c[3]) -#define MUL interp_32_diff(c[3], c[1]) -#define IC(p0) c[p0] -#define I11(p0,p1) interp_32_11(c[p0], c[p1]) -#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2]) -#define I31(p0,p1) interp_32_31(c[p0], c[p1]) -#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2]) -#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2]) -#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2]) -#define I53(p0,p1) interp_32_53(c[p0], c[p1]) -#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2]) -#define I71(p0,p1) interp_32_71(c[p0], c[p1]) -#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2]) -#define I97(p0,p1) interp_32_97(c[p0], c[p1]) -#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2]) -#define I151(p0,p1) interp_32_151(c[p0], c[p1]) - case 0 : case 1 : case 4 : @@ -1844,27 +1821,4 @@ case 255 : } else { P1 = I1411(4, 1, 5); } -} break; - -#undef P0 -#undef P1 -#undef P2 -#undef P3 -#undef MUR -#undef MDR -#undef MDL -#undef MUL -#undef IC -#undef I11 -#undef I211 -#undef I31 -#undef I332 -#undef I431 -#undef I521 -#undef I53 -#undef I611 -#undef I71 -#undef I772 -#undef I97 -#undef I1411 -#undef I151 +} break;
diff --git a/plugins/dfxvideo/hq3x.h b/plugins/dfxvideo/hq3x.h index 4809b794..b4e3cee0 100644 --- a/plugins/dfxvideo/hq3x.h +++ b/plugins/dfxvideo/hq3x.h @@ -32,34 +32,6 @@ * This effect is a rewritten implementation of the hq effect made by Maxim Stepin */ -#define P0 dst0[0] -#define P1 dst0[1] -#define P2 dst0[2] -#define P3 dst1[0] -#define P4 dst1[1] -#define P5 dst1[2] -#define P6 dst2[0] -#define P7 dst2[1] -#define P8 dst2[2] -#define MUR interp_32_diff(c[1], c[5]) -#define MDR interp_32_diff(c[5], c[7]) -#define MDL interp_32_diff(c[7], c[3]) -#define MUL interp_32_diff(c[3], c[1]) -#define IC(p0) c[p0] -#define I11(p0,p1) interp_32_11(c[p0], c[p1]) -#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2]) -#define I31(p0,p1) interp_32_31(c[p0], c[p1]) -#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2]) -#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2]) -#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2]) -#define I53(p0,p1) interp_32_53(c[p0], c[p1]) -#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2]) -#define I71(p0,p1) interp_32_71(c[p0], c[p1]) -#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2]) -#define I97(p0,p1) interp_32_97(c[p0], c[p1]) -#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2]) -#define I151(p0,p1) interp_32_151(c[p0], c[p1]) - case 0 : case 1 : case 4 : @@ -2941,30 +2913,3 @@ if (MUR) { } } break; -#undef P0 -#undef P1 -#undef P2 -#undef P3 -#undef P4 -#undef P5 -#undef P6 -#undef P7 -#undef P8 -#undef MUR -#undef MDR -#undef MDL -#undef MUL -#undef IC -#undef I11 -#undef I211 -#undef I31 -#undef I332 -#undef I431 -#undef I521 -#undef I53 -#undef I611 -#undef I71 -#undef I772 -#undef I97 -#undef I1411 -#undef I151 diff --git a/win32/plugins/dfxvideo/winsrc/draw.c b/win32/plugins/dfxvideo/winsrc/draw.c index ecd0e23c..7fd2b365 100644 --- a/win32/plugins/dfxvideo/winsrc/draw.c +++ b/win32/plugins/dfxvideo/winsrc/draw.c @@ -4357,9 +4357,55 @@ static void hq2x_16_def(unsigned short* dst0, unsigned short* dst1, const unsign if (interp_16_diff(c[8], c[4])) mask |= 1 << 7; - switch (mask) { -#include "hq2x.h" - } +#define P0 dst0[0]
+#define P1 dst0[1]
+#define P2 dst1[0]
+#define P3 dst1[1]
+#define MUR interp_16_diff(c[1], c[5])
+#define MDR interp_16_diff(c[5], c[7])
+#define MDL interp_16_diff(c[7], c[3])
+#define MUL interp_16_diff(c[3], c[1])
+#define IC(p0) c[p0]
+#define I11(p0,p1) interp_16_11(c[p0], c[p1])
+#define I211(p0,p1,p2) interp_16_211(c[p0], c[p1], c[p2])
+#define I31(p0,p1) interp_16_31(c[p0], c[p1])
+#define I332(p0,p1,p2) interp_16_332(c[p0], c[p1], c[p2])
+#define I431(p0,p1,p2) interp_16_431(c[p0], c[p1], c[p2])
+#define I521(p0,p1,p2) interp_16_521(c[p0], c[p1], c[p2])
+#define I53(p0,p1) interp_16_53(c[p0], c[p1])
+#define I611(p0,p1,p2) interp_16_611(c[p0], c[p1], c[p2])
+#define I71(p0,p1) interp_16_71(c[p0], c[p1])
+#define I772(p0,p1,p2) interp_16_772(c[p0], c[p1], c[p2])
+#define I97(p0,p1) interp_16_97(c[p0], c[p1])
+#define I1411(p0,p1,p2) interp_16_1411(c[p0], c[p1], c[p2])
+#define I151(p0,p1) interp_16_151(c[p0], c[p1])
+
+ switch (mask) {
+#include "hq2x.h"
+ }
+
+#undef P0
+#undef P1
+#undef P2
+#undef P3
+#undef MUR
+#undef MDR
+#undef MDL
+#undef MUL
+#undef IC
+#undef I11
+#undef I211
+#undef I31
+#undef I332
+#undef I431
+#undef I521
+#undef I53
+#undef I611
+#undef I71
+#undef I772
+#undef I97
+#undef I1411
+#undef I151 src0 += 1; src1 += 1; @@ -4371,8 +4417,6 @@ static void hq2x_16_def(unsigned short* dst0, unsigned short* dst1, const unsign void hq2x( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, int width, int height) { - - //const int srcpitch = srcPitch; const int dstPitch = srcPitch; int count = height; @@ -4455,9 +4499,55 @@ static void hq2x_32_def(unsigned long * dst0, unsigned long * dst1, const unsign if (interp_32_diff(c[8], c[4])) mask |= 1 << 7; - switch (mask) { -#include "hq2x.h" - } +#define P0 dst0[0]
+#define P1 dst0[1]
+#define P2 dst1[0]
+#define P3 dst1[1]
+#define MUR interp_32_diff(c[1], c[5])
+#define MDR interp_32_diff(c[5], c[7])
+#define MDL interp_32_diff(c[7], c[3])
+#define MUL interp_32_diff(c[3], c[1])
+#define IC(p0) c[p0]
+#define I11(p0,p1) interp_32_11(c[p0], c[p1])
+#define I211(p0,p1,p2) interp_32_211(c[p0], c[p1], c[p2])
+#define I31(p0,p1) interp_32_31(c[p0], c[p1])
+#define I332(p0,p1,p2) interp_32_332(c[p0], c[p1], c[p2])
+#define I431(p0,p1,p2) interp_32_431(c[p0], c[p1], c[p2])
+#define I521(p0,p1,p2) interp_32_521(c[p0], c[p1], c[p2])
+#define I53(p0,p1) interp_32_53(c[p0], c[p1])
+#define I611(p0,p1,p2) interp_32_611(c[p0], c[p1], c[p2])
+#define I71(p0,p1) interp_32_71(c[p0], c[p1])
+#define I772(p0,p1,p2) interp_32_772(c[p0], c[p1], c[p2])
+#define I97(p0,p1) interp_32_97(c[p0], c[p1])
+#define I1411(p0,p1,p2) interp_32_1411(c[p0], c[p1], c[p2])
+#define I151(p0,p1) interp_32_151(c[p0], c[p1])
+
+ switch (mask) {
+#include "hq2x.h"
+ }
+
+#undef P0
+#undef P1
+#undef P2
+#undef P3
+#undef MUR
+#undef MDR
+#undef MDL
+#undef MUL
+#undef IC
+#undef I11
+#undef I211
+#undef I31
+#undef I332
+#undef I431
+#undef I521
+#undef I53
+#undef I611
+#undef I71
+#undef I772
+#undef I97
+#undef I1411
+#undef I151
src0 += 1; src1 += 1; @@ -4502,7 +4592,6 @@ void hq2x_32( unsigned char * srcPtr, DWORD srcPitch, unsigned char * dstPtr, i static void hq3x_32_def(unsigned long* dst0, unsigned long* dst1, unsigned long* dst2, const unsigned long* src0, const unsigned long* src1, const unsigned long* src2, unsigned count) { - unsigned i; for(i=0;i<count;++i) { @@ -4585,7 +4674,6 @@ static void hq3x_32_def(unsigned long* dst0, unsigned long* dst1, unsigned lon #include "hq3x.h" } - #undef P0 #undef P1 #undef P2 @@ -4715,9 +4803,65 @@ static void hq3x_16_def(unsigned short* dst0, unsigned short* dst1, unsigned sho if (interp_16_diff(c[8], c[4])) mask |= 1 << 7; - switch (mask) { - #include "hq3x.h" - } +#define P0 dst0[0]
+#define P1 dst0[1]
+#define P2 dst0[2]
+#define P3 dst1[0]
+#define P4 dst1[1]
+#define P5 dst1[2]
+#define P6 dst2[0]
+#define P7 dst2[1]
+#define P8 dst2[2]
+#define MUR interp_16_diff(c[1], c[5])
+#define MDR interp_16_diff(c[5], c[7])
+#define MDL interp_16_diff(c[7], c[3])
+#define MUL interp_16_diff(c[3], c[1])
+#define IC(p0) c[p0]
+#define I11(p0,p1) interp_16_11(c[p0], c[p1])
+#define I211(p0,p1,p2) interp_16_211(c[p0], c[p1], c[p2])
+#define I31(p0,p1) interp_16_31(c[p0], c[p1])
+#define I332(p0,p1,p2) interp_16_332(c[p0], c[p1], c[p2])
+#define I431(p0,p1,p2) interp_16_431(c[p0], c[p1], c[p2])
+#define I521(p0,p1,p2) interp_16_521(c[p0], c[p1], c[p2])
+#define I53(p0,p1) interp_16_53(c[p0], c[p1])
+#define I611(p0,p1,p2) interp_16_611(c[p0], c[p1], c[p2])
+#define I71(p0,p1) interp_16_71(c[p0], c[p1])
+#define I772(p0,p1,p2) interp_16_772(c[p0], c[p1], c[p2])
+#define I97(p0,p1) interp_16_97(c[p0], c[p1])
+#define I1411(p0,p1,p2) interp_16_1411(c[p0], c[p1], c[p2])
+#define I151(p0,p1) interp_16_151(c[p0], c[p1])
+
+ switch (mask) {
+#include "hq3x.h"
+ }
+
+#undef P0
+#undef P1
+#undef P2
+#undef P3
+#undef P4
+#undef P5
+#undef P6
+#undef P7
+#undef P8
+#undef MUR
+#undef MDR
+#undef MDL
+#undef MUL
+#undef IC
+#undef I11
+#undef I211
+#undef I31
+#undef I332
+#undef I431
+#undef I521
+#undef I53
+#undef I611
+#undef I71
+#undef I772
+#undef I97
+#undef I1411
+#undef I151
src0 += 1; src1 += 1; |
