Merge pull request #813 from lovell/sRGB2scRGB-once-unlikely

Colour: ~20% speedup for sRGB to scRGB pixel conversion
This commit is contained in:
John Cupitt 2017-11-23 08:10:42 +00:00 committed by GitHub
commit 8806e7039e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,7 +171,8 @@ vips_col_make_tables_RGB_8( void )
{
static GOnce once = G_ONCE_INIT;
(void) g_once( &once, calcul_tables_8, NULL );
if( G_UNLIKELY( once.status != G_ONCE_STATUS_READY ) )
(void) g_once( &once, calcul_tables_8, NULL );
}
int
@ -195,7 +196,8 @@ vips_col_make_tables_RGB_16( void )
{
static GOnce once = G_ONCE_INIT;
(void) g_once( &once, calcul_tables_16, NULL );
if( G_UNLIKELY( once.status != G_ONCE_STATUS_READY ) )
(void) g_once( &once, calcul_tables_16, NULL );
}
int