Merge pull request #813 from lovell/sRGB2scRGB-once-unlikely
Colour: ~20% speedup for sRGB to scRGB pixel conversion
This commit is contained in:
commit
8806e7039e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user