oops in sharpen

This commit is contained in:
John Cupitt 2016-02-26 12:26:12 +00:00
parent d33306836f
commit c95bbe43b5
2 changed files with 16 additions and 1 deletions

14
TODO
View File

@ -1,3 +1,17 @@
- try
$ vips sharpen babe.jpg x.v
horrible posterization, looks like too few bits
$ vips colourspace babe.jpg x.v rgb16
$ vips sharpen x.v x2.v
$ vips colourspace x2.v x3.v srgb
no better, strange
- try SEQ_UNBUFFERED on jpg source, get out of order error?
- add reduceh > 3 warning for wtc shrink to 1280x1280
or was it 1703?

View File

@ -224,7 +224,7 @@ vips_sharpen_build( VipsObject *object )
if( v < -sharpen->x1 )
/* Left of -x1.
*/
y = (v - sharpen->x1) * sharpen->m2 +
y = (v + sharpen->x1) * sharpen->m2 +
-sharpen->x1 * sharpen->m1;
else if( v < sharpen->x1 )
/* Centre section.
@ -252,6 +252,7 @@ vips_sharpen_build( VipsObject *object )
for( i = 0; i < 65536; i++ )
*VIPS_MATRIX( mat, i, 0 ) = sharpen->lut[i];
vips_image_write_to_file( mat, "x.v", NULL );
printf( "lut written to x.v\n" );
g_object_unref( mat );
}
#endif /*DEBUG*/