<div dir="ltr"><div>I guess I can live with 'rscale' (for reciprocal scale).<br><br><br></div>Søren<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 24, 2016 at 9:30 PM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Would using "iscale" (for inverse scale) work? Another is "tscale" because it is the scale from the transform matrix.<div><br></div><div>I really would like to use two different names for these variables as it is really confusing using the same one.</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 18, 2016 at 8:24 AM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Mar 17, 2016 at 10:06 PM, Søren Sandmann <span dir="ltr"><<a href="mailto:soren.sandmann@gmail.com" target="_blank">soren.sandmann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I suppose it's a little illogical that scale_x and scale_y really are the reciprocal values of how much the source image should be scaled. I don't remember exactly what I was thinking, but it might have something like "this allows you to just pass t[0][0] and t[1][1] if you have a pure scaling, which avoids a division". There is also kind of precedence in the Pixman API since the transformation given as in the dst->source direction.<br><br>I don't really like "size" either though. It's not really the size of the filter that we are specifying; it just happens to be proportional to it.<br></div><br>If it comes down to "size" and "scale", I prefer "scale".<br></div></blockquote><div><br></div></span><div>I tried "width" but it is not actually 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) </div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br><br></div><div>Søren<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Sun, Mar 6, 2016 at 8:06 PM, <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>From: Bill Spitzak <<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>><br>
<br>
This is to remove some confusion when reading the code. "scale" gets larger<br>
as the picture gets larger, while "size" (ie the size of the filter) gets<br>
smaller.<br>
<br>
v14: Removed changes to integral function<br>
<br>
Signed-off-by: Bill Spitzak <<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>><br>
Reviewed-by: Oded Gabbay <<a href="mailto:oded.gabbay@gmail.com" target="_blank">oded.gabbay@gmail.com</a>><br>
---<br>
pixman/pixman-filter.c | 18 +++++++++---------<br>
pixman/pixman.h | 6 +++---<br>
2 files changed, 12 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c<br>
index a29116a..c03a7f6 100644<br>
--- a/pixman/pixman-filter.c<br>
+++ b/pixman/pixman-filter.c<br>
@@ -221,7 +221,7 @@ static void<br>
create_1d_filter (int width,<br>
pixman_kernel_t reconstruct,<br>
pixman_kernel_t sample,<br>
- double scale,<br>
+ double size,<br>
int n_phases,<br>
pixman_fixed_t *p)<br>
{<br>
@@ -251,8 +251,8 @@ create_1d_filter (int width,<br>
double pos = x + 0.5 - frac;<br>
double rlow = - filters[reconstruct].width / 2.0;<br>
double rhigh = rlow + filters[reconstruct].width;<br>
- double slow = pos - scale * filters[sample].width / 2.0;<br>
- double shigh = slow + scale * filters[sample].width;<br>
+ double slow = pos - size * filters[sample].width / 2.0;<br>
+ double shigh = slow + size * filters[sample].width;<br>
double c = 0.0;<br>
double ilow, ihigh;<br>
<br>
@@ -262,7 +262,7 @@ create_1d_filter (int width,<br>
ihigh = MIN (shigh, rhigh);<br>
<br>
c = integral (reconstruct, ilow,<br>
- sample, 1.0 / scale, ilow - pos,<br>
+ sample, 1.0 / size, ilow - pos,<br>
ihigh - ilow);<br>
}<br>
<br>
@@ -335,12 +335,12 @@ filter_width (pixman_kernel_t reconstruct, pixman_kernel_t sample, double size)<br>
}<br>
<br>
/* Create the parameter list for a SEPARABLE_CONVOLUTION filter<br>
- * with the given kernels and scale parameters<br>
+ * with the given kernels and size parameters<br>
*/<br>
PIXMAN_EXPORT pixman_fixed_t *<br>
pixman_filter_create_separable_convolution (int *n_values,<br>
- pixman_fixed_t scale_x,<br>
- pixman_fixed_t scale_y,<br>
+ pixman_fixed_t size_x,<br>
+ pixman_fixed_t size_y,<br>
pixman_kernel_t reconstruct_x,<br>
pixman_kernel_t reconstruct_y,<br>
pixman_kernel_t sample_x,<br>
@@ -348,8 +348,8 @@ pixman_filter_create_separable_convolution (int *n_values,<br>
int subsample_bits_x,<br>
int subsample_bits_y)<br>
{<br>
- double sx = fabs (pixman_fixed_to_double (scale_x));<br>
- double sy = fabs (pixman_fixed_to_double (scale_y));<br>
+ double sx = fabs (pixman_fixed_to_double (size_x));<br>
+ double sy = fabs (pixman_fixed_to_double (size_y));<br>
pixman_fixed_t *params;<br>
int subsample_x, subsample_y;<br>
int width, height;<br>
diff --git a/pixman/pixman.h b/pixman/pixman.h<br>
index 509ba5e..b012a33 100644<br>
--- a/pixman/pixman.h<br>
+++ b/pixman/pixman.h<br>
@@ -845,12 +845,12 @@ typedef enum<br>
} pixman_kernel_t;<br>
<br>
/* Create the parameter list for a SEPARABLE_CONVOLUTION filter<br>
- * with the given kernels and scale parameters.<br>
+ * with the given kernels and size parameters.<br>
*/<br>
pixman_fixed_t *<br>
pixman_filter_create_separable_convolution (int *n_values,<br>
- pixman_fixed_t scale_x,<br>
- pixman_fixed_t scale_y,<br>
+ pixman_fixed_t size_x,<br>
+ pixman_fixed_t size_y,<br>
pixman_kernel_t reconstruct_x,<br>
pixman_kernel_t reconstruct_y,<br>
pixman_kernel_t sample_x,<br>
</div></div><span><font color="#888888"><span><font color="#888888">--<br>
1.9.1<br>
<br>
_______________________________________________<br>
Pixman mailing list<br>
<a href="mailto:Pixman@lists.freedesktop.org" target="_blank">Pixman@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pixman" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/pixman</a><br>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>