much faster RGB16 -> sRGB path

This commit is contained in:
John Cupitt 2015-02-04 16:48:25 +00:00
parent 0c466b9495
commit d6dbfea064
3 changed files with 16 additions and 6 deletions

View File

@ -18,6 +18,7 @@
- add lower-level operation cache access
- turn on leak testing in test suite
- don't use isnormal() to test for crazy FP numbers, thanks Murat
- much faster RGB16 -> sRGB path
24/12/14 started 7.42.1
- add gobject-2.0 to Requires: in vips and vips-cpp .pc files

4
TODO
View File

@ -1,5 +1,3 @@
- use vips_resize() in vipsthumbnail?
should the sharpening filter be selectable?
@ -24,8 +22,6 @@
- fix up aconv
- more python tests
- can we pick the vipsthumbnail int shrink factor more intelligently?
- rewrite im_conv() etc. as vips_conv(), also the mosaicing functions

View File

@ -14,6 +14,8 @@
* - oops, don't treat RGB16 as sRGB
* 9/9/14
* - mono <-> rgb converters were not handling extra bands, thanks James
* 4/2/15
* - much faster RGB16->sRGB path
*/
/*
@ -71,6 +73,17 @@ vips_scRGB2RGB16( VipsImage *in, VipsImage **out, ... )
return( vips_scRGB2sRGB( in, out, "depth", 16, NULL ) );
}
static int
vips_RGB162sRGB( VipsImage *in, VipsImage **out, ... )
{
if( vips_msb( in, out, NULL ) )
return( -1 );
(*out)->Type = VIPS_INTERPRETATION_sRGB;
return( 0 );
}
/* Process the first @n bands with @fn, detach and reattach remaining bands.
*/
static int
@ -335,8 +348,8 @@ static VipsColourRoute vips_colour_routes[] = {
{ RGB16, CMC, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab,
vips_Lab2LCh, vips_LCh2CMC, NULL } },
{ RGB16, scRGB, { vips_sRGB2scRGB, NULL } },
{ RGB16, sRGB, { vips_sRGB2scRGB, vips_scRGB2sRGB, NULL } },
{ RGB16, BW, { vips_sRGB2scRGB, vips_scRGB2sRGB, vips_sRGB2BW, NULL } },
{ RGB16, sRGB, { vips_RGB162sRGB, NULL } },
{ RGB16, BW, { vips_RGB162sRGB, vips_sRGB2BW, NULL } },
{ RGB16, LABS, { vips_sRGB2scRGB, vips_scRGB2XYZ, vips_XYZ2Lab,
vips_Lab2LabS, NULL } },
{ RGB16, GREY16, { vips_RGB162GREY16, NULL } },