Re: [Pixman] Dithering patches, v2

2019-04-22 Thread Bill Spitzak
Is the "blue noise" version actually slower than the Bayer? Seems to be doing a bit less calculation but it reading the array of weights. The removal of the need for the pattern offset seems like a win. On Mon, Apr 22, 2019 at 9:27 AM Matt Turner wrote: > On Fri, Apr 19, 2019 at 4:52 PM Bryce

Re: [Pixman] Dithering patches, v2

2019-04-09 Thread Bill Spitzak
How difficult is it to just make the gradients use dithering, so they produce 8-bit (or whatever) results directly but with the dithering pattern in them? What other operations would need dithering (a large blur comes to mind, also zooming way in on an image in bilinear)? I think the blue noise

Re: [Pixman] Is circle rendering possible?

2019-02-06 Thread Bill Spitzak
If you are rendering a solid color (so the result is either that color or transparent black) then you can just fill the entire RGB with that color to turn the premulitplied output into unpremultiplied. However I am unsure what your precision problem is. You would have to composite several dozen

Re: [Pixman] pixman: Add support for argb/xrgb float formats, v5.

2018-10-31 Thread Bill Spitzak
I don't like the fact that the design which allows the rgba to be different sizes cannot make them vary between float and decimal. The main reason is so that an integer for Alpha can be supported. I think maybe there should be a bit that changes the interpretation of the bit widths to a 16-valued

Re: [Pixman] [PATCH 1/2] pixman: Add support for argb/xrgb float formats, v3.

2018-10-29 Thread Bill Spitzak
I think an indicator for float can double as indicating the size is multiplied by 8. All float formats I am familiar with take a mulitple of 8 bits, including an 8-bit format that is sometimes used in CG. On Mon, Oct 29, 2018 at 2:18 AM Maarten Lankhorst < maarten.lankho...@linux.intel.com>

Re: [Pixman] [patch] Gradient dithering into pixman

2018-03-27 Thread Bill Spitzak
e > > gradient. I still think this is the right way to do it. > > Thank you for your input. Would it be possible to use your preferred way > of doing it to my patch ? > > Le 27/03/2018 à 03:47, Bill Spitzak a écrit : > > I don't understand why you would want to

Re: [Pixman] [patch] Gradient dithering into pixman

2018-03-26 Thread Bill Spitzak
I don't understand why you would want to disable it when writing .png files. There will be banding in the .png file, which I would think is worse than the increased size. Also kind of fools the user if they did not look at the .png file and only at InkScape's display. On Mon, Mar 26, 2018 at

[Pixman] [PATCH 11/15] pixman-filter: integral splitting is only needed for triangle filter

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 ne

[Pixman] [PATCH 06/15] demos/scale: Default to locked axis

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Søren Sandmann <soren.sandm...@gmail.com> --- demos/scale.ui | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/scale.ui b/demos/scale.ui index f6f6e89..d498d26 100644 --

[Pixman] [PATCH] Fixes to pixman filtering

2016-08-30 Thread spitzak
If anybody is maintaining pixman now, these patches have been reviewed several times and should be pushed. They are primarily written by Søren based on versions I wrote. They fix several defects in the seperable filter generation. ___ Pixman mailing

[Pixman] [PATCH 15/15] pixman-filter: Made Gaussian a bit wider

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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

[Pixman] [PATCH 02/15] Add new test of filter reduction from BILINEAR to NEAREST

2016-08-30 Thread spitzak
n-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.sandm...@gmail.com> Reviewed-by: Bill Spitzak <spit...@gmail.com> --- test/Makefile.sources|

[Pixman] [PATCH 14/15] pixman-filter: Nested polynomial for cubic

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> v11: Restored range checks Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- pixman/pixman-filter.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pixm

[Pixman] [PATCH 10/15] pixman-filter: Correct Simpsons integration

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 th

