Skip to content

Commit db6f90a

Browse files
committed
Fix mistakes in final touches
1 parent c602dd7 commit db6f90a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ImageSharp/Formats/Jpeg/Components/Encoder/RgbToYCbCrConverterVectorized.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ private static void ConvertInternal(ReadOnlySpan<Rgb24> rgbSpan, ref Block8x8F y
169169

170170
Vector256<float> tmpCb = Avx.Permute2x128(cb0, cb1, 0b0010_0001);
171171
Unsafe.Add(ref destCbRef, j) = Avx.Blend(cb0, tmpCb, 0b1111_0000);
172-
Unsafe.Add(ref destCbRef, j + 2) = Avx.Blend(cb0, tmpCb, 0b0000_1111);
172+
Unsafe.Add(ref destCbRef, j + 2) = Avx.Blend(cb1, tmpCb, 0b0000_1111);
173173

174174
Vector256<float> tmpCr = Avx.Permute2x128(cr0, cr1, 0b0010_0001);
175175
Unsafe.Add(ref destCrRef, j) = Avx.Blend(cr0, tmpCr, 0b1111_0000);
176-
Unsafe.Add(ref destCrRef, j + 2) = Avx.Blend(cr0, tmpCr, 0b0000_1111);
176+
Unsafe.Add(ref destCrRef, j + 2) = Avx.Blend(cr1, tmpCr, 0b0000_1111);
177177
}
178178
}
179179
}

src/ImageSharp/Formats/Jpeg/Components/Encoder/YCbCrForwardConverter{TPixel}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ internal ref struct YCbCrForwardConverter<TPixel>
4747
public static YCbCrForwardConverter<TPixel> Create()
4848
{
4949
var result = default(YCbCrForwardConverter<TPixel>);
50-
if (RgbToYCbCrConverterVectorized.IsSupported)
50+
if (!RgbToYCbCrConverterVectorized.IsSupported)
5151
{
5252
// Avoid creating lookup tables, when vectorized converter is supported
5353
result.colorTables = RgbToYCbCrConverterLut.Create();

0 commit comments

Comments
 (0)