ARM64 NEON SIMD support for YCC-to-RGB565 conversion
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1386 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
@@ -98,6 +98,17 @@ jsimd_can_ycc_rgb (void)
|
||||
GLOBAL(int)
|
||||
jsimd_can_ycc_rgb565 (void)
|
||||
{
|
||||
init_simd();
|
||||
|
||||
/* The code is optimised for these values only */
|
||||
if (BITS_IN_JSAMPLE != 8)
|
||||
return 0;
|
||||
if (sizeof(JDIMENSION) != 4)
|
||||
return 0;
|
||||
|
||||
if (simd_support & JSIMD_ARM_NEON)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -145,7 +156,7 @@ jsimd_ycc_rgb_convert (j_decompress_ptr cinfo,
|
||||
case JCS_EXT_ARGB:
|
||||
neonfct=jsimd_ycc_extxrgb_convert_neon;
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
neonfct=jsimd_ycc_extrgb_convert_neon;
|
||||
break;
|
||||
}
|
||||
@@ -159,6 +170,9 @@ jsimd_ycc_rgb565_convert (j_decompress_ptr cinfo,
|
||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||
JSAMPARRAY output_buf, int num_rows)
|
||||
{
|
||||
if (simd_support & JSIMD_ARM_NEON)
|
||||
jsimd_ycc_rgb565_convert_neon(cinfo->output_width, input_buf, input_row,
|
||||
output_buf, num_rows);
|
||||
}
|
||||
|
||||
GLOBAL(int)
|
||||
|
||||
Reference in New Issue
Block a user