[Pixman] [PATCH 05/15] demos/scale: fix blank subsamples spin box

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> It now shows the initial value of 4 when the demo is started Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Søren Sandmann <soren.sandm...@gmail.com> --- demos/scale.ui | 1 + 1 file changed, 1 insertion(+) diff --git

[Pixman] [PATCH 12/15] pixman-filter: Speed up BOX/BOX filter

2016-08-30 Thread spitzak
t 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 arg

[Pixman] [PATCH 07/15] demos/scale: Added pulldown to choose PIXMAN_FILTER_* value

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 <spit...@

[Pixman] [PATCH 08/15] pixman-image: Added enable-gnuplot config to view filters in gnuplot

2016-08-30 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 dif

[Pixman] [PATCH 03/15] More general BILINEAR=>NEAREST reduction

2016-08-30 Thread spitzak
dition 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.sandm...@gmail.com> Reviewed-by: Bill Spitzak <spit...@gmail.com> --- pixman/p

Re: [Pixman] [PATCH 02/14] Add new test of filter reduction from BILINEAR to NEAREST

2016-04-29 Thread Bill Spitzak
On Fri, Apr 29, 2016 at 4:55 AM, Oded Gabbay wrote: > On Tue, Apr 12, 2016 at 5:36 AM, Søren Sandmann Pedersen > wrote: > > This new test tests a bunch of bilinear downscalings, where many have > > a transformation such that the BILINEAR filter

Re: [Pixman] [RFC 1/2] Remove seemingly unneeded comparison(s)

2016-04-29 Thread Bill Spitzak
com> wrote: > On 29 April 2016 at 11:35, Pekka Paalanen <ppaala...@gmail.com> wrote: > > On Fri, 29 Apr 2016 10:15:37 +0100 > > Emil Velikov <emil.l.veli...@gmail.com> wrote: > > > >> On 27 April 2016 at 18:46, Bill Spitzak <spit...@gmail.com>

Re: [Pixman] [RFC 1/2] Remove seemingly unneeded comparison(s)

2016-04-27 Thread Bill Spitzak
On Wed, Apr 27, 2016 at 2:03 AM, Pekka Paalanen <ppaala...@gmail.com> wrote: > On Wed, 27 Apr 2016 09:56:44 +0100 > Emil Velikov <emil.l.veli...@gmail.com> wrote: > > > On 26 April 2016 at 19:12, Bill Spitzak <spit...@gmail.com> wrote: > > > The old cod

Re: [Pixman] [RFC 1/2] Remove seemingly unneeded comparison(s)

2016-04-26 Thread Bill Spitzak
The old code is comparing pixman_fixed_48_16_t values to pixman_fixed_16_16_t values, thus it is checking for truncation of overflow values. It would probably be better to clamp these overflowed values, like pixman_transform_point_31_16 is doing to clamp to the pixman_fixed_48_16 result. Right

Re: [Pixman] [PATCH 12/14] pixman-filter: Fix several issues related to normalization

2016-04-13 Thread Bill Spitzak
The attached patch changes the normalization to the version I was suggesting. I added some print statements and discovered that the "residual error" was always zero, after some analysis I figured out that this version will always produce a set of values that sum to pixman_fixed_1 (unless the

Re: [Pixman] [PATCH 07/14] pixman-image: Added enable-gnuplot config to view filters in gnuplot

2016-04-13 Thread Bill Spitzak
On 04/12/2016 01:55 PM, Søren Sandmann wrote: This series is available as a git repository here: https://cgit.freedesktop.org/~sandmann/pixman/log/?h=spitzak-for-master Not having much luck with that url: fatal: repository 'https://cgit.freedesktop.org/~sandmann/pixman/log/?h=spitzak

Re: [Pixman] [PATCH 13/14] pixman-filter: Nested polynomial for cubic

2016-04-12 Thread Bill Spitzak
return 1 for all x). Oded did not like that idea but I wonder if you have any opinion. On Mon, Apr 11, 2016 at 7:36 PM, Søren Sandmann Pedersen < soren.sandm...@gmail.com> wrote: > From: Bill Spitzak <spit...@gmail.com> > > v11: Restored range checks > > Signed-off-by: Bill

