[sfnt] Fix `premultiply_data' (#52092).

* src/sfnt/pngshim.c (premultiply_data): Don't use vector extension
if we have less than 16 bytes of data.
This commit is contained in:
Jonathan Kew 2017-09-24 17:36:47 +02:00 committed by Werner Lemberg
parent e720206925
commit 0d1262a41e
2 changed files with 37 additions and 27 deletions

View File

@ -1,3 +1,10 @@
2017-09-24 Jonathan Kew <jfkthame@gmail.com>
[sfnt] Fix `premultiply_data' (#52092).
* src/sfnt/pngshim.c (premultiply_data): Don't use vector extension
if we have less than 16 bytes of data.
2017-09-24 Werner Lemberg <wl@gnu.org>
[otvalid] Fix handling of ValueRecords.

View File

@ -82,6 +82,8 @@
typedef unsigned short v82 __attribute__(( vector_size( 16 ) ));
if ( row_info->rowbytes > 15 )
{
/* process blocks of 16 bytes in one rush, which gives a nice speed-up */
limit = row_info->rowbytes - 16 + 1;
for ( ; i < limit; i += 16 )
@ -119,6 +121,7 @@
s = s0 | ( s1 << n8 );
memcpy( base, &s, 16 );
}
}
#endif /* use `vector_size' */
FT_UNUSED( png );