diff --git a/TODO b/TODO index 7e0e5607..84791ff5 100644 --- a/TODO +++ b/TODO @@ -1,21 +1,3 @@ -- relational/video still to do - -- built with O2, experiment with - - - floorf() - - try commenting out the thing that calculates cardinal_one etc. to get - an idea of the possible speedup with LUTs - - time for uchar vs. vips-bilinear and new bilinear and float yafr - - can we build and time gegl? - - - add a vips_interpolate_get_method() which returns the function pointer, use - that in the inner loop instead of function dispatch - - done ... try editing im_affinei and time - - - - vips_object_print, set_name etc. need writing - im_buf_t -> VipsBuf diff --git a/libsrc/relational/im_blend.c b/libsrc/relational/im_blend.c index 5463a1aa..b7639fb7 100644 --- a/libsrc/relational/im_blend.c +++ b/libsrc/relational/im_blend.c @@ -327,24 +327,25 @@ im_blend( IMAGE *c, IMAGE *a, IMAGE *b, IMAGE *out ) */ if( a->Coding != IM_CODING_NONE || b->Coding != IM_CODING_NONE || c->Coding != IM_CODING_NONE ) { - im_error( "im_blend", _( "images not uncoded" ) ); + im_error( "im_blend", "%s", _( "images not uncoded" ) ); return( -1 ); } if( a->BandFmt != b->BandFmt || a->Bands != b->Bands ) { im_error( "im_blend", - _( "size and format of then and else must match" ) ); + "%s", _( "size and format of then and else " + "must match" ) ); return( -1 ); } if( c->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im_blend", - _( "conditional image must be uchar" ) ); + "%s", _( "conditional image must be uchar" ) ); return( -1 ); } if( c->Bands != 1 && c->Bands != a->Bands ) { im_error( "im_blend", - _( "conditional image must be one band or same as " - "then and else images" ) ); + "%s", _( "conditional image must be one band or " + "same as then and else images" ) ); return( -1 ); } if( im_piocheck( c, out ) || im_pincheck( a ) || im_pincheck( b ) ) diff --git a/libsrc/relational/im_ifthenelse.c b/libsrc/relational/im_ifthenelse.c index 5f70d954..9eb01cb4 100644 --- a/libsrc/relational/im_ifthenelse.c +++ b/libsrc/relational/im_ifthenelse.c @@ -167,34 +167,35 @@ im_ifthenelse( IMAGE *c, IMAGE *a, IMAGE *b, IMAGE *out ) */ if( a->Coding != IM_CODING_NONE && a->Coding != IM_CODING_LABQ ) { im_error( "im_ifthenelse", - _( "then image must be uncoded or labpack" ) ); + "%s", _( "then image must be uncoded or labpack" ) ); return( -1 ); } if( b->Coding != IM_CODING_NONE && b->Coding != IM_CODING_LABQ ) { im_error( "im_ifthenelse", - _( "else image must be uncoded or labpack" ) ); + "%s", _( "else image must be uncoded or labpack" ) ); return( -1 ); } if( c->Coding != IM_CODING_NONE ) { im_error( "im_ifthenelse", - _( "condition image must be uncoded" ) ); + "%s", _( "condition image must be uncoded" ) ); return( -1 ); } if( a->BandFmt != b->BandFmt || a->Bands != b->Bands ) { im_error( "im_ifthenelse", - _( "size and format of then and else must match" ) ); + "%s", _( "size and format of then and else " + "must match" ) ); return( -1 ); } if( c->BandFmt != IM_BANDFMT_UCHAR ) { im_error( "im_ifthenelse", - _( "conditional image must be uchar" ) ); + "%s", _( "conditional image must be uchar" ) ); return( -1 ); } if( c->Bands != 1 && c->Bands != a->Bands ) { im_error( "im_ifthenelse", - _( "conditional image must be one band or same as " - "then and else images" ) ); + "%s", _( "conditional image must be one band or same " + "as then and else images" ) ); return( -1 ); } diff --git a/libsrc/video/im_video_test.c b/libsrc/video/im_video_test.c index b2144f2a..31f81e53 100644 --- a/libsrc/video/im_video_test.c +++ b/libsrc/video/im_video_test.c @@ -42,7 +42,7 @@ int im_video_test( IMAGE *im, int brightness, int error ) { if( error ) { - im_error( "im_video_test", _( "error requested" ) ); + im_error( "im_video_test", "%s", _( "error requested" ) ); return( -1 ); } else diff --git a/libsrc/video/im_video_v4l1.c b/libsrc/video/im_video_v4l1.c index 4f846fee..112d86b6 100644 --- a/libsrc/video/im_video_v4l1.c +++ b/libsrc/video/im_video_v4l1.c @@ -243,7 +243,7 @@ static int lgrab_ioctl( LGrab *lg, int request, void *argp ) { if( !lg->fd ) { - im_error( "lgrab_ioctl", _( "no file descriptor" ) ); + im_error( "lgrab_ioctl", "%s", _( "no file descriptor" ) ); return( -1 ); } @@ -304,7 +304,8 @@ lgrab_new( const char *device ) } if( lgrab_ioctl( lg, VIDIOCGCAP, &lg->capability ) ) { - im_error( "lgrab_new", _( "cannot get video capability" ) ); + im_error( "lgrab_new", + "%s", _( "cannot get video capability" ) ); lgrab_destroy( lg ); return( NULL ); } @@ -312,7 +313,8 @@ lgrab_new( const char *device ) /* Check that it can capture to memory. */ if( !(lg->capability.type & VID_TYPE_CAPTURE) ) { - im_error( "lgrab_new", _( "card cannot capture to memory" ) ); + im_error( "lgrab_new", + "%s", _( "card cannot capture to memory" ) ); lgrab_destroy( lg ); return( NULL ); } @@ -458,7 +460,7 @@ lgrab_set_capture_size( LGrab *lg, int width, int height ) if( !(lg->capture_buffer = mmap( 0, lg->capture_size, PROT_READ | PROT_WRITE, MAP_SHARED, lg->fd, 0 )) ) { im_error( "lgrab_set_capture_size", - _( "unable to map memory" ) ); + "%s", _( "unable to map memory" ) ); return( -1 ); } @@ -670,7 +672,7 @@ im_video_v4l1( IMAGE *im, const char *device, int ngrabs ) { im_error( "im_video_v4l1", - _( "compiled without im_video_v4l1 support" ) ); + "%s", _( "compiled without im_video_v4l1 support" ) ); return( -1 ); } diff --git a/src/iofuncs/edvips.c b/src/iofuncs/edvips.c index 7aa73200..137acf3e 100644 --- a/src/iofuncs/edvips.c +++ b/src/iofuncs/edvips.c @@ -119,7 +119,7 @@ main( int argc, char **argv ) unsigned char header[IM_SIZEOF_HEADER]; if( im_init_world( argv[0] ) ) - error_exit( _( "unable to start VIPS" ) ); + error_exit( "%s", _( "unable to start VIPS" ) ); context = g_option_context_new( _( "vipsfile - edit vipsfile header" ) ); @@ -186,7 +186,7 @@ main( int argc, char **argv ) unsigned int size; if( !(xml = im__file_read( stdin, "stdin", &size )) ) - error_exit( _( "could not get ext data" ) ); + error_exit( "%s", _( "could not get ext data" ) ); /* Strip trailing whitespace ... we can get stray \n at the * end, eg. "echo | edvips --setext fred.v". @@ -195,7 +195,7 @@ main( int argc, char **argv ) size -= 1; if( im__write_extension_block( im, xml, size ) ) - error_exit( _( "could not set extension" ) ); + error_exit( "%s", _( "could not set extension" ) ); im_free( xml ); }