From: Bill Spitzak
Any error in filter normalization is placed on the center of odd-sized filters,
rather than 1 pixel to the right.
In particular this fixes the 1-wide filters produced by impulse sampling
so they are 1.0 rather than 0.0.
---
pixman/pixman-filter.c | 2 +-
1 file changed, 1
From: Bill Spitzak
This is easy as the caller already intersected the two boxes, so
the width is the integral.
---
pixman/pixman-filter.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 4aafa51..782f73d 100644
--- a/pixman/pixman
From: Bill Spitzak
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 which produced about 2x
the correct value
From: Bill Spitzak
This allows testing of GOOD/BEST and to do comparisons between
the basic filters and PIXMAN_FILTER_SEPARABLE_CONVOLUTION settings.
---
demos/scale.c | 14 +-
demos/scale.ui | 40 ++--
2 files changed, 43 insertions(+), 11
From: Bill Spitzak
With the cubic fix this is plenty accurate enough, far in excess of the pixman
fixed-point error limit. Likely even 16 samples is too many.
---
pixman/pixman-filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman
From: Bill Spitzak
Rename kernel1/2 to reconstruct/sample and use 1/scale as the
scale argument, thus matching the names in other functions.
---
pixman/pixman-filter.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/pixman/pixman-filter.c b
From: Bill Spitzak
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.
---
pixman/pixman-filter.c | 59
From: Bill Spitzak
The other filters do not check for x being in range, so there is
no reason for cubic to do so.
---
pixman/pixman-filter.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 7e10108
From: Bill Spitzak
If sample is IMPULSE and reconstruct is BOX or IMPULSE the sub-pixel
position of the sample is not relevant, so only one subsample is needed.
---
pixman/pixman-filter.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/pixman/pixman-filter.c b
From: Bill Spitzak
With the other patch to put error on the center pixel, this produces
the same result as BOX.IMPULSE filter.
---
pixman/pixman-filter.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 00126cd..64981cd 100644
--- a
From: Bill Spitzak
Only LINEAR is not differentiable at zero, so only do the recursive
split of the integral for it.
---
pixman/pixman-filter.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman
From: Bill Spitzak
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 1
If both directions
From: Bill Spitzak
This is much more accurate and less blurry. In particular the filtering does
not change as the image is rotated.
---
demos/scale.c | 43 ++-
1 file changed, 2 insertions(+), 41 deletions(-)
diff --git a/demos/scale.c b/demos/scale.c
This is identical to my previous series of patches except rebased atop the
current git master. Note that all patches except the last one are bug fixes
to produce correct filters, and do not produce any changes in pixman output.
IMHO the first 14 patches should be applied asap.
The last patch chang
From: Bill Spitzak
The other filters don't range-check, so there is no need for this
one to either. It is only called with x==0.
---
pixman/pixman-filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index fbc657d..00
From: Bill Spitzak
The SIGMA term drops out on simplification.
Expanded the size slightly (from ~4.25 to 5) to make the cutoff less noticable.
The filter is truncated at a value of .001 instead of .006, this new
value is less than 1/2 of 1/255, rather than greater than it.
---
pixman/pixman
From: Bill Spitzak
If GNUPLOT_OUTPUT is set, 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
Differences from previous version:
- Added compile-time option to pipe filters to gnuplot for analysis.
- Fixed integral when one of the filters is IMPULSE, previous version was
offsetting the sample from the center.
- Distribute fixed-point error on all samples, rather than putting it all
on th
From: Bill Spitzak
The SIGMA term drops out on simplification.
Expanded the size slightly (from ~4.25 to 5) to make the cutoff less noticable.
The filter is truncated at a value of .001 instead of .006, this new
value is less than 1/2 of 1/255, rather than greater than it.
---
pixman/pixman
From: Bill Spitzak
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 divided by
3 this produced
From: Bill Spitzak
Due to normalization these filters must all be identical (a single 1.0).
Also make IMPULSE.IMPULSE produce a width=1 filter, rather than zero
(which did not work).
---
pixman/pixman-filter.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a
From: Bill Spitzak
The other filters don't range-check, so there is no need for this
one to either. It is only called with x==0.
---
pixman/pixman-filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 0749e51..22
From: Bill Spitzak
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 1
If both directions
From: Bill Spitzak
The other filters do not check for x being in range, so there is
no reason for cubic to do so.
---
pixman/pixman-filter.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 2298235
From: Bill Spitzak
This replaces settings that don't work (because the filter cannot be normalized)
with something that produces an image.
---
pixman/pixman-filter.c | 4
1 file changed, 4 insertions(+)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index dba5c74..77
From: Bill Spitzak
This is much more accurate and less blurry. In particular the filtering does
not change as the image is rotated.
---
demos/scale.c | 102 +++---
1 file changed, 61 insertions(+), 41 deletions(-)
diff --git a/demos/scale.c b
From: Bill Spitzak
Rename kernel1/2 to reconstruct/sample and use 1/scale as the
scale argument, thus matching the names in other functions.
---
pixman/pixman-filter.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/pixman/pixman-filter.c b
From: Bill Spitzak
This allows testing of GOOD/BEST and to do comparisons between
the basic filters and PIXMAN_FILTER_SEPARABLE_CONVOLUTION settings.
---
demos/scale.c | 14 +-
demos/scale.ui | 40 ++--
2 files changed, 43 insertions(+), 11
From: Bill Spitzak
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 correct point could be
From: Bill Spitzak
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.
---
pixman/pixman-filter.c | 59
Changes from previous version:
- gnuplot output is now a config option
- Adjustment to cutoff between BEST filters for better match
- Reduced subsampling of GOOD/BEST from extreme value mistakenly used
___
Pixman mailing list
Pixman@lists.freedesktop.or
From: Bill Spitzak
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 correct point could be
From: Bill Spitzak
The other filters do not check for x being in range, so there is
no reason for cubic to do so.
v1: initial version
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/pixman/pixman
From: Bill Spitzak
Due to normalization these filters must all be identical (a single 1.0).
Also make IMPULSE.IMPULSE produce a width=1 filter, rather than zero
(which did not work).
v7: Replaced earlier tests for BOX.IMPULSE
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 14
From: Bill Spitzak
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
From: Bill Spitzak
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
Signed-off-by
From: Bill Spitzak
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
---
demos/scale.c | 102 +++---
1 file changed, 61 insertions(+), 41 deletions
From: Bill Spitzak
The SIGMA term drops out on simplification.
Expanded the size slightly (from ~4.25 to 5) to make the cutoff less noticable.
The filter is truncated at a value of .001 instead of .006, this new
value is less than 1/2 of 1/255, rather than greater than it.
v1: initial version
From: Bill Spitzak
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 divided by
3 this produced
From: Bill Spitzak
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
---
demos/scale.c | 14 +-
demos/scale.ui | 40 ++--
2 files
From: Bill Spitzak
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 1
If both directions
From: Bill Spitzak
The other filters don't range-check, so there is no need for this
one to either. It is only called with x==0.
v1: initial version
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pixman/p
From: Bill Spitzak
Rename kernel1/2 to reconstruct/sample and use 1/scale as the
scale argument, thus matching the names in other functions.
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git
From: Bill Spitzak
This replaces settings that don't work (because the filter cannot be normalized)
with something that produces an image.
v7: First version with this. Previously you got lots of strange garbage filters
that depended on the implementation.
Signed-off-by: Bill Sp
From: Bill Spitzak
v8: first version
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 23 ++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 3237036..0961cfc 100644
--- a/pixman/pixman-filter.c
From: Bill Spitzak
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
---
demos/scale.c | 102 +++---
1 file changed, 61 insertions(+), 41 deletions
Changes from previous version:
- Passes make check (previous one crashed in stress-test)
- Negative subsample_bits sets it to appx log2(-n/scale)
- Scale demo changed to default to the GOOD setting and allow negative
subsamples
- Some adjustment of the subsampling in GOOD/BEST
Compatibiliy notes
From: Bill Spitzak
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
---
demos/scale.c | 14 +-
demos/scale.ui | 40 ++--
2 files
From: Bill Spitzak
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
v1: first
From: Bill Spitzak
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
From: Bill Spitzak
This replaces settings that don't work (because the filter cannot be normalized)
with something that produces an image.
v7: First version with this. Previously you got lots of strange garbage filters
that depended on the implementation.
Signed-off-by: Bill Sp
From: Bill Spitzak
Rename kernel1/2 to reconstruct/sample and use 1/scale as the
scale argument, thus matching the names in other functions.
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git
From: Bill Spitzak
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 correct point could be
From: Bill Spitzak
Due to normalization these filters must all be identical (a single 1.0).
Also make IMPULSE.IMPULSE produce a width=1 filter, rather than zero
(which did not work).
v7: Replaced earlier tests for BOX.IMPULSE
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 14
From: Bill Spitzak
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 divided by
3 this produced
From: Bill Spitzak
The integral will not be called outside the width so there is no need
to check against these.
v9: merged commits for cubic and impulse into same one
v1: initial version
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 18 --
1 file changed, 8
From: Bill Spitzak
v9: Described arguments and more filter combinations, fixed some errors.
v8: first version
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 46 +-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/pixman/pixman
From: Bill Spitzak
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 1
If both directions
From: Bill Spitzak
The SIGMA term drops out on simplification.
Expanded the size slightly (from ~4.25 to 5) to make the cutoff less noticable.
The filter is truncated at a value of .001 instead of .006, this new
value is less than 1/2 of 1/255, rather than greater than it.
v1: initial version
From: Bill Spitzak
This was not calculating the correct x to compute the filter at.
v9: First version with this patch
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
From: Bill Spitzak
If a negative value is used for the subsampling, then -n subsamples are
used at scale==1, and fewer are used at larger scale, more are used at
smaller scale, so that the total number of samples is approximately
the same. The computed value is rounded up to the next power of 2
From: Bill Spitzak
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
Reviewed-by: Oded Gabbay
---
demos/scale.c | 14 +-
demos/scale.ui | 40
Changes from previous version:
- Some refactor to reduce size of each patch
- Fixed rebase error that made some patches not compile
- Renamed "scale" to "size" to avoid confusion with the transform scale
Compatibiliy notes:
For the default filter of GOOD this produces the same BILINEAR result for
From: Bill Spitzak
The integral will not be called outside the width so there is no need
to check against these.
v9: merged commits for cubic and impulse into same one
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 18 --
1 file changed, 8 insertions(+), 10
From: Bill Spitzak
This replaces settings that don't work (because the filter cannot be normalized)
with something that produces an image.
v7: First version with this. Previously you got lots of strange garbage filters
that depended on the implementation.
v10: Moved code to filter_
From: Bill Spitzak
v9: Described arguments and more filter combinations, fixed some errors.
Signed-off-by: Bill Spitzak
Reviewed-by: Oded Gabbay
---
pixman/pixman-filter.c | 45 +
1 file changed, 45 insertions(+)
diff --git a/pixman/pixman
From: Bill Spitzak
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 1
If both directions
From: Bill Spitzak
If a negative value is used for the subsampling, then -n subsamples are
used at scale==1, and fewer are used at larger scale, more are used at
smaller scale, so that the total number of samples is approximately
the same. The computed value is rounded up to the next power of 2
From: Bill Spitzak
Due to normalization these filters must all be identical (a single 1.0).
Also make IMPULSE.IMPULSE produce a width=1 filter, rather than zero
(which did not work).
v7: Replaced earlier tests for BOX.IMPULSE
v10: Moved code to filter_width function
Signed-off-by: Bill
From: Bill Spitzak
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
From: Bill Spitzak
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 correct point could be
From: Bill Spitzak
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
From: Bill Spitzak
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
Reviewed-by: Oded Gabbay
---
demos/scale.c | 102 +++---
1 file changed, 61
From: Bill Spitzak
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
---
demos/scale.c | 29
From: Bill Spitzak
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 "size"
Signed-
From: Bill Spitzak
The SIGMA term drops out on simplification.
Expanded the size slightly (from ~4.25 to 5) to make the cutoff less noticable.
The filter is truncated at a value of .001 instead of .006, this new
value is less than 1/2 of 1/255, rather than greater than it.
Signed-off-by: Bill
From: Bill Spitzak
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 divided by
3 this produced
From: Bill Spitzak
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
Reviewed-by: Oded Gabbay
---
demos/scale.c | 102 +++---
1 file changed, 61
From: Bill Spitzak
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 correct point could be
From: Bill Spitzak
v9: Described arguments and more filter combinations, fixed some errors.
v11: Further correction, in particular replaced "scale" with "size"
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 50 ++
From: Bill Spitzak
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 "size"
Signed-
From: Bill Spitzak
v11: Restored range checks
Signed-off-by: Bill Spitzak
---
pixman/pixman-filter.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index e82871f..e5ef8e6 100644
--- a/pixman/pixman-filter.c
From: Bill Spitzak
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 divided by
3 this produced
From: Bill Spitzak
If a negative value is used for the subsampling, then -n subsamples are
used at scale==1, and fewer are used at larger scale, more are used at
smaller scale, so that the total number of samples is approximately
the same. The computed value is rounded up to the next power of 2
From: Bill Spitzak
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 1
If both directions
From: Bill Spitzak
This makes the demo match normal behavior of pixman/cairo at startup.
Signed-off-by: Bill Spitzak
---
demos/scale.c | 10 +-
demos/scale.ui | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/demos/scale.c b/demos/scale.c
index 6d7ad2a..d1fce5d
From: Bill Spitzak
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
Reviewed-by: Oded Gabbay
---
demos/scale.c | 14 +-
demos/scale.ui | 40
Changes form previous version:
- whitespace and formatting fixes
- removed "fixes" for IMPULSE.x at size < 1 or IMPULSE.IMPULSE, just let them
produce unusable filters, since caller can avoid doing this.
- removed patch that deleted range checks
- simplification of the filter_width function
- fix
From: Bill Spitzak
The SIGMA term drops out on simplification.
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
From: Bill Spitzak
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
From: Bill Spitzak
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
Reviewed-by: Oded
From: Bill Spitzak
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
From: Bill Spitzak
v11: Restored range checks
Signed-off-by: Bill Spitzak
Reviewed-by: Oded Gabbay
---
pixman/pixman-filter.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index e82871f..e5ef8e6 100644
--- a
From: Bill Spitzak
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 "size"
Signed
From: Bill Spitzak
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 correct point could be
From: Bill Spitzak
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 1
If both directions
From: Bill Spitzak
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
Reviewed-by: Oded
From: Bill Spitzak
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 existing code, negative numbers are used
From: Bill Spitzak
v9: Described arguments and more filter combinations, fixed some errors.
v11: Further correction, in particular replaced "scale" with "size"
Signed-off-by: Bill Spitzak
Acked-by: Oded Gabbay
---
pixman/
From: Bill Spitzak
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
1 - 100 of 442 matches
Mail list logo