fix compile
This commit is contained in:
parent
dc7902b12f
commit
f12fef4aa9
15
TODO
15
TODO
@ -1,8 +1,17 @@
|
|||||||
- rename l3 on top of reduce
|
- try:
|
||||||
|
|
||||||
- need tests for reducel3, test every kernel plues every numeric type
|
$ ./test_resample.py TestResample.test_reduce
|
||||||
|
File "./test_resample.py", line 129, in test_reduce
|
||||||
|
self.assertLess(d, 5)
|
||||||
|
AssertionError: 147.0 not less than 5
|
||||||
|
|
||||||
- try orc version of reducev?
|
affine bicubic != reduce cubic
|
||||||
|
|
||||||
|
displacement error, I guess?
|
||||||
|
|
||||||
|
- need more tests for reduce, test every kernel plus every numeric type
|
||||||
|
|
||||||
|
- try orc version of reducev? and shrinkv? maybe shrinkh?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ reducev_unsigned_uint8_6tab( VipsPel *out, const VipsPel *in,
|
|||||||
{
|
{
|
||||||
const int l1 = lskip;
|
const int l1 = lskip;
|
||||||
const int l2 = l1 + l1;
|
const int l2 = l1 + l1;
|
||||||
const int = l1 + l2;
|
const int l3 = l1 + l2;
|
||||||
const int l4 = l2 + l2;
|
const int l4 = l2 + l2;
|
||||||
const int l5 = l4 + l1;
|
const int l5 = l4 + l1;
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ reducev_unsigned_uint8_6tab( VipsPel *out, const VipsPel *in,
|
|||||||
c0 * in[0] +
|
c0 * in[0] +
|
||||||
c1 * in[l1] +
|
c1 * in[l1] +
|
||||||
c2 * in[l2] +
|
c2 * in[l2] +
|
||||||
c3 * in[] +
|
c3 * in[l3] +
|
||||||
c4 * in[l4] +
|
c4 * in[l4] +
|
||||||
c5 * in[l5] );
|
c5 * in[l5] );
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ vips_resize_build( VipsObject *object )
|
|||||||
vips_info( class->nickname, "residual reduce by %g x %g",
|
vips_info( class->nickname, "residual reduce by %g x %g",
|
||||||
hresidual, vresidual );
|
hresidual, vresidual );
|
||||||
|
|
||||||
if( vips_reducel3( in, &t[2],
|
if( vips_reduce( in, &t[2],
|
||||||
1.0 / hresidual, 1.0 / vresidual, NULL ) )
|
1.0 / hresidual, 1.0 / vresidual, NULL ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
in = t[2];
|
in = t[2];
|
||||||
|
@ -110,8 +110,8 @@ class TestCreate(unittest.TestCase):
|
|||||||
|
|
||||||
def test_gaussmat(self):
|
def test_gaussmat(self):
|
||||||
im = Vips.Image.gaussmat(1, 0.1)
|
im = Vips.Image.gaussmat(1, 0.1)
|
||||||
self.assertEqual(im.width, 7)
|
self.assertEqual(im.width, 5)
|
||||||
self.assertEqual(im.height, 7)
|
self.assertEqual(im.height, 5)
|
||||||
self.assertEqual(im.bands, 1)
|
self.assertEqual(im.bands, 1)
|
||||||
self.assertEqual(im.format, Vips.BandFormat.DOUBLE)
|
self.assertEqual(im.format, Vips.BandFormat.DOUBLE)
|
||||||
self.assertEqual(im.max(), 20)
|
self.assertEqual(im.max(), 20)
|
||||||
@ -123,7 +123,7 @@ class TestCreate(unittest.TestCase):
|
|||||||
|
|
||||||
im = Vips.Image.gaussmat(1, 0.1,
|
im = Vips.Image.gaussmat(1, 0.1,
|
||||||
separable = True, precision = "float")
|
separable = True, precision = "float")
|
||||||
self.assertEqual(im.width, 7)
|
self.assertEqual(im.width, 5)
|
||||||
self.assertEqual(im.height, 1)
|
self.assertEqual(im.height, 1)
|
||||||
self.assertEqual(im.bands, 1)
|
self.assertEqual(im.bands, 1)
|
||||||
self.assertEqual(im.format, Vips.BandFormat.DOUBLE)
|
self.assertEqual(im.format, Vips.BandFormat.DOUBLE)
|
||||||
|
@ -121,7 +121,7 @@ class TestResample(unittest.TestCase):
|
|||||||
for fac in [1, 1.1, 1.5, 1.999]:
|
for fac in [1, 1.1, 1.5, 1.999]:
|
||||||
for fmt in all_formats:
|
for fmt in all_formats:
|
||||||
x = im.cast(fmt)
|
x = im.cast(fmt)
|
||||||
r = x.reduce(fac, fac)
|
r = x.reduce(fac, fac, kernel = "cubic")
|
||||||
a = x.affine([1.0 / fac, 0, 0, 1.0 / fac],
|
a = x.affine([1.0 / fac, 0, 0, 1.0 / fac],
|
||||||
interpolate = bicubic,
|
interpolate = bicubic,
|
||||||
oarea = [0, 0, x.width / fac, x.height / fac])
|
oarea = [0, 0, x.width / fac, x.height / fac])
|
||||||
|
Loading…
Reference in New Issue
Block a user