astcenc: Update to 4.4.0

> The 4.4.0 release is a minor release with image quality improvements,
> a small performance boost, a few new quality-of-life features, and a
> few minor fixes for uncommon build configurations.

https://github.com/ARM-software/astc-encoder/releases/tag/4.4.0
This commit is contained in:
Rémi Verschelde
2023-05-11 14:28:49 +02:00
parent fd4a06c515
commit 5a3f955e05
15 changed files with 643 additions and 937 deletions

View File

@ -604,8 +604,7 @@ unsigned int find_best_partition_candidates(
processed_line4 uncor_plines[BLOCK_MAX_PARTITIONS];
processed_line4 samec_plines[BLOCK_MAX_PARTITIONS];
float uncor_line_lens[BLOCK_MAX_PARTITIONS];
float samec_line_lens[BLOCK_MAX_PARTITIONS];
float line_lengths[BLOCK_MAX_PARTITIONS];
for (unsigned int j = 0; j < partition_count; j++)
{
@ -631,8 +630,7 @@ unsigned int find_best_partition_candidates(
blk,
uncor_plines,
samec_plines,
uncor_line_lens,
samec_line_lens,
line_lengths,
uncor_error,
samec_error);
@ -651,8 +649,8 @@ unsigned int find_best_partition_candidates(
float tpp = static_cast<float>(pi.partition_texel_count[j]);
vfloat4 error_weights(tpp * weight_imprecision_estim);
vfloat4 uncor_vector = uncor_lines[j].b * uncor_line_lens[j];
vfloat4 samec_vector = samec_lines[j].b * samec_line_lens[j];
vfloat4 uncor_vector = uncor_lines[j].b * line_lengths[j];
vfloat4 samec_vector = samec_lines[j].b * line_lengths[j];
uncor_error += dot_s(uncor_vector * uncor_vector, error_weights);
samec_error += dot_s(samec_vector * samec_vector, error_weights);
@ -719,8 +717,8 @@ unsigned int find_best_partition_candidates(
float tpp = static_cast<float>(pi.partition_texel_count[j]);
vfloat4 error_weights(tpp * weight_imprecision_estim);
vfloat4 uncor_vector = pl.uncor_line.b * pl.uncor_line_len;
vfloat4 samec_vector = pl.samec_line.b * pl.samec_line_len;
vfloat4 uncor_vector = pl.uncor_line.b * pl.line_length;
vfloat4 samec_vector = pl.samec_line.b * pl.line_length;
uncor_error += dot3_s(uncor_vector * uncor_vector, error_weights);
samec_error += dot3_s(samec_vector * samec_vector, error_weights);
@ -731,21 +729,11 @@ unsigned int find_best_partition_candidates(
}
}
bool best_is_uncor = uncor_best_partitions[0] > samec_best_partitions[0];
unsigned int interleave[2 * TUNE_MAX_PARTITIONING_CANDIDATES];
for (unsigned int i = 0; i < requested_candidates; i++)
{
if (best_is_uncor)
{
interleave[2 * i] = bsd.get_raw_partition_info(partition_count, uncor_best_partitions[i]).partition_index;
interleave[2 * i + 1] = bsd.get_raw_partition_info(partition_count, samec_best_partitions[i]).partition_index;
}
else
{
interleave[2 * i] = bsd.get_raw_partition_info(partition_count, samec_best_partitions[i]).partition_index;
interleave[2 * i + 1] = bsd.get_raw_partition_info(partition_count, uncor_best_partitions[i]).partition_index;
}
interleave[2 * i] = bsd.get_raw_partition_info(partition_count, uncor_best_partitions[i]).partition_index;
interleave[2 * i + 1] = bsd.get_raw_partition_info(partition_count, samec_best_partitions[i]).partition_index;
}
uint64_t bitmasks[1024/64] { 0 };