Lines Matching refs:partition
21 * @brief Functions for finding best partition for a block.
23 * The partition search operates in two stages. The first pass uses kmeans clustering to group
24 * texels into an ideal partitioning for the requested partition count, and then compares that
25 * against the 1024 partitionings generated by the ASTC partition hash function. The generated
26 * partitions are then ranked by the number of texels in the wrong partition, compared to the ideal
28 * partitionings that actually generate fewer than the requested partition count, but only the top
38 * partition. This defines two lines, both of which go through the mean color value.
58 * @param[out] cluster_centers The initial partition cluster center colors.
143 * @param cluster_centers The partition cluster center colors.
144 * @param[out] partition_of_texel The partition assigned for each texel.
158 // Find the best partition for every texel
180 // It is possible to get a situation where a partition ends up without any texels. In this case,
181 // assign texel N to partition N. This is silly, but ensures that every partition retains at
182 // least one texel. Reassigning a texel in this manner may cause another partition to go empty,
208 * @param partition_of_texel The partition assigned for each texel.
232 uint8_t partition = partition_of_texel[i];
233 color_sum[partition] += blk.texel(i);
234 partition_texel_count[partition]++;
246 * @brief Compute bit-mismatch for partitioning in 2-partition mode.
249 * @param b The texel assignment bitvector for the partition table.
274 // in the expected position, and again when present in the wrong partition
280 * @brief Compute bit-mismatch for partitioning in 3-partition mode.
283 * @param b The texel assignment bitvector for the partition table.
316 // in the expected position, and again when present in the wrong partition
321 * @brief Compute bit-mismatch for partitioning in 4-partition mode.
324 * @param b The texel assignment bitvector for the partition table.
365 // in the expected position, and again when present in the wrong partition
372 * @brief Count the partition table mismatches vs the data clustering.
376 * @param bitmaps The block texel partition assignment patterns.
418 * @brief Use counting sort on the mismatch array to sort partition candidates.
463 * @brief Use k-means clustering to compute a partition ordering for a block..
468 * @param[out] partition_ordering The list of recommended partition indices, in priority order.
481 // Use three passes of k-means clustering to partition the block data
496 // Construct the block bitmaps of texel assignments to each partition
506 // Count the mismatch between the block and the format's partition tables
522 * @param this_partition The partition ID of the new entry.
524 * @param[out] best_partitions The array of best partition values.
620 unsigned int partition = partition_sequence[i];
621 const auto& pi = bsd.get_raw_partition_info(partition_count, partition);
623 // Compute weighting to give to each component in each partition
665 // This error is computed as follows, for each partition
686 insert_result(requested_candidates, uncor_error, partition, uncor_best_errors, uncor_best_partitions);
687 insert_result(requested_candidates, samec_error, partition, samec_best_errors, samec_best_partitions);
694 unsigned int partition = partition_sequence[i];
695 const auto& pi = bsd.get_raw_partition_info(partition_count, partition);
697 // Compute weighting to give to each component in each partition
731 // This error is computed as follows, for each partition
754 insert_result(requested_candidates, uncor_error, partition, uncor_best_errors, uncor_best_partitions);
755 insert_result(requested_candidates, samec_error, partition, samec_best_errors, samec_best_partitions);
772 unsigned int partition = interleave[i];
774 unsigned int word = partition / 64;
775 unsigned int bit = partition % 64;
781 best_partitions[emitted] = partition;