summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Pre-release version bump to 0.38.2pixman-0.38.2Matt Turner2019-04-072-2/+2
| | | | Signed-off-by: Matt Turner <mattst88@gmail.com>
* meson: Correct copy-and-paste mistakeMatt Turner2019-04-071-1/+1
| | | | Signed-off-by: Matt Turner <mattst88@gmail.com>
* void function should not return a valueNiveditha Rau2019-03-271-6/+24
| | | | Signed-off-by: Matt Turner <mattst88@gmail.com>
* Windows: Support building with SHELL=cmd.exeSimon Richter2019-03-271-2/+14
| | | | | | | When GNU Make is not from msys, the startup cost for sh.exe is massive compared to cmd.exe. Signed-off-by: Matt Turner <mattst88@gmail.com>
* Windows: Show compiler invocationSimon Richter2019-03-271-1/+1
| | | | Signed-off-by: Matt Turner <mattst88@gmail.com>
* meson: store ARM SIMD and NEON tests as text filesDylan Baker2019-03-273-30/+24
| | | | | | | | | This is unfortunately required to make the tests work correctly, as otherwise meson assumes that the files are C code not assembly. I've opened https://github.com/mesonbuild/meson/issues/5151, to discuss fixing the issue in meson upstream. Fixes #29
* meson: simplify and fix mmx library compilationDylan Baker2019-03-271-9/+9
| | | | | This simplifies the logic and fixes the loongson-mmi implementation to build correctly.
* meson: Add proper include paths for the loongson checkDylan Baker2019-03-271-0/+1
|
* meson: fix copy-n-paste error for arm simd assemblyDylan Baker2019-03-271-1/+1
| | | | mentioned in #29
* meson: fix typo which breaks loongson checksDylan Baker2019-03-271-1/+1
| | | | mach -> march
* meson: work around meson issue #5115Dylan Baker2019-03-271-7/+9
| | | | | | | This issue causes openmp arguments to be injected into compilers that can support openmp, even if they don't. This issue will be fixed in 0.51 (code already landed in mesonbuild#5116), for older versions lets work around the issue.
* Bump version to 0.38.0pixman-0.38.0Maarten Lankhorst2019-02-113-5/+5
| | | | | | And update RELEASING for the new meson build system. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
* pixman: Use maximum precision for pixman-bits-image, v2.Maarten Lankhorst2019-02-112-111/+328
| | | | | | | | | | | | | | | | | | | pixman-bits-image's wide helpers first obtains the 8-bits image, then converts it to float. This destroys all the precision that the wide path was offering. Fix this by making get_pixel() take a pointer instead of returning a value. Floating point will fill in a argb_t, while the 8-bits path will fill a 32-bits ARGB value. This also requires writing a floating point bilinear interpolator. With this change pixman can use the full floating point precision internally in all paths. Changes since v1: - Make accum and reduce an argument to convolution functions, to remove duplication. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Basile Clement <basile-pixman@clement.pm>
* Implement floating point gradient computation, v2.Basile Clement2019-02-115-110/+234
| | | | | | | | | | | | | | | | | | | | This patch modifies the gradient walker to be able to generate floating point values directly in addition to a8r8g8b8 32 bit values. This is then used by the various gradient implementations to render in floating point when asked to do so, instead of rendering to a8r8g8b8 and then expanding to floating point as they were doing previously. Changes since v1 (mlankhorst): - Implement pixman_gradient_walker_pixel_32 without calling pixman_gradient_walker_pixel_float, to prevent performance degradation. Suggested by Adam Jackson. - Fix whitespace errors. - Remove unnecessary function prototypes in pixman-private.h Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [mlankhorst: Add comment about pixman_contract_from_float, based on Basille's suggestion] Acked-by: Basile Clement <basile-pixman@clement.pm>
* build: Add meson files to EXTRA_DISTDylan Baker2019-01-154-2/+15
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* editorconfig: use tabs for MakefilesDylan Baker2019-01-151-0/+3
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* Merge remote-tracking branch 'origin/master'Maarten Lankhorst2018-12-077-2/+889
|\ | | | | | | | | | | And bump meson version to 37.1 as well. Seems my push to upstream failed. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
| * gitlab-ci: Add meson build to pipeline testDylan Baker2018-11-291-2/+12
| |
| * meson: Add a meson build systemDylan Baker2018-11-295-0/+866
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a meson build system for pixman. It carries the usual improvements of meson, better clean build time, much better incremental build times, while being simpler and easier to understand. This takes advantage of some features from the most recent versions of meson: the builtin openmp dependency and the feature option type. There are a couple of things that I've done a bit differently than the autotools build system, I've built a libdemos which is the utilities from the demos folder, and I've linked the demos with libtestutils from tetsts, otherwise I expect that most things will be the same. I've tested so far cross compiling from x86_64 -> x86, x86_64 -> Aarch64, and Linux to Windows via mingw, as well as native x86_64 Linux builds which all work. I've also built with mingw nativly, there are some test failures there. An MSVC build can be generated, but fails. v2: - set WORDS_BIGENDIAN in the config for big endian systems.
| * Add .editorconfig fileDylan Baker2018-11-291-0/+11
| | | | | | | | | | | | This sets the style for meson (which uses the upstream style, 2 space indent with no tabs), and sets the tab_width to 8 per the CODING_STYLE document.
* | Post release version bump to 37.1Maarten Lankhorst2018-12-071-2/+2
| | | | | | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
* | Bump version to 0.36.0pixman-0.36.0Maarten Lankhorst2018-11-211-2/+2
| | | | | | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
* | pixman: Update git repository to the one at gitlab.Maarten Lankhorst2018-11-211-1/+1
|/ | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
* pixman: Add tests for (a)rgb floating point formats.Maarten Lankhorst2018-11-064-40/+186
| | | | | | | | Add some basic tests to ensure that the newly added formats work as intended. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
* pixman: Add support for argb/xrgb float formats, v5.Maarten Lankhorst2018-11-065-9/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pixman is already using the floating point formats internally, expose this capability in case someone wants to support higher bit per component formats. This is useful for igt which depends on cairo to do the rendering. It can use it to convert floats internally to planar Y'CbCr formats, or to F16. We add a new type PIXMAN_TYPE_RGBA_FLOAT for this format, which is an all float array of R, G, B, and A. Formats that use mixed float/int RGBA aren't supported, and will probably need their own type. Changes since v1: - Use RGBA 128 bits and RGB 96 bits memory layouts, to better match the opengl format. Changes since v2: - Add asserts in accessor and for strides to force alignment. - Move test changes to their own commit. Changes since v3: - Define 32bpc as PIXMAN_FORMAT_PACKED_C32 - Rename pixman accessors from rgb*_float_float to rgb*f_float Changes since v4: - Create a new PIXMAN_FORMAT_BYTE for fitting up to 64 bits per component. (based on Siarhei Siamashka's suggestion) - Use new format type PIXMAN_TYPE_RGBA_FLOAT Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> #v4 [mlankhorst: Fix missing braces in PIXMAN_FORMAT_RESHIFT macro]
* test: Fix stride calculation in stress-testSiarhei Siamashka2018-07-061-5/+5
| | | | | | | | | | | | | Currently the number of bits per pixel is used instead of the number of bytes per pixel when calculating image strides. This does not cause any real problems, but the gaps between scanlines are excessively large. This patch actually converts bits to bytes and rounds up the result to the nearest byte boundary. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Reviewed-by: soren.sandmann@gmail.com
* test: Adjust for clang's removal of __builtin_shuffleVladimir Smirnov2018-06-051-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | __builtin_shuffle was removed in clang 5.0. Build log says: test/utils-prng.c:207:27: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration] randdata.vb = __builtin_shuffle (randdata.vb, bswap_shufflemask); ^ test/utils-prng.c:207:25: error: assigning to 'uint8x16' (vector of 16 'uint8_t' values) from incompatible type 'int' randdata.vb = __builtin_shuffle (randdata.vb, bswap_shufflemask); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated Link to original discussion: http://lists.llvm.org/pipermail/cfe-dev/2017-August/055140.html It's possible to build pixman if attached patch is applied. Basically patch adds check for __builtin_shuffle support and in case there is none, falls back to clang-specific __builtin_shufflevector that do the same but have different API. Bugzilla: https://bugs.gentoo.org/646360 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104886 Tested-by: Philip Chimento <philip.chimento@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
* Merge branch 'ci' into 'master'Adam Jackson2018-06-052-0/+15
|\ | | | | | | | | ci: Add .gitlab-ci.yml See merge request pixman/pixman!1
| * ci: Add .gitlab-ci.ymlAdam Jackson2018-06-052-0/+15
|/ | | | | | | Just builds on Fedora 28 for x86_64 at the moment, but it's a start. Credit to Daniel Stone for eliminating the nested docker image. Signed-off-by: Adam Jackson <ajax@redhat.com>
* vmx: Fix vector loads on ppc64leDan Horák2018-05-141-1/+1
| | | | | | | | | | | Use vector intrinsic for loading possibly unaligned data instead of a typecast. Bugzilla: https://bugzilla.redhat.com/1572540 Signed-off-by: Dan Horák <dan@danny.cz> Signed-off-by: Adam Jackson <ajax@redhat.com> Tested-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
* Promote unsigned short to unsigned int explicitlyBehdad Esfahbod2018-01-091-4/+4
| | | | | ...to avoid default promotion to signed int, which causes undefined behaviour in the shift expression.
* Revert "demos/scale: Added pulldown to choose PIXMAN_FILTER_* value"Søren Sandmann Pedersen2016-09-032-60/+21
| | | | | | This reverts commit 375f5ec5c5d2a6cc3586f57e36fdf08a3d0ac4e4. This patch was accidentally pushed.
* pixman-filter: Made Gaussian a bit widerBill Spitzak2016-09-031-1/+1
| | | | | | | | | | | | | | Expanded the size slightly (from ~4.25 to 5) to make the cutoff less noticable. Previouly the value at the cutoff was gaussian_filter(sqrt(2)*3/2) = 0.00626 which is larger than the difference between 8-bit pixels (1/255 = 0.003921). New cutoff is gaussian_filter(2.5) = 0.001089 which is smaller. v11: added some math to commit message v14: left SIGMA in there Signed-off-by: Bill Spitzak <spitzak@gmail.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
* pixman-filter: Nested polynomial for cubicBill Spitzak2016-09-031-6/+8
| | | | | | | v11: Restored range checks Signed-off-by: Bill Spitzak <spitzak@gmail.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
* pixman-filter: Fix several issues related to normalizationSøren Sandmann Pedersen2016-09-031-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | There are a few bugs in the current normalization code (1) The normalization is based on the sum of the *floating point* values generated by integral(). But in order to get the sum to be close to pixman_fixed_1, the sum of the rounded fixed point values should be used. (2) The multiplications in the normalization loops often round the same way, so the residual error can fairly large. (3) The residual error is added to the sample located at index (width - width / 2), which is not the midpoint for odd widths (and for width 1 is in fact outside the array). This patch fixes these issues by (1) using the sum of the fixed point values as the total to divide by, (2) doing error diffusion in the normalization loop, and (3) putting any residual error (which is now guaranteed to be less than pixman_fixed_e) at the first sample, which is the only one that didn't get any error diffused into it. Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com>
* pixman-filter: Speed up BOX/BOX filterSøren Sandmann Pedersen2016-09-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | The convolution of two BOX filters is simply the length of the interval where both are non-zero, so we can simply return width from the integral() function because the integration region has already been restricted to be such that both functions are non-zero on it. This is both faster and more accurate than doing numerical integration. This patch is based on one by Bill Spitzak https://lists.freedesktop.org/archives/pixman/2016-March/004446.html with these changes: - Rebased to not assume any changes in the arguments to integral(). - Dropped the multiplication by scale - Added more details in the commit message. Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com> Reviewed-by: Bill Spitzak <spitzak@gmail.com>
* pixman-filter: integral splitting is only needed for triangle filterBill Spitzak2016-09-021-6/+5
| | | | | | | | | | | | | Only the triangle is discontinuous at 0. The other filters resemble a cubic closely enough that Simpsons integration works without splitting. Changes by Søren: Rebase without the changes to the integral function, update comment to match the new code. Signed-off-by: Bill Spitzak <spitzak@gmail.com> Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com> Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
* pixman-filter: Correct Simpsons integrationBill Spitzak2016-09-021-6/+15
| | | | | | | | | | | | | | | | | | | | | Simpsons uses cubic curve fitting, with 3 samples defining each cubic. This makes the weights of the samples be in a pattern of 1,4,2,4,2...4,1, and then dividing the result by 3. The previous code was using weights of 1,2,0,6,0,6...,2,1. With this fix the integration is accurate enough that the number of samples could be reduced a lot. Multiples of 12 seem to work best. v7: Merged with patch to reduce from 128 samples to 16 v9: Changed samples from 16 to 12 v10: Fixed rebase error that made it not compile v11: minor whitespace change v14: more whitespace changes Signed-off-by: Bill Spitzak <spitzak@gmail.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
* pixman-filter: reduce amount of malloc/free/memcpy to generate filterBill Spitzak2016-09-021-33/+23
| | | | | | | | | | | | | | | | | | | Rearranged so that the entire block of memory for the filter pair is allocated first, and then filled in. Previous version allocated and freed two temporary buffers for each filter and did an extra memcpy. v8: small refactor to remove the filter_width function v10: Restored filter_width function but with arguments changed to match later patches v11: Removed unused arg and pointer from filter_width function Whitespace fixes. Signed-off-by: Bill Spitzak <spitzak@gmail.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Acked-by: Søren Sandmann <soren.sandmann@gmail.com>
* pixman-image: Added enable-gnuplot config to view filters in gnuplotBill Spitzak2016-09-023-0/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If enable-gnuplot is configured, then you can pipe the output of a pixman-using program to gnuplot and get a continuously-updated plot of the horizontal filter. This works well with demos/scale to test the filter generation. The plot is all the different subposition filters shuffled together. This is misleading in a few cases: IMPULSE.BOX - goes up and down as the subfilters have different numbers of non-zero samples IMPULSE.TRIANGLE - somewhat crooked for the same reason 1-wide filters - looks triangular, but a 1-wide box would be more accurate Changes by Søren: Rewrote the pixman-filter.c part to - make it generate correct coordinates - add a comment on how coordinates are generated - in rounding.txt, add a ceil() variant of the first-sample formula - make the gnuplot output slightly prettier v7: First time this ability was included v8: Use config option Moved code to the filter generator Modified scale demo to not call filter generator a second time. v10: Only print if successful generation of plots Use #ifdef, not #if v11: small whitespace fixes v12: output range from -width/2 to width/2 and include y==0, to avoid misleading plots for subsample_bits==0 and for box filters which may have no small values. Signed-off-by: Bill Spitzak <spitzak@gmail.com>
* demos/scale: Added pulldown to choose PIXMAN_FILTER_* valueBill Spitzak2016-09-022-21/+60
| | | | | | | | | | | This is very useful for comparing the results of SEPARABLE_CONVOLUTION with BILINEAR and NEAREST. v14: Removed good/best items v15: Skip filter generation so gnuplot output continues showing previous value Signed-off-by: Bill Spitzak <spitzak@gmail.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
* demos/scale: Default to locked axisBill Spitzak2016-09-021-0/+1
| | | | | Signed-off-by: Bill Spitzak <spitzak@gmail.com> Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
* demos/scale: fix blank subsamples spin boxBill Spitzak2016-09-021-0/+1
| | | | | | | It now shows the initial value of 4 when the demo is started Signed-off-by: Bill Spitzak <spitzak@gmail.com> Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
* demos/scale: Compute filter size using boundary of xformed ellipseBill Spitzak2016-09-021-41/+61
| | | | | | | | | | Instead of using the boundary of xformed rectangle, use the boundary of xformed ellipse. This is much more accurate and less blurry. In particular the filtering does not change as the image is rotated. Signed-off-by: Bill Spitzak <spitzak@gmail.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Soren Sandmann <soren.sandmann@gmail.com>
* More general BILINEAR=>NEAREST reductionSøren Sandmann Pedersen2016-09-021-28/+38
| | | | | | | | | | | | | | Generalize and simplify the code that reduces BILINEAR to NEAREST so that the reduction happens for all affine transformations where t00...t12 are integers and (t00 + t01) and (t10 + t11) are both odd. This is a sufficient condition for the resulting transformed coordinates to be exactly at the center of a pixel so that BILINEAR becomes identical to NEAREST. V2: Address some comments by Bill Spitzak Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com> Reviewed-by: Bill Spitzak <spitzak@gmail.com>
* Add new test of filter reduction from BILINEAR to NEARESTSøren Sandmann Pedersen2016-09-022-0/+113
| | | | | | | | | | | | | | | This new test tests a bunch of bilinear downscalings, where many have a transformation such that the BILINEAR filter can be reduced to NEAREST (and many don't). A CRC32 is computed for all the resulting images and compared to a known-good value for both 4-bit and 7-bit interpolation. V2: Remove leftover comment, some minor formatting fixes, use a timestamp as the PRNG seed. Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com> Reviewed-by: Bill Spitzak <spitzak@gmail.com>
* pixman-fast-path.c: Pick NEAREST affine fast paths before BILINEAR onesSøren Sandmann Pedersen2016-09-021-2/+2
| | | | | | | | | When a BILINEAR filter is reduced to NEAREST, it is possible for both types of fast paths to run; in this case, the NEAREST ones should be preferred as that is the simpler filter. Signed-off-by: Soren Sandmann <soren.sandmann@gmail.com> Reviewed-by: Bill Spitzak <spitzak@gmail.com>
* pixman-private: include <float.h> only in C codeThomas Petazzoni2016-01-311-2/+1
| | | | | | | | | | | | | | | | | | | | <float.h> is included unconditionally by pixman-private.h, which in turn gets included by assembler files. Unfortunately, with certain C libraries (like the musl C library), <float.h> cannot be included in assembler files: CCLD libpixman-arm-simd.la /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages: /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)' /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages: /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)' It turns out however that <float.h> is not needed by assembly files, so we move its inclusion within the #ifndef __ASSEMBLER__ condition, which solves the problem. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
* build: Distinguish SKIP and FAIL on Win32Andrea Canciani2015-12-301-11/+20
| | | | | | | | | | | The `check` target in test/Makefile.win32 assumed that any non-0 exit code from the tests was an error, but the testsuite is currently using 77 as a SKIP exit code (based on the convention used in autotools). Fixes fence-image-self-test and cover-test (now reported as SKIP). Signed-off-by: Andrea Canciani <ranma42@gmail.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
* build: Use `del` instead of `rm` on `cmd.exe` shellsSimon Richter2015-12-231-2/+6
| | | | | | | | | | | | | The `rm` command is not usually available when running on Win32 in a `cmd.exe` shell. Instead the shell provides the `del` builtin, which has somewhat more limited wildcars expansion and error handling. This makes all of the Makefile targets work on Win32 both using `cmd.exe` and using the MSYS environment. Signed-off-by: Simon Richter <Simon.Richter@hogyros.de> Signed-off-by: Andrea Canciani <ranma42@gmail.com> Acked-by: Oded Gabbay <oded.gabbay@gmail.com>