astcenc_config

Struct astcenc_config 

Source
#[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

Source§

fn clone(&self) -> astcenc_config

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for astcenc_config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for astcenc_config

Source§

fn eq(&self, other: &astcenc_config) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for astcenc_config

Source§

impl StructuralPartialEq for astcenc_config

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.