diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-06-26 01:06:10 +0300 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-07-01 21:45:43 +0300 |
commit | ccd31896bc2f1f323b3be9e8b1447cab892ee62d (patch) | |
tree | 2857dd43c40fc1157b376cdd9104205667f23d88 /test | |
parent | ad9f1d020188fe90ae742041195baebdfbe6fe27 (diff) |
Bilinear interpolation precision is now configurable at compile time
Macro BILINEAR_INTERPOLATION_BITS in pixman-private.h selects
the number of fractional bits used for bilinear interpolation.
scaling-test and affine-test have checksums for 4-bit, 7-bit
and 8-bit configurations.
Diffstat (limited to 'test')
-rw-r--r-- | test/affine-test.c | 12 | ||||
-rw-r--r-- | test/scaling-test.c | 12 |
2 files changed, 22 insertions, 2 deletions
diff --git a/test/affine-test.c b/test/affine-test.c index a4ceed3..6827cc3 100644 --- a/test/affine-test.c +++ b/test/affine-test.c @@ -301,11 +301,21 @@ test_composite (int testnum, return crc32; } +#if BILINEAR_INTERPOLATION_BITS == 8 +#define CHECKSUM 0x1EF2175A +#elif BILINEAR_INTERPOLATION_BITS == 7 +#define CHECKSUM 0x74050F50 +#elif BILINEAR_INTERPOLATION_BITS == 4 +#define CHECKSUM 0x4362EAE8 +#else +#define CHECKSUM 0x00000000 +#endif + int main (int argc, const char *argv[]) { pixman_disable_out_of_bounds_workaround (); - return fuzzer_test_main ("affine", 8000000, 0x1EF2175A, + return fuzzer_test_main ("affine", 8000000, CHECKSUM, test_composite, argc, argv); } diff --git a/test/scaling-test.c b/test/scaling-test.c index 6f2da14..44c4f3d 100644 --- a/test/scaling-test.c +++ b/test/scaling-test.c @@ -357,11 +357,21 @@ test_composite (int testnum, return crc32; } +#if BILINEAR_INTERPOLATION_BITS == 8 +#define CHECKSUM 0x80DF1CB2 +#elif BILINEAR_INTERPOLATION_BITS == 7 +#define CHECKSUM 0x2818D5FB +#elif BILINEAR_INTERPOLATION_BITS == 4 +#define CHECKSUM 0x387540A5 +#else +#define CHECKSUM 0x00000000 +#endif + int main (int argc, const char *argv[]) { pixman_disable_out_of_bounds_workaround (); - return fuzzer_test_main("scaling", 8000000, 0x80DF1CB2, + return fuzzer_test_main("scaling", 8000000, CHECKSUM, test_composite, argc, argv); } |