Re: [Pixman] [PATCH 12/14] pixman-filter: Fix several issues related to normalization

2016-04-12 Thread Bill Spitzak
Excellent idea to put the error diffusion into the division. Just a bit of cleanup and changes for some suspected bugs (that are probably invisible but might as well get them): On Mon, Apr 11, 2016 at 7:36 PM, Søren Sandmann Pedersen < soren.sandm...@gmail.com> wrote: > There are a few bugs in

Re: [Pixman] [PATCH 07/14] pixman-image: Added enable-gnuplot config to view filters in gnuplot

2016-04-12 Thread Bill Spitzak
t; (I suspect your changes to the integral() arguments caused it to generate > different values, so you should check without them included. > Looks like you are correct, toggling between this and nearest shows that the filtering code is reading the arrays this way. > > This series is available as a git repository here: > > > https://cgit.freedesktop.org/~sandmann/pixman/log/?h=spitzak-for-master > ) > > > Søren > > ___ Pixman mailing list Pixman@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pixman

Re: [Pixman] [PATCH 07/14] pixman-image: Added enable-gnuplot config to view filters in gnuplot

2016-04-12 Thread Bill Spitzak
On Mon, Apr 11, 2016 at 7:36 PM, Søren Sandmann Pedersen < soren.sandm...@gmail.com> wrote: > From: Bill Spitzak <spit...@gmail.com> > > If enable-gnuplot is configured, then you can pipe the output of a > pixman-using program to gnuplot and get a continuously-updated

Re: [Pixman] [PATCH 03/14] More general BILINEAR=>NEAREST reduction

2016-04-12 Thread Bill Spitzak
) 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.sandm...@gmail.com> ---

Re: [Pixman] [PATCH 02/14] Add new test of filter reduction from BILINEAR to NEAREST

2016-04-12 Thread Bill Spitzak
Reviewed-by: Bill Spitzak <spit...@gmail.com> On 04/11/2016 07:36 PM, Søren Sandmann Pedersen wrote: 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 f

Re: [Pixman] [PATCH 01/14] pixman-fast-path.c: Pick NEAREST affine fast paths before BILINEAR ones

2016-04-12 Thread Bill Spitzak
I can confirm this fixes the problem and allows multiple fast path flags to be set. Reviewed-by: Bill Spitzak <spit...@gmail.com> On 04/11/2016 07:36 PM, Søren Sandmann Pedersen wrote: When a BILINEAR filter is reduced to NEAREST, it is possible for both types of fast paths

Re: [Pixman] [PATCH v14 12/22] pixman-filter: fix subsample_bits == 0

2016-04-11 Thread Bill Spitzak
On Mon, Apr 11, 2016 at 12:35 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Mon, Apr 11, 2016 at 2:43 PM, Bill Spitzak <spit...@gmail.com> wrote: > > >> I feel this can be fixed. It is already correct for subsample_bits==0. >> Since both the filter g

Re: [Pixman] [PATCH v14 12/22] pixman-filter: fix subsample_bits == 0

2016-04-11 Thread Bill Spitzak
Okay the actual bug is that the gnuplot output is wrong for subsample_bits==0. It apparently is correct for other values of subsampling. I will try to get an updated version posted soon. But I very much agree with Owen (and you?) that the current behavior is incorrect and should be fixed exactly

Re: [Pixman] [PATCH v14 12/22] pixman-filter: fix subsample_bits == 0

2016-04-10 Thread Bill Spitzak
On 04/09/2016 01:13 PM, Søren Sandmann wrote: On Sat, Apr 9, 2016 at 3:45 PM, Bill Spitzak <spit...@gmail.com <mailto:spit...@gmail.com>> wrote: On 04/03/2016 11:17 AM, Søren Sandmann wrote: I don't believe this patch is correct. As an example, consi

