fix demand hints for shrink
"vips shrink" was broken due to wonky demand hints, thanks Jan
This commit is contained in:
parent
9cb1403b9b
commit
0c6da0c330
@ -1,6 +1,7 @@
|
|||||||
12/3/13 started 7.32.2
|
12/3/13 started 7.32.2
|
||||||
- removed some left-over debugging code from configure.ac
|
- removed some left-over debugging code from configure.ac
|
||||||
- better error messages from vips.c
|
- better error messages from vips.c
|
||||||
|
- fix demand hints so "vips shrink" works again, thanks Jan
|
||||||
|
|
||||||
6/2/13 started 7.32.1
|
6/2/13 started 7.32.1
|
||||||
- fix --without-lcms, thanks speckins
|
- fix --without-lcms, thanks speckins
|
||||||
|
@ -746,7 +746,7 @@ read_jpeg_header( ReadJpeg *jpeg, VipsImage *out )
|
|||||||
interpretation,
|
interpretation,
|
||||||
xres, yres );
|
xres, yres );
|
||||||
|
|
||||||
vips_demand_hint( out, VIPS_DEMAND_STYLE_FATSTRIP, NULL );
|
vips_demand_hint( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL );
|
||||||
|
|
||||||
/* Interlaced jpegs need lots of memory to read, so our caller needs
|
/* Interlaced jpegs need lots of memory to read, so our caller needs
|
||||||
* to know.
|
* to know.
|
||||||
|
@ -318,9 +318,10 @@ png2vips_header( Read *read, VipsImage *out )
|
|||||||
VIPS_CODING_NONE, interpretation,
|
VIPS_CODING_NONE, interpretation,
|
||||||
Xres, Yres );
|
Xres, Yres );
|
||||||
|
|
||||||
/* We're always supposed to set dhint.
|
/* Sequential mode needs thinstrip to work with things like
|
||||||
|
* vips_shrink().
|
||||||
*/
|
*/
|
||||||
vips_demand_hint( out, VIPS_DEMAND_STYLE_FATSTRIP, NULL );
|
vips_demand_hint( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL );
|
||||||
|
|
||||||
/* Fetch the ICC profile. @name is useless, something like "icc" or
|
/* Fetch the ICC profile. @name is useless, something like "icc" or
|
||||||
* "ICC Profile" etc. Ignore it.
|
* "ICC Profile" etc. Ignore it.
|
||||||
|
@ -84,6 +84,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
#define VIPS_DEBUG
|
#define VIPS_DEBUG
|
||||||
|
#define DEBUG
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -539,8 +539,10 @@ vips_image_preeval_cb( VipsImage *image, VipsProgress *progress, int *last )
|
|||||||
|
|
||||||
vips_get_tile_size( image,
|
vips_get_tile_size( image,
|
||||||
&tile_width, &tile_height, &nlines );
|
&tile_width, &tile_height, &nlines );
|
||||||
printf( _( "%s %s: %d threads, %d x %d tiles, groups of %d scanlines" ),
|
printf( _( "%s %s: %d x %d pixels, %d threads, %d x %d tiles, "
|
||||||
|
"%d lines in buffer" ),
|
||||||
g_get_prgname(), image->filename,
|
g_get_prgname(), image->filename,
|
||||||
|
image->Xsize, image->Ysize,
|
||||||
vips_concurrency_get(),
|
vips_concurrency_get(),
|
||||||
tile_width, tile_height, nlines );
|
tile_width, tile_height, nlines );
|
||||||
printf( "\n" );
|
printf( "\n" );
|
||||||
|
@ -36,6 +36,8 @@
|
|||||||
* - some tuning .. tried an int coordinate path, not worthwhile
|
* - some tuning .. tried an int coordinate path, not worthwhile
|
||||||
* 16/11/12
|
* 16/11/12
|
||||||
* - don't change xres/yres, see comment below
|
* - don't change xres/yres, see comment below
|
||||||
|
* 8/4/13
|
||||||
|
* - oops demand_hint was incorrect, thanks Jan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -331,12 +333,12 @@ vips_shrink_build( VipsObject *object )
|
|||||||
if( vips_image_copy_fields( resample->out, resample->in ) )
|
if( vips_image_copy_fields( resample->out, resample->in ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
|
||||||
/* THINSTRIP will work, FATSTRIP will break seq mode. If you combine
|
/* THINSTRIP will work, anything else will break seq mode. If you
|
||||||
* shrink with conv you'll need to use a line cache to maintain
|
* combine shrink with conv you'll need to use a line cache to maintain
|
||||||
* sequentiality.
|
* sequentiality.
|
||||||
*/
|
*/
|
||||||
vips_demand_hint( resample->out,
|
vips_demand_hint( resample->out,
|
||||||
VIPS_DEMAND_STYLE_ANY, resample->in, NULL );
|
VIPS_DEMAND_STYLE_THINSTRIP, resample->in, NULL );
|
||||||
|
|
||||||
/* Size output. Note: we round the output width down!
|
/* Size output. Note: we round the output width down!
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user