@@ -49,9 +49,7 @@ private interface IBandSerializer<TElement>
4949
5050 /// <summary>
5151 /// Decodes ASTC blocks read from <paramref name="source"/> and writes the RGBA32 result to
52- /// <paramref name="destination"/>, one block-row band at a time. Only a single band of
53- /// compressed blocks and decoded pixels is held in memory, so peak usage is independent of
54- /// the image height.
52+ /// <paramref name="destination"/>, one block-row band at a time.
5553 /// </summary>
5654 /// <param name="source">The stream containing ASTC-compressed block data.</param>
5755 /// <param name="destination">The stream to write RGBA32 pixels to, row-major.</param>
@@ -72,9 +70,7 @@ public static void DecompressImage(Stream source, Stream destination, int width,
7270
7371 /// <summary>
7472 /// Asynchronously decodes ASTC blocks read from <paramref name="source"/> and writes the
75- /// RGBA32 result to <paramref name="destination"/>, one block-row band at a time. Only a
76- /// single band is held in memory; <see cref="Stream.ReadAsync(Memory{byte}, CancellationToken)"/>
77- /// and <see cref="Stream.WriteAsync(ReadOnlyMemory{byte}, CancellationToken)"/> drive the I/O.
73+ /// RGBA32 result to <paramref name="destination"/>, one block-row band at a time.
7874 /// </summary>
7975 /// <param name="source">The stream containing ASTC-compressed block data.</param>
8076 /// <param name="destination">The stream to write RGBA32 pixels to, row-major.</param>
@@ -99,8 +95,7 @@ public static Task DecompressImageAsync(
9995 /// <summary>
10096 /// Decodes ASTC blocks read from <paramref name="source"/> and writes the RGBA float result
10197 /// to <paramref name="destination"/> as little-endian IEEE-754 values, one block-row band at
102- /// a time. Only a single band of compressed blocks and decoded pixels is held in memory, so
103- /// peak usage is independent of the image height. For HDR content, values may exceed 1.0.
98+ /// a time. For HDR content, values may exceed 1.0.
10499 /// </summary>
105100 /// <param name="source">The stream containing ASTC-compressed block data.</param>
106101 /// <param name="destination">The stream to write little-endian RGBA float pixels to, row-major.</param>
@@ -122,7 +117,7 @@ public static void DecompressHdrImage(Stream source, Stream destination, int wid
122117 /// <summary>
123118 /// Asynchronously decodes ASTC blocks read from <paramref name="source"/> and writes the RGBA
124119 /// float result to <paramref name="destination"/> as little-endian IEEE-754 values, one
125- /// block-row band at a time. Only a single band is held in memory.
120+ /// block-row band at a time.
126121 /// </summary>
127122 /// <param name="source">The stream containing ASTC-compressed block data.</param>
128123 /// <param name="destination">The stream to write little-endian RGBA float pixels to, row-major.</param>
@@ -177,8 +172,7 @@ private static void DecodeBlockRow<TPipeline, T>(
177172 // in the LDR profile, must produce the error colour (magenta) for every texel.
178173 if ( ! info . IsValid || ! pipeline . IsBlockLegal ( in info ) )
179174 {
180- pipeline . WriteErrorColorClipped (
181- footprint , dest . DstBaseX , dest . DstBaseY , dest . CopyWidth , dest . CopyHeight , destinationWidth , destination ) ;
175+ pipeline . WriteErrorColorClipped ( footprint , dest . DstBaseX , dest . DstBaseY , dest . CopyWidth , dest . CopyHeight , destinationWidth , destination ) ;
182176 continue ;
183177 }
184178
@@ -191,8 +185,7 @@ private static void DecodeBlockRow<TPipeline, T>(
191185 /// non-void-extent blocks (the common shape per ASTC spec §C.2.10, §C.2.20, §C.2.23) take
192186 /// the fused fast path — directly to the band buffer when the block fits entirely inside
193187 /// the band, or to a scratch buffer at edges that need cropping. Everything else
194- /// (void-extent, multi-partition, dual-plane) falls through to the general
195- /// <see cref="LogicalBlock"/> pipeline.
188+ /// (void-extent, multi-partition, dual-plane) falls through to the general <see cref="LogicalBlock"/> pipeline.
196189 /// </summary>
197190 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
198191 private static void DecodeBlock < TPipeline , T > (
@@ -245,7 +238,7 @@ private static void ValidateStreamDecodeArgs(int width, int height)
245238 /// Streams a decode from <paramref name="source"/> to <paramref name="destination"/> one
246239 /// block-row band at a time, serialising each band with <typeparamref name="TSerializer"/>.
247240 /// Peak memory is one band of compressed blocks, one band of decoded pixels, one per-block
248- /// scratch buffer, and one band of serialised output — all independent of the image height.
241+ /// scratch buffer, and one band of serialised output - all independent of the image height.
249242 /// </summary>
250243 private static void DecodeToStream < TPipeline , TElement , TSerializer > (
251244 Stream source , Stream destination , int width , int height , Footprint footprint )
@@ -353,6 +346,7 @@ private static BlockDestination ComputeBlockDestination(int blockX, int blockY,
353346 int copyWidth = Math . Min ( footprint . Width , width - dstBaseX ) ;
354347 int copyHeight = Math . Min ( footprint . Height , height - dstBaseY ) ;
355348 bool isFullInterior = copyWidth == footprint . Width && copyHeight == footprint . Height ;
349+
356350 return new BlockDestination ( dstBaseX , dstBaseY , copyWidth , copyHeight , isFullInterior ) ;
357351 }
358352
0 commit comments