Re: [Pixman] [PATCH v14 12/22] pixman-filter: fix subsample_bits == 0

2016-04-09 Thread Bill Spitzak
On 04/03/2016 11:17 AM, Søren Sandmann wrote: I don't believe this patch is correct. As an example, consider an image with an identity transformation and a cubic filter (which has width 4) with subsample_bits = 0. The current code will compute a matrix [ cubic(-2), cubic(-1), cubic(0),

Re: [Pixman] [PATCH v14 12/22] pixman-filter: fix subsample_bits == 0

2016-04-04 Thread Bill Spitzak
, 2016 at 12:21 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > No, it changes behavior when the number of *phases* is odd, which it is in > the example I gave. > > > Søren > > On Mon, Apr 4, 2016 at 2:51 PM, Bill Spitzak <spit...@gmail.com> wrote:

Re: [Pixman] [PATCH v14 08/22] pixman-filter: rename "scale" to "size" when it is 1/scale

2016-04-04 Thread Bill Spitzak
ame term for different numbers. On Sun, Apr 3, 2016 at 9:29 AM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > I guess I can live with 'rscale' (for reciprocal scale). > > > Søren > > On Thu, Mar 24, 2016 at 9:30 PM, Bill Spitzak <spit...@gmail.com> wrote: > >&

Re: [Pixman] [PATCH v14 12/22] pixman-filter: fix subsample_bits == 0

2016-04-04 Thread Bill Spitzak
ate a matrix > with width 3, but since this would only work with subsample_bits=0, it's > not worth the special-casing. > > > On Sun, Mar 6, 2016 at 8:06 PM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> The position of on

Re: [Pixman] [PATCH v14 08/22] pixman-filter: rename "scale" to "size" when it is 1/scale

2016-03-24 Thread Bill Spitzak
Would using "iscale" (for inverse scale) work? Another is "tscale" because it is the scale from the transform matrix. I really would like to use two different names for these variables as it is really confusing using the same one. On Fri, Mar 18, 2016 at 8:24 AM, Bill Spitza

Re: [Pixman] [PATCH v14 10/22] pixman-filter: Correct integration with impulse filters

2016-03-22 Thread Bill Spitzak
On Mon, Mar 21, 2016 at 7:41 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > > > On Mon, Mar 21, 2016 at 12:29 PM, Bill Spitzak <spit...@gmail.com> wrote: > >> On Sun, Mar 20, 2016 at 11:36 PM, Søren Sandmann < >> soren.sandm...@gmail.com> wr

Re: [Pixman] [PATCH v14 16/22] pixman-filter: distribute normalization error over filter

2016-03-21 Thread Bill Spitzak
On Fri, Mar 18, 2016 at 6:54 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Sun, Mar 6, 2016 at 8:06 PM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> This removes a high-frequency spike in the middle of some fi

Re: [Pixman] [PATCH v14 10/22] pixman-filter: Correct integration with impulse filters

2016-03-21 Thread Bill Spitzak
On Sun, Mar 20, 2016 at 11:36 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Sun, Mar 6, 2016 at 8:06 PM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> The IMPULSE special-cases did not sample the cent

Re: [Pixman] [PATCHv2 3/3] More general BILINEAR=>NEAREST reduction

2016-03-19 Thread Bill Spitzak
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øre

Re: [Pixman] [PATCH v14 08/22] pixman-filter: rename "scale" to "size" when it is 1/scale

2016-03-19 Thread Bill Spitzak
ctually the filter width. How about "dx" and "dy" since it is almost always the derivative of the x and y in the input (or du,dv or dtx dtx) > > > Søren > > > On Sun, Mar 6, 2016 at 8:06 PM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <

Re: [Pixman] [PATCHv2 2/3] Add new test of filter reduction from BILINEAR to NEAREST

