Browse Source

Don't use stackalloc

pull/3153/head
winscripter 2 days ago
parent
commit
79b0113c28
  1. 2
      src/ImageSharp/Formats/Jxl/Processing/Modular/Encoding/ContextPrediction/JxlModularState.cs

2
src/ImageSharp/Formats/Jxl/Processing/Modular/Encoding/ContextPrediction/JxlModularState.cs

@ -108,7 +108,7 @@ internal sealed class JxlModularState
int posNE = x < width - 1 ? posN + 1 : posN;
int posNW = x > 0 ? posN - 1 : posN;
Span<uint> weights = stackalloc uint[4];
Span<uint> weights = [0, 0, 0, 0];
Span<uint> headerW = this.header.GetW();
for (int i = 0; i < 4; i++)

Loading…
Cancel
Save