@img/sharp-libvips-dev 1.2.1 → 1.2.2-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/include/aom/aom_decoder.h +1 -1
  2. package/include/aom/aom_encoder.h +2 -0
  3. package/include/aom/aomcx.h +106 -25
  4. package/include/ffi.h +3 -3
  5. package/include/freetype2/freetype/config/ftconfig.h +1 -1
  6. package/include/freetype2/freetype/config/ftheader.h +1 -1
  7. package/include/freetype2/freetype/config/ftoption.h +37 -12
  8. package/include/freetype2/freetype/config/ftstdlib.h +1 -1
  9. package/include/freetype2/freetype/config/integer-types.h +29 -2
  10. package/include/freetype2/freetype/config/mac-support.h +1 -1
  11. package/include/freetype2/freetype/config/public-macros.h +3 -3
  12. package/include/freetype2/freetype/freetype.h +51 -47
  13. package/include/freetype2/freetype/ftadvanc.h +1 -1
  14. package/include/freetype2/freetype/ftbbox.h +1 -1
  15. package/include/freetype2/freetype/ftbdf.h +1 -1
  16. package/include/freetype2/freetype/ftbitmap.h +1 -1
  17. package/include/freetype2/freetype/ftbzip2.h +1 -1
  18. package/include/freetype2/freetype/ftcache.h +1 -1
  19. package/include/freetype2/freetype/ftcid.h +1 -1
  20. package/include/freetype2/freetype/ftcolor.h +13 -4
  21. package/include/freetype2/freetype/ftdriver.h +3 -3
  22. package/include/freetype2/freetype/fterrdef.h +1 -1
  23. package/include/freetype2/freetype/fterrors.h +1 -1
  24. package/include/freetype2/freetype/ftfntfmt.h +1 -1
  25. package/include/freetype2/freetype/ftgasp.h +1 -1
  26. package/include/freetype2/freetype/ftglyph.h +1 -1
  27. package/include/freetype2/freetype/ftgxval.h +1 -1
  28. package/include/freetype2/freetype/ftgzip.h +1 -1
  29. package/include/freetype2/freetype/ftimage.h +6 -2
  30. package/include/freetype2/freetype/ftincrem.h +1 -1
  31. package/include/freetype2/freetype/ftlcdfil.h +1 -1
  32. package/include/freetype2/freetype/ftlist.h +1 -1
  33. package/include/freetype2/freetype/ftlogging.h +184 -0
  34. package/include/freetype2/freetype/ftlzw.h +1 -1
  35. package/include/freetype2/freetype/ftmac.h +1 -1
  36. package/include/freetype2/freetype/ftmm.h +159 -103
  37. package/include/freetype2/freetype/ftmodapi.h +1 -1
  38. package/include/freetype2/freetype/ftmoderr.h +1 -1
  39. package/include/freetype2/freetype/ftotval.h +1 -1
  40. package/include/freetype2/freetype/ftoutln.h +1 -1
  41. package/include/freetype2/freetype/ftparams.h +1 -1
  42. package/include/freetype2/freetype/ftpfr.h +1 -1
  43. package/include/freetype2/freetype/ftrender.h +1 -1
  44. package/include/freetype2/freetype/ftsizes.h +1 -1
  45. package/include/freetype2/freetype/ftsnames.h +1 -1
  46. package/include/freetype2/freetype/ftstroke.h +1 -1
  47. package/include/freetype2/freetype/ftsynth.h +1 -1
  48. package/include/freetype2/freetype/ftsystem.h +1 -1
  49. package/include/freetype2/freetype/fttrigon.h +1 -1
  50. package/include/freetype2/freetype/fttypes.h +1 -1
  51. package/include/freetype2/freetype/ftwinfnt.h +2 -3
  52. package/include/freetype2/freetype/otsvg.h +1 -1
  53. package/include/freetype2/freetype/t1tables.h +1 -1
  54. package/include/freetype2/freetype/ttnameid.h +129 -129
  55. package/include/freetype2/freetype/tttables.h +8 -5
  56. package/include/freetype2/freetype/tttags.h +1 -1
  57. package/include/freetype2/ft2build.h +1 -1
  58. package/include/glib-2.0/gio/gdbuserror.h +9 -8
  59. package/include/glib-2.0/gio/ginetaddress.h +12 -0
  60. package/include/glib-2.0/gio/gioenums.h +9 -2
  61. package/include/glib-2.0/glib/gstring.h +2 -2
  62. package/include/glib-2.0/glib/gunicode.h +1 -1
  63. package/include/glib-2.0/gobject/glib-types.h +1 -1
  64. package/include/glib-2.0/gobject/gparam.h +1 -1
  65. package/include/glib-2.0/gobject/gvalue.h +78 -35
  66. package/include/harfbuzz/hb-script-list.h +12 -0
  67. package/include/harfbuzz/hb-version.h +3 -3
  68. package/include/hwy/abort.h +2 -19
  69. package/include/hwy/aligned_allocator.h +11 -7
  70. package/include/hwy/auto_tune.h +504 -0
  71. package/include/hwy/base.h +425 -104
  72. package/include/hwy/cache_control.h +16 -0
  73. package/include/hwy/detect_compiler_arch.h +32 -1
  74. package/include/hwy/detect_targets.h +251 -67
  75. package/include/hwy/foreach_target.h +35 -0
  76. package/include/hwy/highway.h +185 -76
  77. package/include/hwy/nanobenchmark.h +1 -19
  78. package/include/hwy/ops/arm_neon-inl.h +969 -458
  79. package/include/hwy/ops/arm_sve-inl.h +1137 -359
  80. package/include/hwy/ops/emu128-inl.h +97 -11
  81. package/include/hwy/ops/generic_ops-inl.h +1222 -34
  82. package/include/hwy/ops/loongarch_lasx-inl.h +4664 -0
  83. package/include/hwy/ops/loongarch_lsx-inl.h +5933 -0
  84. package/include/hwy/ops/ppc_vsx-inl.h +306 -126
  85. package/include/hwy/ops/rvv-inl.h +546 -51
  86. package/include/hwy/ops/scalar-inl.h +77 -22
  87. package/include/hwy/ops/set_macros-inl.h +138 -17
  88. package/include/hwy/ops/shared-inl.h +50 -10
  89. package/include/hwy/ops/wasm_128-inl.h +137 -92
  90. package/include/hwy/ops/x86_128-inl.h +773 -214
  91. package/include/hwy/ops/x86_256-inl.h +712 -255
  92. package/include/hwy/ops/x86_512-inl.h +429 -753
  93. package/include/hwy/ops/x86_avx3-inl.h +501 -0
  94. package/include/hwy/per_target.h +2 -1
  95. package/include/hwy/profiler.h +622 -486
  96. package/include/hwy/targets.h +62 -20
  97. package/include/hwy/timer-inl.h +8 -160
  98. package/include/hwy/timer.h +170 -3
  99. package/include/hwy/x86_cpuid.h +81 -0
  100. package/include/libheif/heif_cxx.h +25 -5
  101. package/include/libheif/heif_regions.h +5 -5
  102. package/include/libheif/heif_version.h +2 -2
  103. package/include/librsvg-2.0/librsvg/rsvg-version.h +3 -3
  104. package/include/libxml2/libxml/valid.h +0 -3
  105. package/include/libxml2/libxml/xmlerror.h +1 -1
  106. package/include/libxml2/libxml/xmlversion.h +4 -4
  107. package/include/pango-1.0/pango/pango-enum-types.h +3 -0
  108. package/include/pango-1.0/pango/pango-features.h +3 -3
  109. package/include/pango-1.0/pango/pango-font.h +30 -0
  110. package/include/pango-1.0/pango/pango-version-macros.h +26 -0
  111. package/include/vips/connection.h +4 -4
  112. package/include/vips/version.h +4 -4
  113. package/include/zlib.h +3 -3
  114. package/package.json +1 -1
  115. package/versions.json +13 -13