2016-03-18 Thread Bill Spitzak
Looks like a good idea to me. It is unfortunate that if it fails there is not much indication which image failed but that would require a lot more checksums. I would guess the checksums are computed by running this with the fast paths disabled? ___

Re: [Pixman] [PATCH 2/2] More general BILINEAR=>NEAREST reduction

2016-03-15 Thread Bill Spitzak
Seems correct and gets more cases than my code did (I was assuming nobody would use bilinear for scales less than 1/2 so I did not check for it). Minor comments: On Mon, Mar 14, 2016 at 11:19 PM, Søren Sandmann Pedersen < soren.sandm...@gmail.com> wrote: > Generalize and simplify the code that

Re: [Pixman] [PATCH 1/2] Add new test of filter reduction from BILINEAR to NEAREST

2016-03-15 Thread Bill Spitzak
Great idea to test this. On Mon, Mar 14, 2016 at 11:24 PM, Søren Sandmann wrote: > diff --git a/test/filter-reduction-test.c b/test/filter-reduction-test.c > >> new file mode 100644 >> index 000..72b3142 >> --- /dev/null >> +++ b/test/filter-reduction-test.c >> @@

Re: [Pixman] [PATCH v13 13/14] pixman-image: Implement PIXMAN_FILTER_GOOD/BEST as separable convolutions

2016-03-07 Thread Bill Spitzak
On Mon, Mar 7, 2016 at 1:15 AM, Pekka Paalanen <ppaala...@gmail.com> wrote: > On Fri, 4 Mar 2016 19:12:36 -0800 > Bill Spitzak <spit...@gmail.com> wrote: > > > On Fri, Mar 4, 2016 at 4:17 PM, Søren Sandmann <soren.sandm...@gmail.com > > > > wrote: > &

[Pixman] [PATCH v14 18/22] pixman-filter: Made Gaussian a bit wider

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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

[Pixman] [PATCH v14 07/22] pixman-filter: reduce amount of malloc/free/memcpy to generate filter

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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

[Pixman] [PATCH v14 04/22] demos/scale: fix blank subsamples spin box

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> It now shows the initial value of 4 when the demo is started Signed-off-by: Bill Spitzak <spit...@gmail.com> --- demos/scale.ui | 1 + 1 file changed, 1 insertion(+) diff --git a/demos/scale.ui b/demos/scale.ui index b62cbfb..6028ab7 100644

[Pixman] [PATCH v14 02/22] demos/scale: Added pulldown to choose PIXMAN_FILTER_* value

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This is very useful for comparing the results of SEPARABLE_CONVOLUTION with BILINEAR and NEAREST. v14: Removed good/best items Signed-off-by: Bill Spitzak <spit...@gmail.com> --- demos/scale.c | 12 +++- demos/s

[Pixman] [PATCH v14 14/22] pixman-filter: Do BOX.BOX much faster

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> The desired result from the integration is directly available, as the range has been clipped to the intersection of the two boxes. As this filter is probably the most common one, this optimization looks very useful. Signed-off-by: Bill Spitzak

[Pixman] [PATCH v14 22/22] demos/scale: Add good/best filter types

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> Allows testing them. Good is the default to match default behavior of pixman/cairo at startup. v14: Locked axis put in it's own commit Signed-off-by: Bill Spitzak <spit...@gmail.com> --- demos/scale.c | 12 +++- 1 file changed, 7 inse

[Pixman] [PATCH v14 06/22] pixman-image: Added enable-gnuplot config to view filters in gnuplot

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 dif

[Pixman] [PATCH v14 09/22] pixman-filter: Correct Simpsons integration

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 th

[Pixman] [PATCH v14 10/22] pixman-filter: Correct integration with impulse filters

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> The IMPULSE special-cases did not sample the center of the of the region. This caused it to sample the filters outside their range, and produce assymetric filters and other errors. Fixing this required changing the arguments to integral() so the c

