use new hints and prepare everywhere
This commit is contained in:
parent
f302bd6570
commit
6b325145e4
@ -20,6 +20,9 @@
|
||||
- better support for bscale / bzero in fits images
|
||||
- deprecate vips_warn() / vips_info(); use g_warning() / g_info() instead
|
||||
- fix --vips-cache-max etc.
|
||||
- add compute reordering, plus some new API to support it:
|
||||
vips_reorder_margin_hint() and vips_reorder_prepare_many(), thanks
|
||||
aferrero2707
|
||||
|
||||
8/12/16 started 8.4.5
|
||||
- allow libgsf-1.14.26 to help centos, thanks tdiprima
|
||||
|
6
TODO
6
TODO
@ -1,9 +1,3 @@
|
||||
- use vips_reorder_prepare_many() elsewhere ... bandary,
|
||||
|
||||
- add vips_reorder_margin_hint() elsewhere ... morph, local hist,
|
||||
|
||||
|
||||
|
||||
|
||||
- not sure about utf8 error messages on win
|
||||
|
||||
|
@ -234,9 +234,8 @@ vips_colour_gen( VipsRegion *or,
|
||||
int i, y;
|
||||
VipsPel *p[MAX_INPUT_IMAGES], *q;
|
||||
|
||||
for( i = 0; ir[i]; i++ )
|
||||
if( vips_region_prepare( ir[i], r ) )
|
||||
return( -1 );
|
||||
if( vips_reorder_prepare_many( or->im, ir, r ) )
|
||||
return( -1 );
|
||||
|
||||
VIPS_GATE_START( "vips_colour_gen: work" );
|
||||
|
||||
|
@ -92,11 +92,10 @@ vips_bandary_gen( VipsRegion *or, void *seq, void *a, void *b, gboolean *stop )
|
||||
VipsPel *p[MAX_INPUT_IMAGES], *q;
|
||||
int y, i;
|
||||
|
||||
for( i = 0; i < bandary->n; i++ ) {
|
||||
if( vips_region_prepare( ir[i], r ) )
|
||||
return( -1 );
|
||||
if( vips_reorder_prepare_many( or->im, ir, r ) )
|
||||
return( -1 );
|
||||
for( i = 0; i < bandary->n; i++ )
|
||||
p[i] = VIPS_REGION_ADDR( ir[i], r->left, r->top );
|
||||
}
|
||||
p[i] = NULL;
|
||||
q = VIPS_REGION_ADDR( or, r->left, r->top );
|
||||
|
||||
|
@ -283,6 +283,9 @@ vips_blend_gen( VipsRegion *or, void *seq, void *client1, void *client2,
|
||||
else {
|
||||
/* Mix of set and clear ... ask for both then and else parts
|
||||
* and interleave.
|
||||
*
|
||||
* We can't use vips_reorder_prepare_many() since we always
|
||||
* want the c image first.
|
||||
*/
|
||||
if( vips_region_prepare( ir[0], r ) ||
|
||||
vips_region_prepare( ir[1], r ) )
|
||||
|
@ -125,6 +125,9 @@ vips_correlation_build( VipsObject *object )
|
||||
correlation->in_ready, correlation ) )
|
||||
return( -1 );
|
||||
|
||||
vips_reorder_margin_hint( correlation->out,
|
||||
correlation->ref->Xsize * correlation->ref->Ysize );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
@ -121,8 +121,7 @@ vips_sharpen_generate( VipsRegion *or,
|
||||
|
||||
int x, y;
|
||||
|
||||
if( vips_region_prepare( in[0], r ) ||
|
||||
vips_region_prepare( in[1], r ) )
|
||||
if( vips_reorder_prepare_many( or->im, in, r ) )
|
||||
return( -1 );
|
||||
|
||||
VIPS_GATE_START( "vips_sharpen_generate: work" );
|
||||
|
@ -649,12 +649,11 @@ process_region( VipsRegion *or, void *seq, void *a, void *b )
|
||||
|
||||
/* Prepare all input regions and make buffer pointers.
|
||||
*/
|
||||
for( i = 0; ir[i]; i++ ) {
|
||||
if( vips_region_prepare( ir[i], &or->valid ) )
|
||||
return( -1 );
|
||||
if( vips_reorder_prepare_many( or->im, ir, &or->valid ) )
|
||||
return( -1 );
|
||||
for( i = 0; ir[i]; i++ )
|
||||
p[i] = (PEL *) VIPS_REGION_ADDR( ir[i],
|
||||
or->valid.left, or->valid.top );
|
||||
}
|
||||
p[i] = NULL;
|
||||
q = (PEL *) VIPS_REGION_ADDR( or, or->valid.left, or->valid.top );
|
||||
|
||||
|
@ -280,6 +280,8 @@ vips_hist_local_build( VipsObject *object )
|
||||
local->out->Xoffset = 0;
|
||||
local->out->Yoffset = 0;
|
||||
|
||||
vips_reorder_margin_hint( local->out, local->width * local->height );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
@ -272,6 +272,8 @@ vips_stdif_build( VipsObject *object )
|
||||
stdif->out->Xoffset = 0;
|
||||
stdif->out->Yoffset = 0;
|
||||
|
||||
vips_reorder_margin_hint( stdif->out, stdif->width * stdif->height );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
@ -120,6 +120,9 @@ vips_morph_build( VipsObject *object )
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
vips_reorder_margin_hint( morph->out,
|
||||
morph->M->Xsize * morph->M->Ysize );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
@ -391,6 +391,8 @@ vips_rank_build( VipsObject *object )
|
||||
rank->out->Xoffset = 0;
|
||||
rank->out->Yoffset = 0;
|
||||
|
||||
vips_reorder_margin_hint( rank->out, rank->width * rank->height );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
@ -540,6 +540,8 @@ vips_reduceh_build( VipsObject *object )
|
||||
in, reduceh ) )
|
||||
return( -1 );
|
||||
|
||||
vips_reorder_margin_hint( resample->out, reduceh->n_point );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
@ -813,6 +813,8 @@ vips_reducev_raw( VipsReducev *reducev, VipsImage *in )
|
||||
in, reducev ) )
|
||||
return( -1 );
|
||||
|
||||
vips_reorder_margin_hint( resample->out, reducev->n_point );
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user