~20% speedup for sRGB to scRGB pixel conversion

by checking GOnce status with branch expectation
This commit is contained in:
Lovell Fuller 2017-11-23 07:36:19 +00:00
parent 72a493d2e6
commit cef897ece8
1 changed files with 4 additions and 2 deletions

View File

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