summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-07-07Add PIXMAN_y420planarBenjamin Otte10-15/+339
Contains code to make PIXMAN_yv12 fall back to PIXMAN_i420. Also introduces the idea of an intermediate rendering target. This is used by the y420 code to make subsampled rendering not look bad.
2010-07-07optimization: Allow fast paths for non-argbBenjamin Otte5-15/+29
The function _pixman_color_space_select_for_composite() selects the best colorspace for compositing operations. This is the destination's colorspace if the operator produces identical results as in ARGB or it is the ARGB colorspace. If dest, mask and source match the compositing colorspace, fast paths can be used even if that colorspace is not ARGB.
2010-07-07Add PIXMAN_y422Benjamin Otte4-1/+115
Included in this patch is the addition of ROUND_UP_X() macros, that round up integers to the next multiple of X.
2010-07-07Add pixman_format_is_opaque APIBenjamin Otte5-57/+70
This is supposed to replace usages of PIXMAN_FORMAT_A().
2010-07-07Add packed YUV formatsBenjamin Otte3-39/+176
YUY2, YVYU, UYVY and VYUY
2010-07-07Add Y444 formatBenjamin Otte4-5/+103
Also deprecates the old YUV formats
2010-07-07Select better color space for compositingBenjamin Otte1-10/+33
Instead of always compositing in ARGB, code can now select the best color space for compositing. This should be the destination color space unless the operator is not per-component or the ARGB-to-destination is nonlinear.
2010-07-07Make color space handling more advancedBenjamin Otte5-147/+298
Code now does not only provide to/from_argb functions, but instead returns a converter function. This converter function converts from the given source color space to the given target color space. Includes an implementation for YUV HD and SD, JPEG is still missing.
2010-07-07Add RGBA 32bit formatsBenjamin Otte3-1/+107
Provides endian-swapped ABGR, which is used in some applications
2010-07-07Add pixman_color_space_tBenjamin Otte10-91/+441
This differentiates pixel data from just having a format code to having a pixel layout - pixman_format_code_t - and color space - pixman_color_space_t. No new formats were added, only the option to create unmultiplied ARGB images exists now. In the future the general code path will look like this: Each colorspace provides a "canonical" format. pixman-access.c will provide accessors to read/write data from/to the image representation to the canonical format. Additional functions that convert between different color spaces will be added. These will be called from the generic store/fetch paths, so the accessors do not need to care about the color space. As a first step, compositing will still be done in ARGB, so the general path will look like this: src => fetch => convert \ > combine => convert => store => dest dest => fetch => convert / Benefits of this approach for adding more formats: - Minimal changes required to current code. With a simple check of the color space, all optimizations can continue working with a minimal performance impact. Even in the general case optimized store/fetch functions can be used. - Ease of optimization for common paths Common cases can be optimized easily. For example, Pixel-aligned rectangular fills with PIXMAN_OP_SRC and the same color space can be done with: src => fetch => store => dest and not a lot of code is required to do this. - Extensibility More color spaces can easily be added later, possibly even making use of the same accessors for data storage, i.e. linear RGB, more color matrices for YCbCr or even CMYK.
2010-07-07Move allocation of pixel data into format-specific part of codeBenjamin Otte3-85/+128
This is because planar formats have special requirements about how to allocate planes, as pixman wants to try to keep the format-specific requirements of Xv, FFmpeg and GStreamer when allocating the image memory itself.
2010-07-07Add accessors for data and stride of planar imagesBenjamin Otte2-4/+22
2010-07-07Add pixman_image_create_planar()Benjamin Otte4-6/+62
So far, this function just exposes the desired API. No planar formats exist that make use of it.
2010-07-07Add pixman_format_num_planes()Benjamin Otte2-1/+15
2010-07-07Split out format-relevant informationBenjamin Otte4-96/+149
Add a new file that carries relevant information for all the different format codes. Ideally this would be an array just indexed by format code, but that requires making pixman_format_code_t a simple enumeration. Also move pixman_format_supported_source/destination() into the relevant file.
2010-07-07Include stdio.h when compiling with DEBUG enabledBenjamin Otte1-0/+2
Compiling fails otherwise as the debug code uses fprintf
2010-06-24Store the conical angle in floating point radians, not fixed point degreesSøren Sandmann Pedersen2-5/+7
This is a slight simplification.
2010-06-20Fix conical gradients to match QConicalGradient from QtSøren Sandmann Pedersen1-19/+32
Under the assumption that pixman gradients are supposed to match QConicalgradient, described here: http://doc.trolltech.com/4.4/qconicalgradient.html this patch fixes two separate bugs in pixman-conical-gradient.c. The first bug is that the output of atan2() is in the range of [-pi, pi], which means the parameter into the gradient can be negative. This is wrong since a QConicalGradient always interpolates around the center from 0 to 1. The fix for that is to (a) make sure the given angle is between 0 and 360, and (b) add or subtract 2 * M_PI if the computed angle ends up outside [0, 2 * pi]. The other bug is that we were interpolating clockwise, whereas QConicalGradient calls for a counter-clockwise interpolation. This is easily fixed by subtracting the parameter from 1. Finally, this patch encapsulates the computation in a new force-inline function so that it can be reused in both the affine and non-affine case.
2010-06-18Make separate gray scanline storers.Søren Sandmann Pedersen2-4/+38
For gray formats the palettes are indexed by luminance, not RGB, so we can't use the color storers for gray too.
2010-06-18When storing a g1 pixel, store the lowest bit, rather than comparing with 0.Søren Sandmann Pedersen2-2/+2
2010-06-09test: verify that gradients do not crash pixmanAndrea Canciani2-0/+119
Test gradients under particular conditions (no stops, all the stops at the same offset) to check that pixman does not misbehave.
2010-06-09support single-stop gradientsAndrea Canciani2-4/+0
Just like conical gradients, linear and radial gradients can now have a single stop.
2010-06-09Eliminate mask_bits from all the scanline fetchers.Søren Sandmann Pedersen9-144/+85
Back in the day, the mask_bits argument was used to distinguish between masks used for component alpha (where it was 0xffffffff) and masks for unified alpha (where it was 0xff000000). In this way, the fetchers could check if just the alpha channel was 0 and in that case avoid fetching the source. However, we haven't actually used it like that for a long time; it is currently always either 0xffffffff or 0 (if the mask is NULL). It also doesn't seem worthwhile resurrecting it because for premultiplied buffers, if alpha is 0, then so are the color channels normally. This patch eliminates the mask_bits and changes the fetchers to just assume it is 0xffffffff if mask is non-NULL.
2010-06-03create getter for component alphaJeff Muizelaar2-0/+7
This patch comes from the mozilla central tree. See http://hg.mozilla.org/mozilla-central/rev/89338a224278 for the original changeset. Signed-off-by: Jeff Muizelaar <jmuizelaar@mozilla.com> Signed-off-by: Egor Starkov <egor.starkov@nokia.com> Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
2010-05-13test: added OpenMP support for better utilization of multiple CPU coresSiarhei Siamashka4-0/+10
Some of the tests are quite heavy CPU users and may benefit from using multiple CPU cores, so the programs from 'test' directory are now built with OpenMP support. OpenMP is easy to use, portable and also takes care of making a decision about how many threads to spawn.
2010-05-13test: scaling-test updated to use new fuzzer_test_main() functionSiarhei Siamashka2-99/+11
2010-05-13test: blitters-test updated to use new fuzzer_test_main() functionSiarhei Siamashka2-118/+9
2010-05-13test: blitters-test-bisect.rb converted to perlSiarhei Siamashka1-0/+68
This new script can be used to run continuously to compare two test programs based on fuzzer_test_main() function from 'util.c' and narrow down to a single problematic test from the batch which results in different behavior.
2010-05-13test: main loop from blitters-test added as a new function to utils.cSiarhei Siamashka2-0/+118
This new generalized function can be reused in both blitters-test and scaling-test. Final checksum calculation changed in order to make it parallelizable (it is a sum of individual 32-bit values returned by a callback function, which is now responsible for running test-specific code). Return values may be crc32, some other hash or even just zero on success and non-zero on error (in this case, the expected result of the whole test run should be 0).
2010-05-09Merge branch 'for-master'Søren Sandmann Pedersen2-0/+68
2010-05-06test/gtk-utils: Set the size of the window to the size of the imageSøren Sandmann Pedersen1-0/+2
2010-05-04Add support for compiling pixman without thread/tls supportJeff Muizelaar1-2/+9
2010-05-03Add macros for thread local storage on MinGW 32Søren Sandmann Pedersen1-0/+65
These macros are identical to the ones that Tor Lillqvist posted here: http://lists.freedesktop.org/archives/pixman/2010-April/000160.html with one exception: the variable is allocated with calloc() and not malloc(). Cc: tml@iki.fi
2010-05-03Don't use __thread on MinGW.Søren Sandmann Pedersen1-0/+3
It is apparently broken. See this: http://mingw-users.1079350.n2.nabble.com/gcc-4-4-multi-threaded-exception-handling-thread-specifier-not-working-td3440749.html We'll need to support thread local storage on MinGW32 some other way. Cc: tml@iki.fi
2010-05-03Add support for 8bpp to pixman_fill_sse2()Søren Sandmann Pedersen1-5/+34
2010-05-03sse2: Add sse2_composite_over_reverse_n_8888Søren Sandmann Pedersen1-0/+104
This is a small speed-up for the poppler benchmark: Before: [ # ] backend test min(s) median(s) stddev. count [ 0] image poppler 4.443 4.474 0.31% 6/6 After: [ # ] backend test min(s) median(s) stddev. count [ 0] image poppler 4.224 4.248 0.42% 6/6
2010-05-03Don't consider indexed formats opaque.Søren Sandmann Pedersen2-3/+5
The indexed formats have 0 bits of alpha, but can't be considered opaque because there may be non-opaque colors in the palette.
2010-05-03Add an over_8888_8888_8888 sse2 fast path.Søren Sandmann Pedersen1-0/+168
2010-05-03Add pixman_region{,32}_intersect_rect()Søren Sandmann Pedersen2-1/+30
2010-05-03Rename fast_composite_src_8888_x888 to fast_composite_src_memcpy()Søren Sandmann Pedersen1-22/+38
Then generalize it and use it for SRC copying between various identical formats.
2010-04-27Add missing HAVE_CONFIG_H guards for config.h inclusionJeff Muizelaar1-0/+4
2010-04-22Remove alphamap from the GTK+ part of tests/Makefile.amSøren Sandmann Pedersen1-2/+1
It doesn't use GTK+ and it was already listed in the non-GTK+ part.
2010-04-21Add pixman_image_get_format() accessorSøren Sandmann Pedersen2-0/+10
2010-04-21Some minor updates to READMESøren Sandmann Pedersen1-5/+4
2010-04-18Update README to mention the pixman mailing listSøren Sandmann Pedersen1-8/+4
2010-04-13[mmx] Fix mask creation bugsSøren Sandmann Pedersen1-0/+2
This line: mask = mask | mask >> 8 | mask >> 16 | mask >> 24; only works when mask has 0s in the lower 24 bits, so add mask &= 0xff000000; before. Reported by Todd Rinaldo on the #cairo IRC channel.
2010-04-13Fixes for pthread thread local storage.Søren Sandmann Pedersen1-5/+5
The tls_name_key variable is passed to tls_name_get(), and the first time this happens it isn't initialized. tls_name_get() then passes it on to tls_name_alloc() which passes it on to pthread_setspecific() leading to undefined behavior. None of this is actually necessary at all because there is only one such variable per thread local variable, so it doesn't need to passed as a parameter at all. All of this was pointed out by Tor Lillqvist on the cairo mailing list.
2010-04-13Fix uninitialized cache when pthreads are usedSøren Sandmann Pedersen1-1/+1
The thread local cache is allocated with malloc(), but we rely on it being initialized to zero, so allocate it with calloc() instead.
2010-04-13Visual Studio 2010 includes stdint.hSiddharth Agarwal1-1/+2
Use the builtin version instead of defining the types ourselves.
2010-04-01Post-release version bump to 0.19.1Søren Sandmann Pedersen1-2/+2