This commit is contained in:
John Cupitt 2011-08-09 12:45:42 +01:00
parent 1bded6682e
commit b494ce7a52
4 changed files with 25 additions and 8 deletions

8
TODO
View File

@ -1,3 +1,11 @@
- scrap acinclude.m4 and pout those macros into m4/
need to fix up bootstrap though, it wipes m4 currently
see http://www.gnu.org/s/hello/manual/automake/Local-Macros.html
- in benchmark, try:
vips im_benchmarkn temp.v temp2.v 1

View File

@ -177,7 +177,7 @@ fi
# argh
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# set $expanded_value to the full-expanded value of the argument
# set $expanded_value to the fully-expanded value of the argument
expand () {
eval expanded_value=$1

View File

@ -36,8 +36,8 @@
*/
/*
#define VIPS_DEBUG
*/
#define VIPS_DEBUG
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -384,6 +384,8 @@ wbuffer_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
vips_rect_intersectrect( &image, &tile, &state->pos );
wstate->buf = write->buf;
VIPS_DEBUG_MSG( " allocated %d x %d:\n", tile.left, tile.top );
/* Add to the number of writers on the buffer.
*/
vips_semaphore_upn( &write->buf->nwrite, -1 );
@ -402,11 +404,15 @@ wbuffer_work_fn( VipsThreadState *state, void *a )
{
WriteThreadState *wstate = (WriteThreadState *) state;
VIPS_DEBUG_MSG( "wbuffer_work_fn:\n" );
VIPS_DEBUG_MSG( "wbuffer_work_fn: %p %d x %d\n",
state, state->pos.left, state->pos.top );
if( vips_region_prepare_to( state->reg, wstate->buf->region,
&state->pos, state->pos.left, state->pos.top ) )
&state->pos, state->pos.left, state->pos.top ) ) {
VIPS_DEBUG_MSG( "wbuffer_work_fn: %p error!\n", state );
return( -1 );
}
VIPS_DEBUG_MSG( "wbuffer_work_fn: %p done\n", state );
/* Tell the bg write thread we've left.
*/

View File

@ -200,11 +200,12 @@ benchmark( IMAGE *in, IMAGE *out )
100, 100, t[0]->Xsize - 200, t[0]->Ysize - 200 ) ||
/* Shrink by 10%, bilinear interp.
*/
im_affinei_all( t[1], t[2],
vips_interpolate_bilinear_static(),
0.9, 0, 0, 0.9,
0, 0 ) ||
*/
im_copy( t[1], t[2] ) ||
/* Find L ~= 100 areas (white surround).
*/
@ -262,8 +263,9 @@ im_benchmarkn( IMAGE *in, IMAGE *out, int n )
if( n == 0 )
/* To sRGB.
*/
return( im_LabQ2disp( in, out, im_col_displays( 7 ) ) );
*/
return( im_copy( in, out ) );
else
return( im_open_local_array( out, t, 2, "benchmarkn", "p" ) ||
@ -273,7 +275,6 @@ im_benchmarkn( IMAGE *in, IMAGE *out, int n )
* benchmark does a 200 pixel crop plus a 10% shrink,
* so if we chain many of them together the image gets
* too small.
*/
im_affinei_all( t[0], t[1],
vips_interpolate_bilinear_static(),
(double) in->Xsize / t[0]->Xsize, 0, 0,
@ -281,6 +282,8 @@ im_benchmarkn( IMAGE *in, IMAGE *out, int n )
0, 0 ) ||
im_benchmarkn( t[1], out, n - 1 ) );
*/
im_benchmarkn( t[0], out, n - 1 ) );
}
/**