@@ -78,6 +78,10 @@ struct Vec128 {
78
78
  template <typename T, size_t N = 16 / sizeof(T)>
79
79
  struct Mask128 {
80
80
  using Raw = hwy::MakeUnsigned<T>;
81
+
82
+ using PrivateT = T; // only for DFromM
83
+ static constexpr size_t kPrivateN = N; // only for DFromM
84
+
81
85
  static HWY_INLINE Raw FromBool(bool b) {
82
86
  return b ? static_cast<Raw>(~Raw{0}) : 0;
83
87
  }
@@ -89,6 +93,9 @@ struct Mask128 {
89
93
  template <class V>
90
94
  using DFromV = Simd<typename V::PrivateT, V::kPrivateN, 0>;
91
95
 
96
+ template <class M>
97
+ using DFromM = Simd<typename M::PrivateT, M::kPrivateN, 0>;
98
+
92
99
  template <class V>
93
100
  using TFromV = typename V::PrivateT;
94
101
 
@@ -386,6 +393,15 @@ VFromD<D> VecFromMask(D /* tag */, MFromD<D> mask) {
386
393
  return v;
387
394
  }
388
395
 
396
+ template <class D>
397
+ uint64_t BitsFromMask(D d, MFromD<D> mask) {
398
+ uint64_t bits = 0;
399
+ for (size_t i = 0; i < Lanes(d); ++i) {
400
+ bits |= mask.bits[i] ? (1ull << i) : 0;
401
+ }
402
+ return bits;
403
+ }
404
+
389
405
  template <class D>
390
406
  HWY_API MFromD<D> FirstN(D d, size_t n) {
391
407
  MFromD<D> m;
@@ -651,11 +667,25 @@ HWY_API Vec128<T, N> SaturatedSub(Vec128<T, N> a, Vec128<T, N> b) {
651
667
  }
652
668
 
653
669
  // ------------------------------ AverageRound
654
- template <typename T, size_t N>
670
+
671
+ #ifdef HWY_NATIVE_AVERAGE_ROUND_UI32
672
+ #undef HWY_NATIVE_AVERAGE_ROUND_UI32
673
+ #else
674
+ #define HWY_NATIVE_AVERAGE_ROUND_UI32
675
+ #endif
676
+
677
+ #ifdef HWY_NATIVE_AVERAGE_ROUND_UI64
678
+ #undef HWY_NATIVE_AVERAGE_ROUND_UI64
679
+ #else
680
+ #define HWY_NATIVE_AVERAGE_ROUND_UI64
681
+ #endif
682
+
683
+ template <typename T, size_t N, HWY_IF_NOT_FLOAT_NOR_SPECIAL(T)>
655
684
  HWY_API Vec128<T, N> AverageRound(Vec128<T, N> a, Vec128<T, N> b) {
656
- static_assert(!IsSigned<T>(), "Only for unsigned");
657
685
  for (size_t i = 0; i < N; ++i) {
658
- a.raw[i] = static_cast<T>((a.raw[i] + b.raw[i] + 1) / 2);
686
+ const T a_val = a.raw[i];
687
+ const T b_val = b.raw[i];
688
+ a.raw[i] = static_cast<T>((a_val | b_val) - ScalarShr(a_val ^ b_val, 1));
659
689
  }
660
690
  return a;
661
691
  }
@@ -1023,14 +1053,13 @@ HWY_API Vec128<T, N> Round(Vec128<T, N> v) {
1023
1053
  }
1024
1054
 
1025
1055
  // Round-to-nearest even.
1026
- template <size_t N>
1027
- HWY_API Vec128<int32_t, N> NearestInt(Vec128<float, N> v) {
1028
- using T = float;
1029
- using TI = int32_t;
1056
+ template <class T, size_t N, HWY_IF_FLOAT3264(T)>
1057
+ HWY_API Vec128<MakeSigned<T>, N> NearestInt(Vec128<T, N> v) {
1058
+ using TI = MakeSigned<T>;
1030
1059
  const T k0 = ConvertScalarTo<T>(0);
1031
1060
 
1032
- const Vec128<float, N> abs = Abs(v);
1033
- Vec128<int32_t, N> ret;
1061
+ const Vec128<T, N> abs = Abs(v);
1062
+ Vec128<TI, N> ret;
1034
1063
  for (size_t i = 0; i < N; ++i) {
1035
1064
  const bool signbit = ScalarSignBit(v.raw[i]);
1036
1065
 
@@ -1061,6 +1090,44 @@ HWY_API Vec128<int32_t, N> NearestInt(Vec128<float, N> v) {
1061
1090
  return ret;
1062
1091
  }
1063
1092
 
1093
+ template <class DI32, HWY_IF_I32_D(DI32)>
1094
+ HWY_API VFromD<DI32> DemoteToNearestInt(DI32 /*di32*/,
1095
+ VFromD<Rebind<double, DI32>> v) {
1096
+ using T = double;
1097
+ using TI = int32_t;
1098
+ const T k0 = ConvertScalarTo<T>(0);
1099
+
1100
+ constexpr size_t N = HWY_MAX_LANES_D(DI32);
1101
+
1102
+ const VFromD<Rebind<double, DI32>> abs = Abs(v);
1103
+ VFromD<DI32> ret;
1104
+ for (size_t i = 0; i < N; ++i) {
1105
+ const bool signbit = ScalarSignBit(v.raw[i]);
1106
+
1107
+ // Check if too large to cast or NaN
1108
+ if (!(abs.raw[i] <= ConvertScalarTo<T>(LimitsMax<TI>()))) {
1109
+ ret.raw[i] = signbit ? LimitsMin<TI>() : LimitsMax<TI>();
1110
+ continue;
1111
+ }
1112
+
1113
+ const T bias = ConvertScalarTo<T>(v.raw[i] < k0 ? -0.5 : 0.5);
1114
+ const TI rounded = ConvertScalarTo<TI>(v.raw[i] + bias);
1115
+ if (rounded == 0) {
1116
+ ret.raw[i] = 0;
1117
+ continue;
1118
+ }
1119
+ const T rounded_f = ConvertScalarTo<T>(rounded);
1120
+ // Round to even
1121
+ if ((rounded & 1) &&
1122
+ ScalarAbs(rounded_f - v.raw[i]) == ConvertScalarTo<T>(0.5)) {
1123
+ ret.raw[i] = rounded - (signbit ? -1 : 1);
1124
+ continue;
1125
+ }
1126
+ ret.raw[i] = rounded;
1127
+ }
1128
+ return ret;
1129
+ }
1130
+
1064
1131
  template <typename T, size_t N>
1065
1132
  HWY_API Vec128<T, N> Trunc(Vec128<T, N> v) {
1066
1133
  using TI = MakeSigned<T>;
@@ -1588,6 +1655,13 @@ HWY_API VFromD<D> ShiftRightLanes(D d, VFromD<D> v) {
1588
1655
  #define HWY_NATIVE_LOAD_STORE_INTERLEAVED
1589
1656
  #endif
1590
1657
 
1658
+ // Same for Load/StoreInterleaved of special floats.
1659
+ #ifdef HWY_NATIVE_LOAD_STORE_SPECIAL_FLOAT_INTERLEAVED
1660
+ #undef HWY_NATIVE_LOAD_STORE_SPECIAL_FLOAT_INTERLEAVED
1661
+ #else
1662
+ #define HWY_NATIVE_LOAD_STORE_SPECIAL_FLOAT_INTERLEAVED
1663
+ #endif
1664
+
1591
1665
  template <class D, typename T = TFromD<D>>
1592
1666
  HWY_API void LoadInterleaved2(D d, const T* HWY_RESTRICT unaligned,
1593
1667
  VFromD<D>& v0, VFromD<D>& v1) {
@@ -2238,6 +2312,17 @@ HWY_API Vec128<T, N> SwapAdjacentBlocks(Vec128<T, N> v) {
2238
2312
  return v;
2239
2313
  }
2240
2314
 
2315
+ // ------------------------------ InterleaveEvenBlocks
2316
+ template <class D, class V = VFromD<D>>
2317
+ HWY_API V InterleaveEvenBlocks(D, V a, V /*b*/) {
2318
+ return a;
2319
+ }
2320
+ // ------------------------------ InterleaveOddBlocks
2321
+ template <class D, class V = VFromD<D>>
2322
+ HWY_API V InterleaveOddBlocks(D, V a, V /*b*/) {
2323
+ return a;
2324
+ }
2325
+
2241
2326
  // ------------------------------ TableLookupLanes
2242
2327
 
2243
2328
  // Returned by SetTableIndices for use by TableLookupLanes.
@@ -2841,9 +2926,10 @@ HWY_API T ReduceSum(D d, VFromD<D> v) {
2841
2926
  }
2842
2927
  return sum;
2843
2928
  }
2929
+
2844
2930
  template <class D, typename T = TFromD<D>, HWY_IF_REDUCE_D(D)>
2845
2931
  HWY_API T ReduceMin(D d, VFromD<D> v) {
2846
- T min = HighestValue<T>();
2932
+ T min = PositiveInfOrHighestValue<T>();
2847
2933
  for (size_t i = 0; i < MaxLanes(d); ++i) {
2848
2934
  min = HWY_MIN(min, v.raw[i]);
2849
2935
  }
@@ -2851,7 +2937,7 @@ HWY_API T ReduceMin(D d, VFromD<D> v) {
2851
2937
  }
2852
2938
  template <class D, typename T = TFromD<D>, HWY_IF_REDUCE_D(D)>
2853
2939
  HWY_API T ReduceMax(D d, VFromD<D> v) {
2854
- T max = LowestValue<T>();
2940
+ T max = NegativeInfOrLowestValue<T>();
2855
2941
  for (size_t i = 0; i < MaxLanes(d); ++i) {
2856
2942
  max = HWY_MAX(max, v.raw[i]);
2857
2943
  }