Commit Graph

20 Commits

Author SHA1 Message Date
John Cupitt 271d8656e9 use round() rather than rint() where appropriate
rint() rounds to nearest even, rather than nearest ... in some cases,
like geometry transforms, we want strict nearest
2016-08-20 12:59:41 +01:00
John Cupitt 1f403a4add first attempt
seems to all work, test it a bit more

see https://github.com/jcupitt/libvips/issues/491
2016-08-15 15:45:26 +01:00
John Cupitt b6768a7e0f small speedup for reduceh 2016-08-01 12:04:15 +01:00
John Cupitt f3326c8126 better vips_resize() for cubic/linear/nearest
vips_resize() used to do most of a downsize with vips_shrink() and the
final 200 - 300% with vips_reduce(). This was correct for lanczos2/3,
but not right for linear/cubic, which need more shrink and less
reduce to avoid aliasing.

This patch makes vips_resize() leave the final 100 - 200% to
vips_reduce() for linear/cubic, and leave everything to reduce for
nearest.
2016-06-16 09:46:02 +01:00
John Cupitt 65b9ced6e9 improve arg order
more consistent
2016-04-11 13:23:25 +01:00
John Cupitt 269cbb8641 better mask sizing for lanczos 2016-04-11 13:19:00 +01:00
John Cupitt 3c98ba78a0 small experiment 2016-03-22 14:19:32 +00:00
John Cupitt e8b5cb6c23 add VIPS_COUNT_PIXELS, overcomputation tracking
added VIPS_COUNT_PIXELS(), use like this:

	static int vips_shrinkh_gen( VipsRegion *or, ... )
	{
        	VIPS_COUNT_PIXELS( or, "vips_shrinkh_gen" );
	}

and on image close, if more than 100% of the pixels have been
calculated, you get a warning

only if you enable debugging, since this hurts perf slightly
2016-03-22 12:26:45 +00:00
John Cupitt c2035eb0f0 similarity uses reduce more often 2016-03-21 14:18:01 +00:00
John Cupitt 05156edd15 add orc path for reducev
works, but still not quite right, see some banding
2016-03-18 17:41:51 +00:00
John Cupitt c20eb9dca0 remove old unrolled case for reduce
not used any more
2016-03-15 17:34:31 +00:00
John Cupitt 46a18118c6 works! 2016-03-15 16:46:18 +00:00
John Cupitt ff88087a28 try making the reduce mask larger with residual 2016-03-15 14:59:59 +00:00
John Cupitt fba2ac2f85 fix sizing issues with new reduce code
a couple of bugs and some changed conventions
2016-03-13 17:44:24 +00:00
John Cupitt dc7902b12f Merge branch 'master' into add-lanczos3 2016-03-13 11:23:03 +00:00
John Cupitt 013102de01 finish hl3 version
vl3 nest
2016-03-10 08:43:50 +00:00
John Cupitt dcd921d7bf silly travis 2016-03-09 13:06:03 +00:00
John Cupitt e9728e389b first commit 2016-03-09 12:56:30 +00:00
John Cupitt 8cffd136e9 finish reduce
and fix up bicubic a bit, it works better on int32 images now
2016-02-07 17:41:39 +00:00
John Cupitt fbe010b80a in-line reduceh as well 2016-01-29 15:01:54 +00:00