From 0951e2faa4efced6abc1578cb31de54231b43e8c Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 19 Dec 2012 14:50:01 +0000 Subject: [PATCH] still segving with labq --- TODO | 9 ++++++++- libvips/resample/affine.c | 23 +++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/TODO b/TODO index 8a5c50f4..bc95041c 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,13 @@ - im_benchmarkn segvs, im_affine wraopper is dropping a reference too early? -- test affine labq processing + try + + $ vips colourspace k2.jpg x.v + $ vips affine x.v x2.v "1 0 0 1.1" + Segmentation fault (core dumped) + + oo labq problem? + - quadratic doesn't work for order 3 diff --git a/libvips/resample/affine.c b/libvips/resample/affine.c index a25c0717..b55af651 100644 --- a/libvips/resample/affine.c +++ b/libvips/resample/affine.c @@ -486,10 +486,10 @@ vips_affine_build( VipsObject *object ) if( affine->trn.b == 0.0 && affine->trn.c == 0.0 ) vips_demand_hint( resample->out, - VIPS_DEMAND_STYLE_FATSTRIP, resample->in, NULL ); + VIPS_DEMAND_STYLE_FATSTRIP, in, NULL ); else vips_demand_hint( resample->out, - VIPS_DEMAND_STYLE_SMALLTILE, resample->in, NULL ); + VIPS_DEMAND_STYLE_SMALLTILE, in, NULL ); /* Generate! */ @@ -498,17 +498,24 @@ vips_affine_build( VipsObject *object ) in, affine ) ) return( -1 ); + /* + if( repack ) { + VipsImage *x; + + if( vips_LabS2LabQ( resample->out, &x, NULL ) ) + return( -1 ); + + VIPS_UNREF( resample->out ); + + resample->out = x; + } + */ + /* Finally: can now set Xoffset/Yoffset. */ resample->out->Xoffset = affine->trn.odx - affine->trn.oarea.left; resample->out->Yoffset = affine->trn.ody - affine->trn.oarea.top; - if( repack ) { - if( vips_LabS2LabQ( resample->out, &t[2], NULL ) ) - return( -1 ); - resample->out = t[2]; - } - return( 0 ); }