[Pixman] [PATCH v14 17/22] pixman-filter: Nested polynomial for cubic

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> v11: Restored range checks Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- pixman/pixman-filter.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pixm

[Pixman] [PATCH v14 20/22] pixman-image: Detect all 8 transforms that can do nearest filter

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This patch consolidates the examination of the matrix into one place, and detects the reflected versions of the transforms that can be done with nearest filter. v14: Split this code from the GOOD/BEST as I think it will be accepted. Signed-off-by

[Pixman] [PATCH v14 13/22] pixman-filter: integral splitting is only needed for triangle filter

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> Only the triangle is discontinuous at 0. The other filters resemble a cubic closely enough that Simpsons integration works without splitting. Signed-off-by: Bill Spitzak <spit...@gmail.com> --- pixman/pixman-filter.c | 4 ++-- 1 file changed,

[Pixman] [PATCH v14 08/22] pixman-filter: rename "scale" to "size" when it is 1/scale

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This is to remove some confusion when reading the code. "scale" gets larger as the picture gets larger, while "size" (ie the size of the filter) gets smaller. v14: Removed changes to integral function Signed-off-by: Bill

[Pixman] [PATCH v14 16/22] pixman-filter: distribute normalization error over filter

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This removes a high-frequency spike in the middle of some filters that is caused by math errors all being in the same direction. Signed-off-by: Bill Spitzak <spit...@gmail.com> --- pixman/pixman-filter.c | 12 +++- 1 file changed, 1

[Pixman] [PATCH v14] Implement PIXMAN_FILTER_GOOD/BEST

2016-03-06 Thread spitzak
Changes from previous version: * The actual change to filtering separated from other changes that I think have more chance at being accepted. * Changes to integral function split into mulitple commits * Whitespace fixes * Good/best patch has fix for bug noticed by Søren

[Pixman] [PATCH v14 12/22] pixman-filter: fix subsample_bits == 0

2016-03-06 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> The position of only one subsample was wrong as ceil() was done on an integer. Use a different function for all odd numbers of subsamples that gets this right. Signed-off-by: Bill Spitzak <spit...@gmail.com> --- pixman/pixman-filter.c | 5 +

Re: [Pixman] [PATCH v13 13/14] pixman-image: Implement PIXMAN_FILTER_GOOD/BEST as separable convolutions

2016-03-05 Thread Bill Spitzak
I believe on the good/best patch you are worried about the freeing of the filter array. However in commit 756b54f6 you made pixman_set_filter always copy the one provided by the caller. This means my code works because the filter cannot be changed away from/to good/best without also freeing

Re: [Pixman] [PATCH v13 14/14] demos/scale: default to GOOD and locked-together axis

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 4:19 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > > From: Bill Spitzak <spit...@gmail.com> >> >> This makes the demo match normal behavior of pixman/cairo at start

Re: [Pixman] [PATCH v13 13/14] pixman-image: Implement PIXMAN_FILTER_GOOD/BEST as separable convolutions

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 4:17 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> Detects and uses PIXMAN_FILTER_NEAREST for all 8 90-degree r

Re: [Pixman] [PATCH v13 11/14] pixman-filter: Negative subsample values produces scaled result

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 3:49 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Tue, Feb 16, 2016 at 4:45 PM, Bill Spitzak <spit...@gmail.com> wrote: > >> I have a new version of this patch, which fixes a math error that >> caused it to produce too many sample

Re: [Pixman] [PATCH v13 10/14] pixman-filter: Gaussian fixes

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 3:39 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > > > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> The SIGMA term drops out on simplification. >&g

Re: [Pixman] [PATCH v13 08/14] pixman-filter: Corrections to the integral() function

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 3:12 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> The IMPULSE special-cases did not sample the center of the

Re: [Pixman] [PATCH v13 09/14] pixman-filter: Nested polynomial for cubic

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 3:05 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> v11: Restored range checks >> >> Signed-off-by:

Re: [Pixman] [PATCH v13 07/14] pixman-filter: Correct Simpsons integration

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 3:00 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> Simpsons uses cubic curve fitting, with 3 samples definin

Re: [Pixman] [PATCH v13 06/14] pixman-filter: reduce amount of malloc/free/memcpy to generate filter

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 2:52 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > > > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> Rearranged so that the entire block of

Re: [Pixman] [PATCH v13 05/14] pixman-filter: Consistency in arg names to integral ()

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 2:51 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> Rename kernel1/2 to reconstruct/sample to match the o

Re: [Pixman] [PATCH v13 03/14] demos/scale: Only generate filters when used for separable

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 2:44 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > > > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> This makes the speed of the demo more accurate, a

Re: [Pixman] [PATCH v13 02/14] demos/scale: Added pulldown to choose PIXMAN_FILTER_* value

2016-03-04 Thread Bill Spitzak
On Fri, Mar 4, 2016 at 2:41 PM, Søren Sandmann <soren.sandm...@gmail.com> wrote: > On Wed, Feb 10, 2016 at 1:25 AM, <spit...@gmail.com> wrote: > >> From: Bill Spitzak <spit...@gmail.com> >> >> This allows testing of GOOD/BEST and to d

Re: [Pixman] [PATCH v13 11/14] pixman-filter: Negative subsample values produces scaled result

2016-03-02 Thread Bill Spitzak
On 02/16/2016 01:58 PM, Oded Gabbay wrote: On Tue, Feb 16, 2016 at 11:45 PM, Bill Spitzak <spit...@gmail.com> wrote: I have a new version of this patch, which fixes a math error that caused it to produce too many samples at small sizes (large scales). I am not clear if I can submit

[Pixman] [PATCH v13 08/14] pixman-filter: Corrections to the integral() function

2016-02-09 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> The IMPULSE special-cases did not sample the center of the of the region. This caused it to sample the filters outside their range, and produce assymetric filters and other errors. Fixing this required changing the arguments to integral() so the c

[Pixman] [PATCH v13 03/14] demos/scale: Only generate filters when used for separable

2016-02-09 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This makes the speed of the demo more accurate, as the filter generation is a visible fraction of the time it takes to do a transform. This also prevents the output of unused filters in the gnuplot option in the next patch. Signed-off-by: Bill Spitzak

[Pixman] [PATCH v13 13/14] pixman-image: Implement PIXMAN_FILTER_GOOD/BEST as separable convolutions

2016-02-09 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> Detects and uses PIXMAN_FILTER_NEAREST for all 8 90-degree rotations and reflections when the scale is 1.0 and integer translation. GOOD uses: scale < 1/16 : BOX.BOX at size 16 scale < 3/4 : BOX.BOX at size 1/scale larger : BOX.BOX at size

[Pixman] [PATCH v13 11/14] pixman-filter: Negative subsample values produces scaled result

2016-02-09 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> The intention here is to produce approximately the same number of samples for each filter size (ie width*samples is the same). This means the caller can pass a constant rather than a different value for each size. To avoid conflict with existin

[Pixman] [PATCH v13 09/14] pixman-filter: Nested polynomial for cubic

2016-02-09 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> v11: Restored range checks Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- pixman/pixman-filter.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pixm

[Pixman] [PATCH v13 05/14] pixman-filter: Consistency in arg names to integral ()

2016-02-09 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> Rename kernel1/2 to reconstruct/sample to match the other functions. Rename "scale" to "size" to avoid confusion with the scale being applied to the image, which is the reciprocol of this value. v10: Renamed "scale" to

[Pixman] [PATCH v13 06/14] pixman-filter: reduce amount of malloc/free/memcpy to generate filter

2016-02-09 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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

[Pixman] [PATCH v13] Implement PIXMAN_FILTER_GOOD/BEST

2016-02-09 Thread spitzak
Changes since previous version: - Corrected mistaken reviewd-by to acked-by - Added another acked-by - Corrected errors in comments about the negative subsample patch ___ Pixman mailing list Pixman@lists.freedesktop.org

