Siarhei Siamashka
4fc0f9dd45
HACK: updated test to better cover new neon optimizations
2009-08-08 18:50:41 -04:00
Siarhei Siamashka
67769ad5bf
Test program for stressing the use of different formats and operators
...
The code and overall method is mostly based on scaling-test. This one
focuses on trying to stress as many different color formats and types
of composition operations as possible.
This is an initial implementation which may need more tuning. Also
not all color format and operator combinations are actually used.
When cpu specific optimizations are disabled, this test provides
identical deterministic results on x86, PPC and ARM.
Script blitters-test-bisect.rb now works in non-stop mode, until
it finds any problem. This allows to run it for example overnight
in order to test a lot more variants of pixman calls and increase
chances of detecting problems in pixman. Just like with scaling-test,
running blitters-test binary alone with no command line arguments
runs a small predefined number of tests and compares checksum
with a reference value for quick verification.
2009-08-08 18:50:41 -04:00
Søren Sandmann Pedersen
51f597ad32
Delete commented out code in pixman-vmx.c
2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
a590eabead
Misc formatting fixes for pixman-vmx.c
2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
0ebb587e24
In vmx_combine_atop_reverse_ca() extract alpha after inversing
2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
3d2f00783f
Really fix vmx_combine_over_reverse_ca()
...
The inverse destination alpha is just one component, not four.
2009-08-08 18:50:19 -04:00
Søren Sandmann Pedersen
2f62a4f46c
Fix vmx_combine_out_reverse_ca()
...
The source alpha is just one component, not four.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
7e58323385
Fix vmx_over_reverse_ca()
...
Destination alpha must be extracted after inversing, otherwise we end
up with 0xFFs in the rgb channels.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
2382bd9e27
Multiply with the alpha of dest, not inverse alpha
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
498df0f0bf
Fix vmx_combine_vmx_atop_ca()
...
It didn't compute the mask correct before.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
9650cd7432
Fix vmx_combine_over_ca().
...
In the non-vector code, the mask needs to be multiplied with source
alpha.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
38b9589fe6
In vmx_combine_out_ca() multiply with the alpha of the negated vdest.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
de180baba3
Fix vmx_combine_out_ca()
...
It should multiply with just the destination alpha channel, not all
four channels.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
5191421d1f
Do the full four-component IN computation in vmx_combine_in_ca().
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
27fb8378fd
Fix bug in vmx_combine_xor_ca()
...
The destination needs to be inverted before the alpha channel is
extracted; otherwise, the RGB channels of da will be 0xff.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
c750667d7a
Make pix_multiply bit-exact
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
6243a0a015
Change the SSE2 versions of pix_add_multiply() to produce bit-exact results.
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
404f4a6f3e
Fix a couple of alpha==0 vs src==0 issues in pixman-sse2.c
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
d9f80370a4
Rename mmx_composite_add_8888_8_8() to mmx_composite_add_n_8_8().
2009-08-08 18:50:18 -04:00
Søren Sandmann Pedersen
04619c3636
Fix a couple more alpha==0 vs src==0 bugs in pixman-mmx.c
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
a075a870fd
Make pix_add_mul() in pixman-mmx.c produce exact results.
...
Previously this routine would compute (x * a + y * b) / 255. Now it
computes (x * a) / 255 + (y * b) / 255, so that the results are
bitwise equivalent to the non-mmx versions.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
f7463ffafb
Rewrite the two-component arithmetic macros.
...
Previously they were not bit-for-bit equivalent to the one-component
versions. The new code is also simpler and easier to read because it
factors out some common sub-macros.
The x * a + y * b macro now only uses four multiplications - the
previous version used eight.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
04ae08992f
Fix a bunch of srca == 0 checks that should be src == 0 in pixman-mmx.c
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
8bb58a3ce8
Don't run fast paths if the format requires wide compositing.
...
This could happen because the wide formats would still be considered
solid if the image was 1x1 and repeating.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
d937b62238
Fix bug in combine_mask_alpha_ca()
...
If the mask was 0xffffffff, the source would end up being shifted
twice by A_SHIFT.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
0d576b965c
Fix another case of changing the solid source.
...
This time in fast_path_composite_n_8888_8888().
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
8b82cbb691
Fix incorrect optimization in combine_over_ca().
...
Previously the code assumed that an alpha of 0 meant that no change
would take place. This is incorrect because an alpha of 0 can happen
as the result of the source having alpha=0, but rgb != 0.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
ec8b36f010
Don't change the constant source in fast_composite_over_n_8888_0565.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
de8fff746b
Fix bugs in combine_over_reverse_ca().
...
The computation cannot be optimized away when alpha is 0 because that
can happen when the source has alpha zero and rgb non-zero.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
7b1df41b61
Add a dirty bit to the image struct, and validate before using the image.
...
This cuts down the number of property_changed calls significantly.
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
942c4ac282
Add sse2 version of add_n_8888_8888()
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
23d3820116
Add a fast path for the add_n_8888_8888() operation.
...
It shows up on gnome-terminal traces.
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
c606a05213
Move bounds checks for REPEAT_NONE to get_pixel()
...
On a P4, this is a large speedup for the swfdec-fill-rate-2xaa trace:
After:
[ # ] backend test min(s) median(s) stddev. count
[ 0] image swfdec-fill-rate-2xaa 33.061 33.061 0.00% 1/1
Before:
[ # ] backend test min(s) median(s) stddev. count
[ 0] image swfdec-fill-rate-2xaa 40.342 40.342 0.00% 1/1
Pixman 0.14.0 produces this:
[ # ] backend test min(s) median(s) stddev. count
[ 0] image swfdec-fill-rate-2xaa 36.896 36.896 0.00% 1/1
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
1bec3e8395
Remove leftover 0xffffffff in repeat()
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
1b98166b01
Remove unused function
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
06836d35d2
Misc formatting
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
7c8959ea3b
Change all the fetch_pixels() functions to only fetch one pixel.
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
31096446b6
Add fetch_pixel_raw_32 and fetch_pixel_32 virtual functions.
...
By default both are intialized to bits_image_fetch_pixel_raw(), but if
there is an alpha map, then fetch_pixel_32() is set to
bits_image_fetch_pixel_alpha().
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
a233b332cd
Various renamings and clean-ups
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
073399b09f
Change bits_image_fetch_alpha_pixels() to fetch just one pixel.
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
6d1dfc3945
Change bits_image_fetch_pixels_convolution() to fetch just one pixel.
2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
b3f849f74f
Change bits_image_fetch_bilinear_pixels() to fetch one pixel at a time.
2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
a37383a2c6
Make the repeat routine work on only one coordinate at a time.
2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
a4f3fd3b25
Make bits_image_fetch_nearest() return one pixel.
...
Previously it would work on a buffer of coordinates.
2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
f382865ebe
Change bits_image_fetch_transformed() to work one pixel at a time.
...
Previously, it would generate a buffer of coordinates, then pass that
off to a pixel fetcher, but this caused a large performance regression
with the swfdec-fill-rate-2xfsaa cairo trace.
This is the first step towards fixing that.
2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
4ef2807c3a
Only define PIXMAN_TIMERS if timers are actually enabled [bug 23169]
2009-08-07 00:11:20 -04:00
Søren Sandmann Pedersen
9dec2e352b
Various updates to the CODING_STYLE document
2009-07-28 09:58:52 -04:00
Søren Sandmann Pedersen
2abd56e9e3
Add a CODING_STYLE document based on the one from cairo.
2009-07-28 04:05:26 -04:00
Søren Sandmann Pedersen
fdd01bcbd4
Remove a couple of unused variables
2009-07-24 05:55:48 -04:00
Søren Sandmann Pedersen
845910c200
Rename source_pict_class_t to source_image_class_t
2009-07-24 05:55:48 -04:00