mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
pixconv: add swizzle_ycc__convert_bgrx_x86_avx2
name old speed new speed delta wuffs_jpeg_decode_19k_8bpp/clang11 365MB/s ± 1% 372MB/s ± 0% +1.77% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/clang11 241MB/s ± 0% 278MB/s ± 0% +15.49% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/clang11 477MB/s ± 0% 710MB/s ± 0% +48.91% (p=0.008 n=5+5) wuffs_jpeg_decode_77k_24bpp/clang11 429MB/s ± 0% 603MB/s ± 0% +40.56% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/clang11 446MB/s ± 0% 635MB/s ± 0% +42.18% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/clang11 644MB/s ± 0% 650MB/s ± 0% +1.06% (p=0.016 n=4+5) wuffs_jpeg_decode_4002k_24bpp/clang11 458MB/s ± 0% 629MB/s ± 0% +37.46% (p=0.008 n=5+5) wuffs_jpeg_decode_19k_8bpp/gcc10 352MB/s ± 0% 364MB/s ± 0% +3.62% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_progressive/gcc10 295MB/s ± 0% 334MB/s ± 0% +13.19% (p=0.008 n=5+5) wuffs_jpeg_decode_30k_24bpp_sequential/gcc10 669MB/s ± 0% 944MB/s ± 0% +41.07% (p=0.008 n=5+5) wuffs_jpeg_decode_77k_24bpp/gcc10 567MB/s ± 0% 769MB/s ± 0% +35.59% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_420/gcc10 605MB/s ± 0% 842MB/s ± 0% +39.07% (p=0.008 n=5+5) wuffs_jpeg_decode_552k_24bpp_444/gcc10 647MB/s ± 0% 661MB/s ± 0% +2.19% (p=0.008 n=5+5) wuffs_jpeg_decode_4002k_24bpp/gcc10 613MB/s ± 0% 849MB/s ± 0% +38.61% (p=0.008 n=5+5)
This commit is contained in:
1 parent
10d4ff7532
commit
4facef4e01
6 files changed
+625
-11
No files matched your search
@@ -14,6 +14,21 @@
|
||||
|
||||
// --------
|
||||
|
||||
#if defined(WUFFS_BASE__CPU_ARCH__X86_FAMILY)
|
||||
WUFFS_BASE__MAYBE_ATTRIBUTE_TARGET("pclmul,popcnt,sse4.2,avx2")
|
||||
static void //
|
||||
wuffs_base__pixel_swizzler__swizzle_ycc__convert_bgrx_x86_avx2(
|
||||
wuffs_base__pixel_buffer* dst,
|
||||
uint32_t x,
|
||||
uint32_t x_end,
|
||||
uint32_t y,
|
||||
const uint8_t* up0,
|
||||
const uint8_t* up1,
|
||||
const uint8_t* up2);
|
||||
#endif
|
||||
|
||||
// --------
|
||||
|
||||
static inline uint32_t //
|
||||
wuffs_base__u32__max_of_4(uint32_t a, uint32_t b, uint32_t c, uint32_t d) {
|
||||
return wuffs_base__u32__max( //
|
||||
@@ -950,6 +965,13 @@ wuffs_base__pixel_swizzler__swizzle_ycck(
|
||||
case WUFFS_BASE__PIXEL_FORMAT__BGRA_NONPREMUL:
|
||||
case WUFFS_BASE__PIXEL_FORMAT__BGRA_PREMUL:
|
||||
case WUFFS_BASE__PIXEL_FORMAT__BGRX:
|
||||
#if defined(WUFFS_BASE__CPU_ARCH__X86_FAMILY)
|
||||
if (wuffs_base__cpu_arch__have_x86_sse42()) {
|
||||
convfunc =
|
||||
&wuffs_base__pixel_swizzler__swizzle_ycc__convert_bgrx_x86_avx2;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
convfunc = &wuffs_base__pixel_swizzler__swizzle_ycc__convert_bgrx;
|
||||
break;
|
||||
case WUFFS_BASE__PIXEL_FORMAT__RGBA_NONPREMUL:
|
||||
|
||||
Reference in new issue
Block a user