[Pixman] [PATCH v12 11/14] pixman-filter: Negative subsample values produces scaled result

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> The intention here is to produce approximately the same number of samples for each filter size (ie width*samples is the same). This means the caller can pass a constant rather than a different value for each size. To avoid conflict with existin

[Pixman] [PATCH v12 12/14] pixman-filter: Add description to pixman_filter_create_separable_convolution()

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> v9: Described arguments and more filter combinations, fixed some errors. v11: Further correction, in particular replaced "scale" with "size" Signed-off-by: Bill Spitzak <spit...@gmail.com> Acked-by: Oded Gabbay <oded.ga

[Pixman] [PATCH v12 06/14] pixman-filter: reduce amount of malloc/free/memcpy to generate filter

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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

[Pixman] [PATCH v12 14/14] demos/scale: default to GOOD and locked-together axis

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This makes the demo match normal behavior of pixman/cairo at startup. Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- demos/scale.c | 10 +- demos/scale.ui | 1 + 2 files cha

[Pixman] [PATCH v12 04/14] pixman-image: Added enable-gnuplot config to view filters in gnuplot

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 dif

[Pixman] [PATCH v12 01/14] demos/scale: Compute filter size using boundary of xformed ellipse, not rectangle

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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 <spit...@gmail.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- d

[Pixman] [PATCH v12 07/14] pixman-filter: Correct Simpsons integration

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> 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,6,6...6,2,1. Since it divide

[Pixman] [PATCH v12] Implement PIXMAN_FILTER_GOOD/BEST

2016-02-08 Thread spitzak
Changes since last version: - Removed blank line between signed-off and reviewed-by in commit message - More explanation of the -n subsamples idea in commit message - Code style fixes in #13 - More fixes to the big descriptive comment in #12 - Added more reviewed/acked comments

[Pixman] [PATCH v12 02/14] demos/scale: Added pulldown to choose PIXMAN_FILTER_* value

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This allows testing of GOOD/BEST and to do comparisons between the basic filters and PIXMAN_FILTER_SEPARABLE_CONVOLUTION settings. Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- d

[Pixman] [PATCH v12 08/14] pixman-filter: Corrections to the integral() function

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> The IMPULSE special-cases did not sample the center of the of the region. This caused it to sample the filters outside their range, and produce assymetric filters and other errors. Fixing this required changing the arguments to integral() so the c

[Pixman] [PATCH v12 13/14] pixman-image: Implement PIXMAN_FILTER_GOOD/BEST as separable convolutions

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> Detects and uses PIXMAN_FILTER_NEAREST for all 8 90-degree rotations and reflections when the scale is 1.0 and integer translation. GOOD uses: scale < 1/16 : BOX.BOX at size 16 scale < 3/4 : BOX.BOX at size 1/scale larger : BOX.BOX at size

[Pixman] [PATCH v12 03/14] demos/scale: Only generate filters when used for separable

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> This makes the speed of the demo more accurate, as the filter generation is a visible fraction of the time it takes to do a transform. This also prevents the output of unused filters in the gnuplot option in the next patch. Signed-off-by: Bill Spitzak

[Pixman] [PATCH v12 09/14] pixman-filter: Nested polynomial for cubic

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> v11: Restored range checks Signed-off-by: Bill Spitzak <spit...@gmail.com> Reviewed-by: Oded Gabbay <oded.gab...@gmail.com> --- pixman/pixman-filter.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pixm

[Pixman] [PATCH v12 05/14] pixman-filter: Consistency in arg names to integral ()

2016-02-08 Thread spitzak
From: Bill Spitzak <spit...@gmail.com> Rename kernel1/2 to reconstruct/sample to match the other functions. Rename "scale" to "size" to avoid confusion with the scale being applied to the image, which is the reciprocol of this value. v10: Renamed "scale" to

  1   2   3   4   >