@@ -51,89 +51,84 @@ struct astcenc_preset_config
5151 unsigned int tune_4partitioning_candidate_limit;
5252 float tune_db_limit_a_base;
5353 float tune_db_limit_b_base;
54- float tune_mode0_mse_overshoot;
55- float tune_refinement_mse_overshoot;
54+ float tune_mse_overshoot;
5655 float tune_2_partition_early_out_limit_factor;
5756 float tune_3_partition_early_out_limit_factor;
5857 float tune_2_plane_early_out_limit_correlation;
5958};
6059
61-
6260/* *
63- * @brief The static quality presets that are built-in for high bandwidth
64- * presets (x < 25 texels per block).
61+ * @brief The static presets for high bandwidth encodings (x < 25 texels per block).
6562 */
6663static const std::array<astcenc_preset_config, 6 > preset_configs_high {{
6764 {
6865 ASTCENC_PRE_FASTEST,
69- 2 , 10 , 6 , 4 , 43 , 2 , 2 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 3 . 5f , 1 .0f , 1 .0f , 0 .85f
66+ 2 , 10 , 6 , 4 , 43 , 2 , 2 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 1 .0f , 1 .0f , 0 .85f
7067 }, {
7168 ASTCENC_PRE_FAST,
72- 3 , 18 , 10 , 8 , 55 , 3 , 3 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 3 . 5f , 1 .0f , 1 .0f , 0 .90f
69+ 3 , 18 , 10 , 8 , 55 , 3 , 3 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 1 .0f , 1 .0f , 0 .90f
7370 }, {
7471 ASTCENC_PRE_MEDIUM,
75- 4 , 34 , 28 , 16 , 77 , 3 , 3 , 2 , 2 , 2 , 95 .0f , 70 .0f , 2 .5f , 2 . 5f , 1 .1f , 1 .05f , 0 .95f
72+ 4 , 34 , 28 , 16 , 77 , 3 , 3 , 2 , 2 , 2 , 95 .0f , 70 .0f , 2 .5f , 1 .1f , 1 .05f , 0 .95f
7673 }, {
7774 ASTCENC_PRE_THOROUGH,
78- 4 , 82 , 60 , 30 , 94 , 4 , 4 , 3 , 2 , 2 , 105 .0f , 77 .0f , 10 .0f , 10 . 0f , 1 .35f , 1 .15f , 0 .97f
75+ 4 , 82 , 60 , 30 , 94 , 4 , 4 , 3 , 2 , 2 , 105 .0f , 77 .0f , 10 .0f , 1 .35f , 1 .15f , 0 .97f
7976 }, {
8077 ASTCENC_PRE_VERYTHOROUGH,
81- 4 , 256 , 128 , 64 , 98 , 4 , 6 , 20 , 14 , 8 , 200 .0f , 200 .0f , 10 .0f , 10 . 0f , 1 .6f , 1 .4f , 0 .98f
78+ 4 , 256 , 128 , 64 , 98 , 4 , 6 , 20 , 14 , 8 , 200 .0f , 200 .0f , 10 .0f , 1 .6f , 1 .4f , 0 .98f
8279 }, {
8380 ASTCENC_PRE_EXHAUSTIVE,
84- 4 , 512 , 512 , 512 , 100 , 4 , 8 , 32 , 32 , 32 , 200 .0f , 200 .0f , 10 .0f , 10 . 0f , 2 .0f , 2 .0f , 0 .99f
81+ 4 , 512 , 512 , 512 , 100 , 4 , 8 , 32 , 32 , 32 , 200 .0f , 200 .0f , 10 .0f , 2 .0f , 2 .0f , 0 .99f
8582 }
8683}};
8784
8885/* *
89- * @brief The static quality presets that are built-in for medium bandwidth
90- * presets (25 <= x < 64 texels per block).
86+ * @brief The static presets for medium bandwidth encodings (25 <= x < 64 texels per block).
9187 */
9288static const std::array<astcenc_preset_config, 6 > preset_configs_mid {{
9389 {
9490 ASTCENC_PRE_FASTEST,
95- 2 , 10 , 6 , 4 , 43 , 2 , 2 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 3 . 5f , 1 .0f , 1 .0f , 0 .80f
91+ 2 , 10 , 6 , 4 , 43 , 2 , 2 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 1 .0f , 1 .0f , 0 .80f
9692 }, {
9793 ASTCENC_PRE_FAST,
98- 3 , 18 , 12 , 10 , 55 , 3 , 3 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 3 . 5f , 1 .0f , 1 .0f , 0 .85f
94+ 3 , 18 , 12 , 10 , 55 , 3 , 3 , 2 , 2 , 2 , 85 .2f , 63 .2f , 3 .5f , 1 .0f , 1 .0f , 0 .85f
9995 }, {
10096 ASTCENC_PRE_MEDIUM,
101- 4 , 34 , 28 , 16 , 77 , 3 , 3 , 2 , 2 , 2 , 95 .0f , 70 .0f , 3 .0f , 3 . 0f , 1 .1f , 1 .05f , 0 .90f
97+ 4 , 34 , 28 , 16 , 77 , 3 , 3 , 2 , 2 , 2 , 95 .0f , 70 .0f , 3 .0f , 1 .1f , 1 .05f , 0 .90f
10298 }, {
10399 ASTCENC_PRE_THOROUGH,
104- 4 , 82 , 60 , 30 , 94 , 4 , 4 , 3 , 2 , 2 , 105 .0f , 77 .0f , 10 .0f , 10 . 0f , 1 .4f , 1 .2f , 0 .95f
100+ 4 , 82 , 60 , 30 , 94 , 4 , 4 , 3 , 2 , 2 , 105 .0f , 77 .0f , 10 .0f , 1 .4f , 1 .2f , 0 .95f
105101 }, {
106102 ASTCENC_PRE_VERYTHOROUGH,
107- 4 , 256 , 128 , 64 , 98 , 4 , 6 , 12 , 8 , 3 , 200 .0f , 200 .0f , 10 .0f , 10 . 0f , 1 .6f , 1 .4f , 0 .98f
103+ 4 , 256 , 128 , 64 , 98 , 4 , 6 , 12 , 8 , 3 , 200 .0f , 200 .0f , 10 .0f , 1 .6f , 1 .4f , 0 .98f
108104 }, {
109105 ASTCENC_PRE_EXHAUSTIVE,
110- 4 , 256 , 256 , 256 , 100 , 4 , 8 , 32 , 32 , 32 , 200 .0f , 200 .0f , 10 .0f , 10 . 0f , 2 .0f , 2 .0f , 0 .99f
106+ 4 , 256 , 256 , 256 , 100 , 4 , 8 , 32 , 32 , 32 , 200 .0f , 200 .0f , 10 .0f , 2 .0f , 2 .0f , 0 .99f
111107 }
112108}};
113109
114110/* *
115- * @brief The static quality presets that are built-in for low bandwidth
116- * presets (64 <= x texels per block).
111+ * @brief The static presets for low bandwidth encodings (64 <= x texels per block).
117112 */
118113static const std::array<astcenc_preset_config, 6 > preset_configs_low {{
119114 {
120115 ASTCENC_PRE_FASTEST,
121- 2 , 10 , 6 , 4 , 40 , 2 , 2 , 2 , 2 , 2 , 85 .0f , 63 .0f , 3 .5f , 3 . 5f , 1 .0f , 1 .0f , 0 .80f
116+ 2 , 10 , 6 , 4 , 40 , 2 , 2 , 2 , 2 , 2 , 85 .0f , 63 .0f , 3 .5f , 1 .0f , 1 .0f , 0 .80f
122117 }, {
123118 ASTCENC_PRE_FAST,
124- 2 , 18 , 12 , 10 , 55 , 3 , 3 , 2 , 2 , 2 , 85 .0f , 63 .0f , 3 .5f , 3 . 5f , 1 .0f , 1 .0f , 0 .85f
119+ 2 , 18 , 12 , 10 , 55 , 3 , 3 , 2 , 2 , 2 , 85 .0f , 63 .0f , 3 .5f , 1 .0f , 1 .0f , 0 .85f
125120 }, {
126121 ASTCENC_PRE_MEDIUM,
127- 3 , 34 , 28 , 16 , 77 , 3 , 3 , 2 , 2 , 2 , 95 .0f , 70 .0f , 3 .5f , 3 . 5f , 1 .1f , 1 .05f , 0 .90f
122+ 3 , 34 , 28 , 16 , 77 , 3 , 3 , 2 , 2 , 2 , 95 .0f , 70 .0f , 3 .5f , 1 .1f , 1 .05f , 0 .90f
128123 }, {
129124 ASTCENC_PRE_THOROUGH,
130- 4 , 82 , 60 , 30 , 93 , 4 , 4 , 3 , 2 , 2 , 105 .0f , 77 .0f , 10 .0f , 10 . 0f , 1 .3f , 1 .2f , 0 .97f
125+ 4 , 82 , 60 , 30 , 93 , 4 , 4 , 3 , 2 , 2 , 105 .0f , 77 .0f , 10 .0f , 1 .3f , 1 .2f , 0 .97f
131126 }, {
132127 ASTCENC_PRE_VERYTHOROUGH,
133- 4 , 256 , 128 , 64 , 98 , 4 , 6 , 9 , 5 , 2 , 200 .0f , 200 .0f , 10 .0f , 10 . 0f , 1 .6f , 1 .4f , 0 .98f
128+ 4 , 256 , 128 , 64 , 98 , 4 , 6 , 9 , 5 , 2 , 200 .0f , 200 .0f , 10 .0f , 1 .6f , 1 .4f , 0 .98f
134129 }, {
135130 ASTCENC_PRE_EXHAUSTIVE,
136- 4 , 256 , 256 , 256 , 100 , 4 , 8 , 32 , 32 , 32 , 200 .0f , 200 .0f , 10 .0f , 10 . 0f , 2 .0f , 2 .0f , 0 .99f
131+ 4 , 256 , 256 , 256 , 100 , 4 , 8 , 32 , 32 , 32 , 200 .0f , 200 .0f , 10 .0f , 2 .0f , 2 .0f , 0 .99f
137132 }
138133}};
139134
@@ -444,8 +439,7 @@ static astcenc_error validate_config(
444439 config.tune_3partitioning_candidate_limit = astc::clamp (config.tune_3partitioning_candidate_limit , 1u , TUNE_MAX_PARTITIIONING_CANDIDATES);
445440 config.tune_4partitioning_candidate_limit = astc::clamp (config.tune_4partitioning_candidate_limit , 1u , TUNE_MAX_PARTITIIONING_CANDIDATES);
446441 config.tune_db_limit = astc::max (config.tune_db_limit , 0 .0f );
447- config.tune_mode0_mse_overshoot = astc::max (config.tune_mode0_mse_overshoot , 1 .0f );
448- config.tune_refinement_mse_overshoot = astc::max (config.tune_refinement_mse_overshoot , 1 .0f );
442+ config.tune_mse_overshoot = astc::max (config.tune_mse_overshoot , 1 .0f );
449443 config.tune_2_partition_early_out_limit_factor = astc::max (config.tune_2_partition_early_out_limit_factor , 0 .0f );
450444 config.tune_3_partition_early_out_limit_factor = astc::max (config.tune_3_partition_early_out_limit_factor , 0 .0f );
451445 config.tune_2_plane_early_out_limit_correlation = astc::max (config.tune_2_plane_early_out_limit_correlation , 0 .0f );
@@ -568,8 +562,7 @@ astcenc_error astcenc_config_init(
568562 config.tune_db_limit = astc::max ((*preset_configs)[start].tune_db_limit_a_base - 35 * ltexels,
569563 (*preset_configs)[start].tune_db_limit_b_base - 19 * ltexels);
570564
571- config.tune_mode0_mse_overshoot = (*preset_configs)[start].tune_mode0_mse_overshoot ;
572- config.tune_refinement_mse_overshoot = (*preset_configs)[start].tune_refinement_mse_overshoot ;
565+ config.tune_mse_overshoot = (*preset_configs)[start].tune_mse_overshoot ;
573566
574567 config.tune_2_partition_early_out_limit_factor = (*preset_configs)[start].tune_2_partition_early_out_limit_factor ;
575568 config.tune_3_partition_early_out_limit_factor =(*preset_configs)[start].tune_3_partition_early_out_limit_factor ;
@@ -611,8 +604,7 @@ astcenc_error astcenc_config_init(
611604 config.tune_db_limit = astc::max (LERP (tune_db_limit_a_base) - 35 * ltexels,
612605 LERP (tune_db_limit_b_base) - 19 * ltexels);
613606
614- config.tune_mode0_mse_overshoot = LERP (tune_mode0_mse_overshoot);
615- config.tune_refinement_mse_overshoot = LERP (tune_refinement_mse_overshoot);
607+ config.tune_mse_overshoot = LERP (tune_mse_overshoot);
616608
617609 config.tune_2_partition_early_out_limit_factor = LERP (tune_2_partition_early_out_limit_factor);
618610 config.tune_3_partition_early_out_limit_factor = LERP (tune_3_partition_early_out_limit_factor);
0 commit comments