@@ -56,10 +56,10 @@ public static void CollectColorBlueTransforms(Span<uint> bgra, int stride, int t
5656 {
5757 Span < uint > srcSpan = bgra . Slice ( y * stride ) ;
5858 ref uint inputRef = ref MemoryMarshal . GetReference ( srcSpan ) ;
59- for ( int x = 0 ; x <= tileWidth - span ; x += span )
59+ for ( nint x = 0 ; x <= tileWidth - span ; x += span )
6060 {
61- int input0Idx = x ;
62- int input1Idx = x + ( span / 2 ) ;
61+ nint input0Idx = x ;
62+ nint input1Idx = x + ( span / 2 ) ;
6363 Vector256 < byte > input0 = Unsafe . As < uint , Vector256 < uint > > ( ref Unsafe . Add ( ref inputRef , input0Idx ) ) . AsByte ( ) ;
6464 Vector256 < byte > input1 = Unsafe . As < uint , Vector256 < uint > > ( ref Unsafe . Add ( ref inputRef , input1Idx ) ) . AsByte ( ) ;
6565 Vector256 < byte > r0 = Avx2 . Shuffle ( input0 , CollectColorBlueTransformsShuffleLowMask256 ) ;
@@ -101,10 +101,10 @@ public static void CollectColorBlueTransforms(Span<uint> bgra, int stride, int t
101101 {
102102 Span < uint > srcSpan = bgra . Slice ( y * stride ) ;
103103 ref uint inputRef = ref MemoryMarshal . GetReference ( srcSpan ) ;
104- for ( int x = 0 ; x <= tileWidth - span ; x += span )
104+ for ( nint x = 0 ; x <= tileWidth - span ; x += span )
105105 {
106- int input0Idx = x ;
107- int input1Idx = x + ( span / 2 ) ;
106+ nint input0Idx = x ;
107+ nint input1Idx = x + ( span / 2 ) ;
108108 Vector128 < byte > input0 = Unsafe . As < uint , Vector128 < uint > > ( ref Unsafe . Add ( ref inputRef , input0Idx ) ) . AsByte ( ) ;
109109 Vector128 < byte > input1 = Unsafe . As < uint , Vector128 < uint > > ( ref Unsafe . Add ( ref inputRef , input1Idx ) ) . AsByte ( ) ;
110110 Vector128 < byte > r0 = Ssse3 . Shuffle ( input0 , CollectColorBlueTransformsShuffleLowMask ) ;
@@ -170,10 +170,10 @@ public static void CollectColorRedTransforms(Span<uint> bgra, int stride, int ti
170170 {
171171 Span < uint > srcSpan = bgra . Slice ( y * stride ) ;
172172 ref uint inputRef = ref MemoryMarshal . GetReference ( srcSpan ) ;
173- for ( int x = 0 ; x <= tileWidth - span ; x += span )
173+ for ( nint x = 0 ; x <= tileWidth - span ; x += span )
174174 {
175- int input0Idx = x ;
176- int input1Idx = x + ( span / 2 ) ;
175+ nint input0Idx = x ;
176+ nint input1Idx = x + ( span / 2 ) ;
177177 Vector256 < byte > input0 = Unsafe . As < uint , Vector256 < uint > > ( ref Unsafe . Add ( ref inputRef , input0Idx ) ) . AsByte ( ) ;
178178 Vector256 < byte > input1 = Unsafe . As < uint , Vector256 < uint > > ( ref Unsafe . Add ( ref inputRef , input1Idx ) ) . AsByte ( ) ;
179179 Vector256 < byte > g0 = Avx2 . And ( input0 , CollectColorRedTransformsGreenMask256 ) ; // 0 0 | g 0
@@ -211,10 +211,10 @@ public static void CollectColorRedTransforms(Span<uint> bgra, int stride, int ti
211211 {
212212 Span < uint > srcSpan = bgra . Slice ( y * stride ) ;
213213 ref uint inputRef = ref MemoryMarshal . GetReference ( srcSpan ) ;
214- for ( int x = 0 ; x <= tileWidth - span ; x += span )
214+ for ( nint x = 0 ; x <= tileWidth - span ; x += span )
215215 {
216- int input0Idx = x ;
217- int input1Idx = x + ( span / 2 ) ;
216+ nint input0Idx = x ;
217+ nint input1Idx = x + ( span / 2 ) ;
218218 Vector128 < byte > input0 = Unsafe . As < uint , Vector128 < uint > > ( ref Unsafe . Add ( ref inputRef , input0Idx ) ) . AsByte ( ) ;
219219 Vector128 < byte > input1 = Unsafe . As < uint , Vector128 < uint > > ( ref Unsafe . Add ( ref inputRef , input1Idx ) ) . AsByte ( ) ;
220220 Vector128 < byte > g0 = Sse2 . And ( input0 , CollectColorRedTransformsGreenMask ) ; // 0 0 | g 0
0 commit comments