Skip to content

Commit 5630b25

Browse files
committed
Remove more unnecessary Clear's
1 parent 3dd7c8e commit 5630b25

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/ImageSharp/Formats/Webp/Lossy/QuantEnc.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,6 @@ public static int ReconstructIntra4(Vp8EncIterator it, Vp8SegmentInfo dqm, Span<
340340
Span<byte> reference = it.YuvP.AsSpan(Vp8Encoding.Vp8I4ModeOffsets[mode]);
341341
Span<short> tmp = it.Scratch2.AsSpan(0, 16);
342342
Span<int> scratch = it.Scratch3.AsSpan(0, 16);
343-
tmp.Clear();
344-
scratch.Clear();
345343
Vp8Encoding.FTransform(src, reference, tmp, scratch);
346344
int nz = QuantizeBlock(tmp, levels, ref dqm.Y1);
347345
Vp8Encoding.ITransform(reference, tmp, yuvOut, false, scratch);
@@ -357,8 +355,6 @@ public static int ReconstructUv(Vp8EncIterator it, Vp8SegmentInfo dqm, Vp8ModeSc
357355
int n;
358356
Span<short> tmp = it.Scratch2.AsSpan(0, 8 * 16);
359357
Span<int> scratch = it.Scratch3.AsSpan(0, 16);
360-
tmp.Clear();
361-
scratch.Clear();
362358

363359
for (n = 0; n < 8; n += 2)
364360
{

src/ImageSharp/Formats/Webp/Lossy/Vp8Encoding.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public static void ITransformOne(Span<byte> reference, Span<short> input, Span<b
8181
{
8282
int i;
8383
Span<int> tmp = scratch.Slice(0, 16);
84-
tmp.Clear();
8584
for (i = 0; i < 4; i++)
8685
{
8786
// vertical pass.
@@ -124,7 +123,6 @@ public static void FTransform(Span<byte> src, Span<byte> reference, Span<short>
124123
{
125124
int i;
126125
Span<int> tmp = scratch.Slice(0, 16);
127-
tmp.Clear();
128126

129127
int srcIdx = 0;
130128
int refIdx = 0;
@@ -163,7 +161,6 @@ public static void FTransform(Span<byte> src, Span<byte> reference, Span<short>
163161
public static void FTransformWht(Span<short> input, Span<short> output, Span<int> scratch)
164162
{
165163
Span<int> tmp = scratch.Slice(0, 16);
166-
tmp.Clear();
167164

168165
int i;
169166
int inputIdx = 0;

0 commit comments

Comments
 (0)