#[repr(C)]pub struct astcenc_config {Show 28 fields
pub profile: astcenc_profile,
pub flags: c_uint,
pub block_x: c_uint,
pub block_y: c_uint,
pub block_z: c_uint,
pub cw_r_weight: f32,
pub cw_g_weight: f32,
pub cw_b_weight: f32,
pub cw_a_weight: f32,
pub a_scale_radius: c_uint,
pub rgbm_m_scale: f32,
pub tune_partition_count_limit: c_uint,
pub tune_2partition_index_limit: c_uint,
pub tune_3partition_index_limit: c_uint,
pub tune_4partition_index_limit: c_uint,
pub tune_block_mode_limit: c_uint,
pub tune_refinement_limit: c_uint,
pub tune_candidate_limit: c_uint,
pub tune_2partitioning_candidate_limit: c_uint,
pub tune_3partitioning_candidate_limit: c_uint,
pub tune_4partitioning_candidate_limit: c_uint,
pub tune_db_limit: f32,
pub tune_mse_overshoot: f32,
pub tune_2partition_early_out_limit_factor: f32,
pub tune_3partition_early_out_limit_factor: f32,
pub tune_2plane_early_out_limit_correlation: f32,
pub tune_search_mode0_enable: f32,
pub progress_callback: astcenc_progress_callback,
}Expand description
@brief The config structure.
This structure will initially be populated by a call to astcenc_config_init, but power users may modify it before calling astcenc_context_alloc. See astcenccli_toplevel_help.cpp for full user documentation of the power-user settings.
Note for any settings which are associated with a specific color component, the value in the config applies to the component that exists after any compression data swizzle is applied.
Fields§
§profile: astcenc_profile@brief The color profile.
flags: c_uint@brief The set of set flags.
block_x: c_uint@brief The ASTC block size X dimension.
block_y: c_uint@brief The ASTC block size Y dimension.
block_z: c_uint@brief The ASTC block size Z dimension.
cw_r_weight: f32@brief The red component weight scale for error weighting (-cw).
cw_g_weight: f32@brief The green component weight scale for error weighting (-cw).
cw_b_weight: f32@brief The blue component weight scale for error weighting (-cw).
cw_a_weight: f32@brief The alpha component weight scale for error weighting (-cw).
a_scale_radius: c_uint@brief The radius for any alpha-weight scaling (-a).
It is recommended that this is set to 1 when using FLG_USE_ALPHA_WEIGHT on a texture that will be sampled using linear texture filtering to minimize color bleed out of transparent texels that are adjacent to non-transparent texels.
rgbm_m_scale: f32@brief The RGBM scale factor for the shared multiplier (-rgbm).
tune_partition_count_limit: c_uint@brief The maximum number of partitions searched (-partitioncountlimit).
Valid values are between 1 and 4.
tune_2partition_index_limit: c_uint@brief The maximum number of partitions searched (-2partitionindexlimit).
Valid values are between 1 and 1024.
tune_3partition_index_limit: c_uint@brief The maximum number of partitions searched (-3partitionindexlimit).
Valid values are between 1 and 1024.
tune_4partition_index_limit: c_uint@brief The maximum number of partitions searched (-4partitionindexlimit).
Valid values are between 1 and 1024.
tune_block_mode_limit: c_uint@brief The maximum centile for block modes searched (-blockmodelimit).
Valid values are between 1 and 100.
tune_refinement_limit: c_uint@brief The maximum iterative refinements applied (-refinementlimit).
Valid values are between 1 and N; there is no technical upper limit but little benefit is expected after N=4.
tune_candidate_limit: c_uint@brief The number of trial candidates per mode search (-candidatelimit).
Valid values are between 1 and TUNE_MAX_TRIAL_CANDIDATES.
tune_2partitioning_candidate_limit: c_uint@brief The number of trial partitionings per search (-2partitioncandidatelimit).
Valid values are between 1 and TUNE_MAX_PARTITIONING_CANDIDATES.
tune_3partitioning_candidate_limit: c_uint@brief The number of trial partitionings per search (-3partitioncandidatelimit).
Valid values are between 1 and TUNE_MAX_PARTITIONING_CANDIDATES.
tune_4partitioning_candidate_limit: c_uint@brief The number of trial partitionings per search (-4partitioncandidatelimit).
Valid values are between 1 and TUNE_MAX_PARTITIONING_CANDIDATES.
tune_db_limit: f32@brief The dB threshold for stopping block search (-dblimit).
This option is ineffective for HDR textures.
tune_mse_overshoot: f32@brief The amount of MSE overshoot needed to early-out trials.
The first early-out is for 1 partition, 1 plane trials, where we try a minimal encode using the high probability block modes. This can short-cut compression for simple blocks.
The second early-out is for refinement trials, where we can exit refinement once quality is reached.
tune_2partition_early_out_limit_factor: f32@brief The threshold for skipping 3.1/4.1 trials (-2partitionlimitfactor).
This option is further scaled for normal maps, so it skips less often.
tune_3partition_early_out_limit_factor: f32@brief The threshold for skipping 4.1 trials (-3partitionlimitfactor).
This option is further scaled for normal maps, so it skips less often.
tune_2plane_early_out_limit_correlation: f32@brief The threshold for skipping two weight planes (-2planelimitcorrelation).
This option is ineffective for normal maps.
tune_search_mode0_enable: f32@brief The config enable for the mode0 fast-path search.
If this is set to TUNE_MIN_TEXELS_MODE0 or higher then the early-out fast mode0 search is enabled. This option is ineffective for 3D block sizes.
progress_callback: astcenc_progress_callback@brief The progress callback, can be @c nullptr.
If this is specified the codec will peridocially report progress for compression as a percentage between 0 and 100. The callback is called from one of the compressor threads, so doing significant work in the callback will reduce compression performance.
Trait Implementations§
Source§impl Clone for astcenc_config
impl Clone for astcenc_config
Source§fn clone(&self) -> astcenc_config
fn clone(&self) -> astcenc_config
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more