MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / decimation_info

Class decimation_info

Source/astcenc_internal.h:347–413  ·  view source on GitHub ↗

* @brief The weight grid information for a single decimation pattern. * * ASTC can store one weight per texel, but is also capable of storing lower resolution weight grids * that are interpolated during decompression to assign a weight to a texel. Storing fewer weights * can free up a substantial amount of bits that we can then spend on more useful things, such as * more accurate endpoints an

Source from the content-addressed store, hash-verified

345 * for a single block size.
346 */
347struct decimation_info
348{
349 /** @brief The total number of texels in the block. */
350 uint8_t texel_count;
351
352 /** @brief The maximum number of stored weights that contribute to each texel, between 1 and 4. */
353 uint8_t max_texel_weight_count;
354
355 /** @brief The total number of weights stored. */
356 uint8_t weight_count;
357
358 /** @brief The number of stored weights in the X dimension. */
359 uint8_t weight_x;
360
361 /** @brief The number of stored weights in the Y dimension. */
362 uint8_t weight_y;
363
364 /** @brief The number of stored weights in the Z dimension. */
365 uint8_t weight_z;
366
367 /**
368 * @brief The number of weights that contribute to each texel.
369 * Value is between 1 and 4.
370 */
371 ASTCENC_ALIGNAS uint8_t texel_weight_count[BLOCK_MAX_TEXELS];
372
373 /**
374 * @brief The weight index of the N weights that are interpolated for each texel.
375 * Stored transposed to improve vectorization.
376 */
377 ASTCENC_ALIGNAS uint8_t texel_weights_tr[4][BLOCK_MAX_TEXELS];
378
379 /**
380 * @brief The bilinear contribution of the N weights that are interpolated for each texel.
381 * Value is between 0 and 16, stored transposed to improve vectorization.
382 */
383 ASTCENC_ALIGNAS uint8_t texel_weight_contribs_int_tr[4][BLOCK_MAX_TEXELS];
384
385#if !defined(ASTCENC_DECOMPRESS_ONLY)
386 /**
387 * @brief The bilinear contribution of the N weights that are interpolated for each texel.
388 * Value is between 0 and 1, stored transposed to improve vectorization.
389 */
390 ASTCENC_ALIGNAS float texel_weight_contribs_float_tr[4][BLOCK_MAX_TEXELS];
391
392 /** @brief The number of texels that each stored weight contributes to. */
393 ASTCENC_ALIGNAS uint8_t weight_texel_count[BLOCK_MAX_WEIGHTS];
394
395 /**
396 * @brief The list of texels that use a specific weight index.
397 * Stored transposed to improve vectorization.
398 */
399 ASTCENC_ALIGNAS uint8_t weight_texels_tr[BLOCK_MAX_TEXELS][BLOCK_MAX_WEIGHTS];
400
401 /**
402 * @brief The bilinear contribution to the N texels that use each weight.
403 * Value is between 0 and 1, stored transposed to improve vectorization.
404 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected