rename nlines as n_lines

to improve consistency
This commit is contained in:
John Cupitt 2017-04-26 09:45:00 +01:00
parent 5cadbb9882
commit c0f5fcd975
7 changed files with 17 additions and 21 deletions

View File

@ -771,18 +771,18 @@ vips_image_preeval_cb( VipsImage *image, VipsProgress *progress, int *last )
{ {
int tile_width; int tile_width;
int tile_height; int tile_height;
int nlines; int n_lines;
*last = -1; *last = -1;
vips_get_tile_size( image, vips_get_tile_size( image,
&tile_width, &tile_height, &nlines ); &tile_width, &tile_height, &n_lines );
printf( _( "%s %s: %d x %d pixels, %d threads, %d x %d tiles, " printf( _( "%s %s: %d x %d pixels, %d threads, %d x %d tiles, "
"%d lines in buffer" ), "%d lines in buffer" ),
g_get_prgname(), image->filename, g_get_prgname(), image->filename,
image->Xsize, image->Ysize, image->Xsize, image->Ysize,
vips_concurrency_get(), vips_concurrency_get(),
tile_width, tile_height, nlines ); tile_width, tile_height, n_lines );
printf( "\n" ); printf( "\n" );
} }

View File

@ -211,7 +211,7 @@ vips_sink_base_init( SinkBase *sink_base, VipsImage *image )
vips_get_tile_size( image, vips_get_tile_size( image,
&sink_base->tile_width, &sink_base->tile_height, &sink_base->tile_width, &sink_base->tile_height,
&sink_base->nlines ); &sink_base->n_lines );
sink_base->processed = 0; sink_base->processed = 0;
} }

View File

