hacking
This commit is contained in:
parent
3837497613
commit
008af5ca16
@ -642,9 +642,6 @@ vips_tile_cache_gen( VipsRegion *or,
|
||||
g_mutex_lock( cache->lock );
|
||||
|
||||
if( result ) {
|
||||
printf( "vips_tile_cache_gen: "
|
||||
"error on tile %p\n", tile );
|
||||
|
||||
VIPS_DEBUG_MSG( "vips_tile_cache_gen: "
|
||||
"error on tile %p\n", tile );
|
||||
tile->state = VIPS_TILE_STATE_PEND;
|
||||
|
@ -58,11 +58,23 @@
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
we +1 valid.height to make sure that we always have ebnough lines for a x2
|
||||
shrink, even if tile_size is odd, or (tile_size + overlap) is odd, or
|
||||
(tile_size + 2 * overlap) is odd
|
||||
|
||||
so valid->height cannot be used to tell whether we have enough rows to be
|
||||
able to write a line of tiles, since we could be under but still OK:wq
|
||||
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
#define DEBUG_VERBOSE
|
||||
*/
|
||||
#define DEBUG
|
||||
#define VIPS_DEBUG
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
@ -593,9 +605,9 @@ strip_allocate( VipsThreadState *state, void *a, gboolean *stop )
|
||||
|
||||
VipsRect image;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf( "strip_allocate\n" );
|
||||
#endif /*DEBUG*/
|
||||
#endif /*DEBUG_VERBOSE*/
|
||||
|
||||
image.left = 0;
|
||||
image.top = 0;
|
||||
@ -617,9 +629,9 @@ strip_allocate( VipsThreadState *state, void *a, gboolean *stop )
|
||||
|
||||
if( vips_rect_isempty( &state->pos ) ) {
|
||||
*stop = TRUE;
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf( "strip_allocate: done\n" );
|
||||
#endif /*DEBUG*/
|
||||
#endif /*DEBUG_VERBOSE*/
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
@ -741,9 +753,9 @@ strip_work( VipsThreadState *state, void *a )
|
||||
VipsImage *x;
|
||||
VipsImage *t;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf( "strip_work\n" );
|
||||
#endif /*DEBUG*/
|
||||
#endif /*DEBUG_VERBOSE*/
|
||||
|
||||
if( tile_name( layer, buf,
|
||||
state->x / dz->tile_size, state->y / dz->tile_size ) )
|
||||
@ -800,9 +812,9 @@ strip_work( VipsThreadState *state, void *a )
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf( "strip_work: writing to %s\n", buf );
|
||||
#endif /*DEBUG*/
|
||||
#endif /*DEBUG_VERBOSE*/
|
||||
|
||||
if( vips_image_write_to_file( x, buf ) ) {
|
||||
g_object_unref( x );
|
||||
@ -810,9 +822,9 @@ strip_work( VipsThreadState *state, void *a )
|
||||
}
|
||||
g_object_unref( x );
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef DEBUG_VERBOSE
|
||||
printf( "strip_work: success\n" );
|
||||
#endif /*DEBUG*/
|
||||
#endif /*DEBUG_VERBOSE*/
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
@ -850,6 +862,8 @@ layer_generate_extras( Layer *layer )
|
||||
{
|
||||
VipsRegion *strip = layer->strip;
|
||||
|
||||
printf( "layer_generate_extras: layer->n == %d\n", layer->n );
|
||||
|
||||
/* We only work for full-width strips.
|
||||
*/
|
||||
g_assert( strip->valid.width == layer->image->Xsize );
|
||||
@ -859,6 +873,8 @@ layer_generate_extras( Layer *layer )
|
||||
|
||||
int b, y;
|
||||
|
||||
printf( "layer_generate_extras: adding column on right\n" );
|
||||
|
||||
/* Need to add a right-most column.
|
||||
*/
|
||||
for( y = 0; y < strip->valid.height; y++ ) {
|
||||
@ -874,6 +890,11 @@ layer_generate_extras( Layer *layer )
|
||||
if( layer->height < layer->image->Ysize ) {
|
||||
VipsRect last;
|
||||
|
||||
printf( "layer->height = %d\n", layer->height );
|
||||
printf( "layer->image->Ysize = %d\n", layer->image->Ysize );
|
||||
printf( "strip->valid.top = %d\n", strip->valid.top );
|
||||
printf( "strip->valid.height = %d\n", strip->valid.height );
|
||||
|
||||
/* The last two lines of the image.
|
||||
*/
|
||||
last.left = 0;
|
||||
@ -887,6 +908,8 @@ layer_generate_extras( Layer *layer )
|
||||
if( last.height == 2 ) {
|
||||
last.height = 1;
|
||||
|
||||
printf( "layer_generate_extras: adding row on bot\n" );
|
||||
|
||||
vips_region_copy( strip, strip, &last,
|
||||
0, last.top + 1 );
|
||||
}
|
||||
@ -927,6 +950,14 @@ strip_shrink( Layer *layer )
|
||||
target.height = to->valid.height;
|
||||
vips_rect_intersectrect( &target, &to->valid, &target );
|
||||
|
||||
printf( "strip_shrink: n == %d\n", layer->n );
|
||||
|
||||
printf( "from.top == %d\n", from->valid.top );
|
||||
printf( "from.height == %d\n", from->valid.height );
|
||||
|
||||
printf( "target.top == %d\n", target.top );
|
||||
printf( "target.height == %d\n", target.height );
|
||||
|
||||
/* Those pixels need this area of this layer.
|
||||
*/
|
||||
source.left = target.left * 2;
|
||||
@ -938,6 +969,9 @@ strip_shrink( Layer *layer )
|
||||
*/
|
||||
vips_rect_intersectrect( &source, &from->valid, &source );
|
||||
|
||||
printf( "source.top == %d\n", source.top );
|
||||
printf( "source.height == %d\n", source.height );
|
||||
|
||||
/* So these are the pixels in the layer below we can provide.
|
||||
*/
|
||||
target.left = source.left / 2;
|
||||
@ -945,6 +979,9 @@ strip_shrink( Layer *layer )
|
||||
target.width = source.width / 2;
|
||||
target.height = source.height / 2;
|
||||
|
||||
printf( "target.top == %d\n", target.top );
|
||||
printf( "target.height == %d\n", target.height );
|
||||
|
||||
/* None? All done.
|
||||
*/
|
||||
if( source.height < 2 )
|
||||
@ -1186,6 +1223,13 @@ vips_foreign_save_dz_build( VipsObject *object )
|
||||
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
printf( "vips_foreign_save_dz_build: tile_size == %d\n",
|
||||
dz->tile_size );
|
||||
printf( "vips_foreign_save_dz_build: overlap == %d\n",
|
||||
dz->overlap );
|
||||
#endif
|
||||
|
||||
/* Build the skeleton of the image pyramid.
|
||||
*/
|
||||
if( !(dz->layer = pyramid_build( dz,
|
||||
|
38
po/vips7.pot
38
po/vips7.pot
@ -9,7 +9,7 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||
"product=glib&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2013-02-13 21:59+0000\n"
|
||||
"POT-Creation-Date: 2013-02-21 18:15+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -185,7 +185,7 @@ msgstr ""
|
||||
#: ../libvips/conversion/extract.c:359 ../libvips/conversion/bandjoin.c:171
|
||||
#: ../libvips/conversion/bandbool.c:211 ../libvips/conversion/copy.c:321
|
||||
#: ../libvips/conversion/rot.c:359 ../libvips/conversion/replicate.c:196
|
||||
#: ../libvips/conversion/tilecache.c:424 ../libvips/conversion/embed.c:550
|
||||
#: ../libvips/conversion/tilecache.c:391 ../libvips/conversion/embed.c:550
|
||||
#: ../libvips/conversion/cache.c:100 ../libvips/conversion/recomb.c:204
|
||||
#: ../libvips/conversion/sequential.c:303 ../libvips/foreign/foreign.c:1357
|
||||
#: ../libvips/resample/resample.c:89
|
||||
@ -389,7 +389,7 @@ msgstr ""
|
||||
#: ../libvips/conversion/flatten.c:377 ../libvips/conversion/extract.c:200
|
||||
#: ../libvips/conversion/extract.c:360 ../libvips/conversion/copy.c:322
|
||||
#: ../libvips/conversion/rot.c:360 ../libvips/conversion/replicate.c:197
|
||||
#: ../libvips/conversion/tilecache.c:425 ../libvips/conversion/embed.c:551
|
||||
#: ../libvips/conversion/tilecache.c:392 ../libvips/conversion/embed.c:551
|
||||
#: ../libvips/conversion/cache.c:101 ../libvips/conversion/sequential.c:304
|
||||
msgid "Input image"
|
||||
msgstr ""
|
||||
@ -1055,61 +1055,61 @@ msgstr ""
|
||||
msgid "Top edge of sub in main"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:418 ../libvips/conversion/cache.c:96
|
||||
#: ../libvips/conversion/tilecache.c:385 ../libvips/conversion/cache.c:96
|
||||
msgid "cache an image"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:430 ../libvips/conversion/cache.c:113
|
||||
#: ../libvips/conversion/tilecache.c:397 ../libvips/conversion/cache.c:113
|
||||
#: ../libvips/conversion/sequential.c:316 ../libvips/foreign/tiffsave.c:222
|
||||
#: ../libvips/foreign/dzsave.c:1342
|
||||
msgid "Tile height"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:431 ../libvips/conversion/cache.c:114
|
||||
#: ../libvips/conversion/tilecache.c:398 ../libvips/conversion/cache.c:114
|
||||
#: ../libvips/conversion/sequential.c:317 ../libvips/foreign/tiffsave.c:223
|
||||
#: ../libvips/foreign/dzsave.c:1343
|
||||
msgid "Tile height in pixels"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:437
|
||||
#: ../libvips/conversion/tilecache.c:404
|
||||
msgid "Threaded"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:438
|
||||
#: ../libvips/conversion/tilecache.c:405
|
||||
msgid "Allow threaded access"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:444
|
||||
#: ../libvips/conversion/tilecache.c:411
|
||||
msgid "Strategy"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:445
|
||||
#: ../libvips/conversion/tilecache.c:412
|
||||
msgid "Expected access pattern"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:728
|
||||
#: ../libvips/conversion/tilecache.c:741
|
||||
msgid "cache an image as a set of tiles"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:732 ../libvips/conversion/cache.c:106
|
||||
#: ../libvips/conversion/tilecache.c:745 ../libvips/conversion/cache.c:106
|
||||
#: ../libvips/foreign/tiffsave.c:215 ../libvips/foreign/dzsave.c:1335
|
||||
msgid "Tile width"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:733 ../libvips/conversion/cache.c:107
|
||||
#: ../libvips/conversion/tilecache.c:746 ../libvips/conversion/cache.c:107
|
||||
#: ../libvips/foreign/tiffsave.c:216 ../libvips/foreign/dzsave.c:1336
|
||||
msgid "Tile width in pixels"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:739 ../libvips/conversion/cache.c:120
|
||||
#: ../libvips/conversion/tilecache.c:752 ../libvips/conversion/cache.c:120
|
||||
msgid "Max tiles"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:740 ../libvips/conversion/cache.c:121
|
||||
#: ../libvips/conversion/tilecache.c:753 ../libvips/conversion/cache.c:121
|
||||
msgid "Maximum number of tiles to cache"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/conversion/tilecache.c:896
|
||||
#: ../libvips/conversion/tilecache.c:909
|
||||
msgid "cache an image as a set of lines"
|
||||
msgstr ""
|
||||
|
||||
@ -2386,16 +2386,16 @@ msgstr ""
|
||||
msgid "unknown band format %d"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/iofuncs/header.c:733 ../libvips/iofuncs/generate.c:377
|
||||
#: ../libvips/iofuncs/header.c:750 ../libvips/iofuncs/generate.c:377
|
||||
msgid "too many images"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/iofuncs/header.c:903
|
||||
#: ../libvips/iofuncs/header.c:920
|
||||
#, c-format
|
||||
msgid "field \"%s\" not found"
|
||||
msgstr ""
|
||||
|
||||
#: ../libvips/iofuncs/header.c:1071
|
||||
#: ../libvips/iofuncs/header.c:1088
|
||||
#, c-format
|
||||
msgid "field \"%s\" is of type %s, not %s"
|
||||
msgstr ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user