Skip to content
Snippets Groups Projects
  1. Jan 13, 2022
  2. Nov 18, 2019
  3. May 25, 2019
    • Basile Clement's avatar
      Ordered dithering with blue noise, v2 · cb2ec426
      Basile Clement authored and Bryce Harrington's avatar Bryce Harrington committed
      On some screens (typically low quality laptop screens), using Bayer
      ordered dithering has been observed to cause color changes depending on
      *where the gradient is rendered on the screen*, causing visible
      flickering when moving an image on the screen.
      
      To alleviate the issue, this patch adds support for ordered dithering
      using a 64x64 matrix tuned from blue noise.  In addition to being devoid
      of the positional dependency on screen, the blue noise matrix also
      generates more pleasing and less discernable patterns.  As such, it is
      now the method used for PIXMAN_DITHER_GOOD and PIXMAN_DITHER_BEST
      dithering methods.
      
      The 64x64 blue noise matrix has been generated using the provided
      `pixman/dither/make-blue-noise.c` script, which uses the
      void-and-cluster method.
      
      Changes since v1 (thanks Bill):
       - Use uint16_t for the blue noise matrix for lower memory usage
       - Use bitwise computation for array index
      cb2ec426
    • Basile Clement's avatar
      demos: Add a dithering demo · 98b5ec74
      Basile Clement authored and Bryce Harrington's avatar Bryce Harrington committed
      This adds a dither.c which provides a demo of the dithering feature.
      This is based on the scale.c demo for scaling and provides a selection
      of intermediate formats and dithering operators (currently, only
      PIXMAN_DITHER_ORDERED_BAYER_8) to use.  Images are first blitted onto a
      surface of the intermediate format with the requested dither setup, then
      blitted back onto a a8r8g8b8 surface for display.
      98b5ec74
  4. Jan 16, 2019
  5. Nov 29, 2018
    • Dylan Baker's avatar
      meson: Add a meson build system · 199a3bd2
      Dylan Baker authored and Adam Jackson's avatar Adam Jackson committed
      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.
      199a3bd2
  6. Sep 03, 2016
  7. Sep 02, 2016
  8. Nov 12, 2013
  9. Oct 12, 2013
    • Søren Sandmann Pedersen's avatar
      scale.c: Use int instead of kernel_t for values in named_int_t · 09a62d4d
      Søren Sandmann Pedersen authored
      The 'value' field in the 'named_int_t' struct is used for both
      pixman_repeat_t and pixman_kernel_t values, so the type should be int,
      not pixman_kernel_t.
      
      Fixes some warnings like this
      
      scale.c:124:33: warning: implicit conversion from enumeration
            type 'pixman_repeat_t' to different enumeration type
            'pixman_kernel_t' [-Wconversion]
          { "None",                   PIXMAN_REPEAT_NONE },
          ~                           ^~~~~~~~~~~~~~~~~~
      
      when compiled with clang.
      09a62d4d
  10. Sep 16, 2013
  11. Mar 12, 2013
    • Søren Sandmann Pedersen's avatar
      demos: Add linear-gradient demo program · 460faaa4
      Søren Sandmann Pedersen authored
      This program displays a linear gradient from blue to yellow. Due to
      limited precision in pixman-gradient-walker.c, it currently has some
      ugly artefacts that gives it a 'brushed metal' appearance.
      
      V2: Update .gitignore
      460faaa4
  12. Feb 15, 2013
    • Søren Sandmann Pedersen's avatar
      gtk-utils.c: Use cairo in show_image() rather than GdkPixbuf · 2156fb51
      Søren Sandmann Pedersen authored
      GdkPixbufs are not premultiplied, so when using them to display pixman
      images, there is some unecessary conversions going on: First the image
      is converted to non-premultiplied, and then GdkPixbuf premultiplies
      before sending the result to the X server. These conversions may cause
      the displayed image to not be exactly identical to the original.
      
      This patch just uses a cairo image surface instead, which avoids these
      conversions.
      
      Also make the comment about sRGB a little more concise.
      2156fb51
  13. Jan 28, 2013
  14. Jan 23, 2013
    • Matt Turner's avatar
      Convert INCLUDES to AM_CPPFLAGS · 61dacffa
      Matt Turner authored
      INCLUDES has been deprecated starting with automake 1.13. Convert all
      occurrences with the recommended AM_CPPFLAGS replacement.
      61dacffa
  15. Dec 11, 2012
  16. Dec 08, 2012
    • Søren Sandmann Pedersen's avatar
      Add demo program for conical gradients · 4f18ba30
      Søren Sandmann Pedersen authored
      This new test is derived from radial-test.c and displays conical
      gradients at various angles.
      
      It also demonstrates how PIXMAN_REPEAT_NORMAL is supposed to work when
      used with a gradient specification where the first stop is not a 0.0:
      In this case the gradient is supposed to have a smooth transition from
      the last stop back to the first stop with no sharp transitions. It
      also shows that the repeat mode is not ignored for conical gradients
      as one might be tempted to think.
      4f18ba30
    • Søren Sandmann Pedersen's avatar
      Add demos/zone_plate.png · 3a98787b
      Søren Sandmann Pedersen authored
      The zone plate image is a useful test case for image scalers because
      it contains all representable frequencies, so any imperfection in
      resampling filters will show up as Moire patterns.
      
      This version is symmetric around the midpoint of the image, so since
      rotating it is supposed to be a noop, it can also be used to verify
      that the resampling filters don't shift the image.
      
      V2: Run the file through OptiPNG to cut the size in half, as suggested
      by Siarhei.
      3a98787b
    • Søren Sandmann Pedersen's avatar
      demos: Add new demo program, "scale" · 97491ed2
      Søren Sandmann Pedersen authored
      This program allows interactively scaling and rotating images with
      using various filters and repeat modes. It uses
      pixman_filter_create_separate_convolution() to generate the filters.
      97491ed2
    • Søren Sandmann Pedersen's avatar
      demos/gtk-utils.[ch]: Add pixman_image_from_file() · 7f5bb22d
      Søren Sandmann Pedersen authored
      This function uses GdkPixbuf to load various common formats such as
      .png and .jpg into a pixman image.
      7f5bb22d
  17. Dec 06, 2012
    • Siarhei Siamashka's avatar
      test: Switch to the new PRNG instead of old LCG · b31a6962
      Siarhei Siamashka authored
      Wallclock time for running pixman "make check" (compile time not included):
      
      ----------------------------+----------------+-----------------------------+
                                  | old PRNG (LCG) |   new PRNG (Bob Jenkins)    |
             Processor type       +----------------+------------+----------------+
                                  |    gcc 4.5     |  gcc 4.5   | gcc 4.7 (simd) |
      ----------------------------+----------------+------------+----------------+
      quad Intel Core i7  @2.8GHz |    0m49.494s   |  0m43.722s |    0m37.560s   |
      dual ARM Cortex-A15 @1.7GHz |     5m8.465s   |  4m37.375s |    3m45.819s   |
           IBM Cell PPU   @3.2GHz |    23m0.821s   | 20m38.316s |   16m37.513s   |
      ----------------------------+----------------+------------+----------------+
      
      But some tests got a particularly large boost. For example benchmarking and
      profiling blitters-test on Core i7:
      
      === before ===
      
      $ time ./blitters-test
      
      real    0m10.907s
      user    0m55.650s
      sys     0m0.000s
      
        70.45%  blitters-test  blitters-test       [.] create_random_image
        15.81%  blitters-test  blitters-test       [.] compute_crc32_for_image_internal
         2.26%  blitters-test  blitters-test       [.] _pixman_implementation_lookup_composite
         1.07%  blitters-test  libc-2.15.so        [.] _int_free
         0.89%  blitters-test  libc-2.15.so        [.] malloc_consolidate
         0.87%  blitters-test  libc-2.15.so        [.] _int_malloc
         0.75%  blitters-test  blitters-test       [.] combine_conjoint_general_u
         0.61%  blitters-test  blitters-test       [.] combine_disjoint_general_u
         0.40%  blitters-test  blitters-test       [.] test_composite
         0.31%  blitters-test  libc-2.15.so        [.] _int_memalign
         0.31%  blitters-test  blitters-test       [.] _pixman_bits_image_setup_accessors
         0.28%  blitters-test  libc-2.15.so        [.] malloc
      
      === after ===
      
      $ time ./blitters-test
      
      real    0m3.655s
      user    0m20.550s
      sys     0m0.000s
      
        41.77%  blitters-test.n  blitters-test.new  [.] compute_crc32_for_image_internal
        15.77%  blitters-test.n  blitters-test.new  [.] prng_randmemset_r
         6.15%  blitters-test.n  blitters-test.new  [.] _pixman_implementation_lookup_composite
         3.09%  blitters-test.n  libc-2.15.so       [.] _int_free
         2.68%  blitters-test.n  libc-2.15.so       [.] malloc_consolidate
         2.39%  blitters-test.n  libc-2.15.so       [.] _int_malloc
         2.27%  blitters-test.n  blitters-test.new  [.] create_random_image
         2.22%  blitters-test.n  blitters-test.new  [.] combine_conjoint_general_u
         1.52%  blitters-test.n  blitters-test.new  [.] combine_disjoint_general_u
         1.40%  blitters-test.n  blitters-test.new  [.] test_composite
         1.02%  blitters-test.n  blitters-test.new  [.] prng_srand_r
         1.00%  blitters-test.n  blitters-test.new  [.] _pixman_image_validate
         0.96%  blitters-test.n  blitters-test.new  [.] _pixman_bits_image_setup_accessors
         0.90%  blitters-test.n  libc-2.15.so       [.] malloc
      b31a6962
  18. Oct 01, 2012
    • Søren Sandmann Pedersen's avatar
      Add combiner test · 4760599f
      Søren Sandmann Pedersen authored
      This test runs the new floating point combiners on random input with
      divide-by-zero exceptions turned on.
      
      With the floating point combiners the only thing we guarantee is that
      divide-by-zero exceptions are not generated, so change
      enable_fp_exceptions() to only enable those, and rename accordingly.
      4760599f
  19. Aug 09, 2012
    • Søren Sandmann Pedersen's avatar
      demos: Add srgb_trap_test.c · 09cb1ae1
      Søren Sandmann Pedersen authored
      This demo program composites a bunch of trapezoids side by side with
      and without gamma aware compositing.
      09cb1ae1
    • Søren Sandmann Pedersen's avatar
      Make show_image() cope with more formats · 04e878c2
      Søren Sandmann Pedersen authored
      This makes show_image() deal with more formats than just a8r8g8b8, in
      particular, a8r8g8b8_sRGB can now be handled.
      
      Images that are passed to show_image with a format of a8r8g8b8_sRGB
      are displayed without modification under the assumption that the
      monitor is approximately sRGB.
      
      Images with a format of a8r8g8b8 are also displayed without
      modification since many other users of show_image() have been
      generating essentially sRGB data with this format. Other formats are
      also assumed to be gamma compressed; these are converted to a8r8g8b8
      before being displayed.
      
      With these changes, srgb-test.c doesn't need to do its own conversion
      anymore.
      04e878c2
  20. Jul 30, 2012
    • Antti S. Lankila's avatar
      Add sRGB blending demo program · a161a6ba
      Antti S. Lankila authored
      Simple sRGB color blender test can be used to determine if the sRGB processing
      works as expected. It blends alpha ramps of purple and green together such that
      at midpoint of image, 50 % blend of both is realized. At that point, sRGB-aware
      processing yields a result close to #bbb rather than #888, which is the linear
      light blending result.
      
      The demo also contains the sample computation for sRGB premultiplied alpha.
      a161a6ba
  21. May 20, 2012
  22. May 15, 2012
  23. Apr 02, 2012
  24. Mar 28, 2012
  25. Mar 24, 2012
  26. Jan 03, 2012
    • Søren Sandmann Pedersen's avatar
      Modify gradient-test to show a bug in NONE processing · d0091a33
      Søren Sandmann Pedersen authored
      This patch modifies demos/gradient-test to display a bug in gradients
      with a repeat mode of NONE. With the current gradient code, the left
      side will be a solid red (actually an extremely long fade from solid
      red to transparent) instead of a sharp transition from red to green.
      d0091a33
Loading