@ -55,7 +55,7 @@ typedef struct _SinkBase {
*/ */
int tile_width; int tile_width;
int tile_height; int tile_height;
int nlines; int n_lines;
/* The number of pixels allocate has allocated. Used for progress /* The number of pixels allocate has allocated. Used for progress
* feedback. * feedback.

View File

@ -352,7 +352,7 @@ wbuffer_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
VIPS_DEBUG_MSG( "wbuffer_allocate_fn: " VIPS_DEBUG_MSG( "wbuffer_allocate_fn: "
"starting top = %d, height = %d\n", "starting top = %d, height = %d\n",
sink_base->y, sink_base->nlines ); sink_base->y, sink_base->n_lines );
/* Swap buffers. /* Swap buffers.
*/ */
@ -361,7 +361,7 @@ wbuffer_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
/* Position buf at the new y. /* Position buf at the new y.
*/ */
if( wbuffer_position( write->buf, if( wbuffer_position( write->buf,
sink_base->y, sink_base->nlines ) ) { sink_base->y, sink_base->n_lines ) ) {
*stop = TRUE; *stop = TRUE;
return( -1 ); return( -1 );
} }
@ -502,7 +502,7 @@ vips_sink_disc( VipsImage *im, VipsRegionWrite write_fn, void *a )
result = 0; result = 0;
if( !write.buf || if( !write.buf ||
!write.buf_back || !write.buf_back ||
wbuffer_position( write.buf, 0, write.sink_base.nlines ) || wbuffer_position( write.buf, 0, write.sink_base.n_lines ) ||
vips_threadpool_run( im, vips_threadpool_run( im,
write_thread_state_new, write_thread_state_new,
wbuffer_allocate_fn, wbuffer_allocate_fn,

View File

@ -211,7 +211,7 @@ sink_memory_area_allocate_fn( VipsThreadState *state, void *a, gboolean *stop )
/* Position buf at the new y. /* Position buf at the new y.
*/ */
sink_memory_area_position( memory->area, sink_memory_area_position( memory->area,
sink_base->y, sink_base->nlines ); sink_base->y, sink_base->n_lines );
} }
} }
@ -332,7 +332,7 @@ vips_sink_memory( VipsImage *image )
vips_image_preeval( image ); vips_image_preeval( image );
result = 0; result = 0;
sink_memory_area_position( memory.area, 0, memory.sink_base.nlines ); sink_memory_area_position( memory.area, 0, memory.sink_base.n_lines );
if( vips_threadpool_run( image, if( vips_threadpool_run( image,
sink_memory_thread_state_new, sink_memory_thread_state_new,
sink_memory_area_allocate_fn, sink_memory_area_allocate_fn,

View File

@ -234,14 +234,14 @@ vips_mosaic_class_init( VipsMosaicClass *class )
_( "Half window size" ), _( "Half window size" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsMosaic, hwindow ), G_STRUCT_OFFSET( VipsMosaic, hwindow ),
0, 1000000000, 1 ); 0, 1000000000, 5 );
VIPS_ARG_INT( class, "harea", 10, VIPS_ARG_INT( class, "harea", 10,
_( "harea" ), _( "harea" ),
_( "Half area size" ), _( "Half area size" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsMosaic, harea ), G_STRUCT_OFFSET( VipsMosaic, harea ),
0, 1000000000, 1 ); 0, 1000000000, 15 );
VIPS_ARG_INT( class, "mblend", 11, VIPS_ARG_INT( class, "mblend", 11,
_( "Max blend" ), _( "Max blend" ),
@ -335,8 +335,8 @@ vips_mosaic_init( VipsMosaic *mosaic )
* @sec is positioned so that the pixel (@xsec, @ysec) in @sec lies on top of * @sec is positioned so that the pixel (@xsec, @ysec) in @sec lies on top of
* the pixel (@xref, @yref) in @ref. The overlap area is divided into three * the pixel (@xref, @yref) in @ref. The overlap area is divided into three
* sections, 20 high-contrast points in band @bandno of image @ref are found * sections, 20 high-contrast points in band @bandno of image @ref are found
* in each, and each high-contrast point is searched for in @sec using * in each, and a window of pixels of size @hwindow around each high-contrast
* @hwindow and @harea (see vips_correl()). * point is searched for in @sec over an area of @harea.
* *
* A linear model is fitted to the 60 tie-points, points a long way from the * A linear model is fitted to the 60 tie-points, points a long way from the
* fit are discarded, and the model refitted until either too few points * fit are discarded, and the model refitted until either too few points

View File

@ -571,14 +571,14 @@ vips_mosaic1_class_init( VipsMosaic1Class *class )
_( "Half window size" ), _( "Half window size" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsMosaic1, hwindow ), G_STRUCT_OFFSET( VipsMosaic1, hwindow ),
0, 1000000000, 1 ); 0, 1000000000, 5 );
VIPS_ARG_INT( class, "harea", 14, VIPS_ARG_INT( class, "harea", 14,
_( "harea" ), _( "harea" ),
_( "Half area size" ), _( "Half area size" ),
VIPS_ARGUMENT_OPTIONAL_INPUT, VIPS_ARGUMENT_OPTIONAL_INPUT,
G_STRUCT_OFFSET( VipsMosaic1, harea ), G_STRUCT_OFFSET( VipsMosaic1, harea ),
0, 1000000000, 1 ); 0, 1000000000, 15 );
VIPS_ARG_BOOL( class, "search", 15, VIPS_ARG_BOOL( class, "search", 15,
_( "search" ), _( "search" ),
@ -647,13 +647,9 @@ vips_mosaic1_init( VipsMosaic1 *mosaic1 )
* given an approximate pair of tie-points. @sec is scaled and rotated as * given an approximate pair of tie-points. @sec is scaled and rotated as
* necessary before the join. * necessary before the join.
* *
* Before performing the transformation, the tie-points are improved by
* searching band @bandno in an area of @sec of size @hsearchsize for a
* match of size @hwindowsize to @ref.
*
* If @search is %TRUE, before performing the transformation, the tie-points * If @search is %TRUE, before performing the transformation, the tie-points
* are improved by searching an area of @sec of size @harea for a * are improved by searching an area of @sec of size @harea for a
* mosaic1 of size @hwindow to @ref. * object of size @hwindow in @ref.
* *
* @mblend limits the maximum size of the * @mblend limits the maximum size of the
* blend area. A value of "-1" means "unlimited". The two images are blended * blend area. A value of "-1" means "unlimited". The two images are blended