gamut.codecs.bc7enc16

BC7 encoding image loading. D translation of bc7enc16 d3b037f33b8c6df184177a0ae6a0f4cfec1434ad

Members

Aliases

bc7enc16_bool
alias bc7enc16_bool = ubyte
Undocumented in source.

Functions

bc7enc16_compress_block
bc7enc16_bool bc7enc16_compress_block(void* pBlock, const(void)* pPixelsRGBA, const(bc7enc16_compress_block_params)* pComp_params)
Undocumented in source. Be warned that the author may not have intended to support it.
bc7enc16_compress_block_init
void bc7enc16_compress_block_init()
Undocumented in source. Be warned that the author may not have intended to support it.
bc7enc16_compress_block_params_init
void bc7enc16_compress_block_params_init(bc7enc16_compress_block_params* p)
Undocumented in source. Be warned that the author may not have intended to support it.
bc7enc16_compress_block_params_init_linear_weights
void bc7enc16_compress_block_params_init_linear_weights(bc7enc16_compress_block_params* p)
Undocumented in source. Be warned that the author may not have intended to support it.
bc7enc16_compress_block_params_init_perceptual_weights
void bc7enc16_compress_block_params_init_perceptual_weights(bc7enc16_compress_block_params* p)
Undocumented in source. Be warned that the author may not have intended to support it.
clampf
float clampf(float value, float low, float high)
Undocumented in source. Be warned that the author may not have intended to support it.
clampi
int clampi(int value, int low, int high)
Undocumented in source. Be warned that the author may not have intended to support it.
color_cell_compression
ulong color_cell_compression(uint mode, const(color_cell_compressor_params)* pParams, color_cell_compressor_results* pResults, const(bc7enc16_compress_block_params)* pComp_params)
Undocumented in source. Be warned that the author may not have intended to support it.
color_cell_compression_est
ulong color_cell_compression_est(uint num_pixels, color_quad_u8* pPixels, bc7enc16_bool perceptual, uint* pweights, ulong best_err_so_far)
Undocumented in source. Be warned that the author may not have intended to support it.
color_quad_u8_notequals
bc7enc16_bool color_quad_u8_notequals(const(color_quad_u8) pLHS, const(color_quad_u8) pRHS)
Undocumented in source. Be warned that the author may not have intended to support it.
color_quad_u8_set
color_quad_u8* color_quad_u8_set(color_quad_u8* pRes, int r, int g, int b, int a)
Undocumented in source. Be warned that the author may not have intended to support it.
color_quad_u8_set_clamped
color_quad_u8* color_quad_u8_set_clamped(color_quad_u8* pRes, int r, int g, int b, int a)
Undocumented in source. Be warned that the author may not have intended to support it.
compute_color_distance_rgb
ulong compute_color_distance_rgb(const(color_quad_u8)* pE1, const(color_quad_u8)* pE2, bc7enc16_bool perceptual, const(uint)* weights)
Undocumented in source. Be warned that the author may not have intended to support it.
compute_color_distance_rgba
ulong compute_color_distance_rgba(const(color_quad_u8)* pE1, const(color_quad_u8)* pE2, bc7enc16_bool perceptual, const(uint)* weights)
Undocumented in source. Be warned that the author may not have intended to support it.
compute_least_squares_endpoints_rgb
void compute_least_squares_endpoints_rgb(uint N, ubyte* pSelectors, const(vec4F)* pSelector_weights, vec4F* pXl, vec4F* pXh, const(color_quad_u8)* pColors)
Undocumented in source. Be warned that the author may not have intended to support it.
compute_least_squares_endpoints_rgba
void compute_least_squares_endpoints_rgba(uint N, const(ubyte)* pSelectors, const(vec4F)* pSelector_weights, vec4F* pXl, vec4F* pXh, const(color_quad_u8)* pColors)
Undocumented in source. Be warned that the author may not have intended to support it.
estimate_partition
uint estimate_partition(const(color_quad_u8)* pPixels, const(bc7enc16_compress_block_params)* pComp_params, uint* pweights)
Undocumented in source. Be warned that the author may not have intended to support it.
evaluate_solution
ulong evaluate_solution(const(color_quad_u8)* pLow, const(color_quad_u8)* pHigh, const(uint)* pbits, const(color_cell_compressor_params)* pParams, color_cell_compressor_results* pResults)
Undocumented in source. Be warned that the author may not have intended to support it.
fixDegenerateEndpoints
void fixDegenerateEndpoints(uint mode, color_quad_u8 pTrialMinColor, color_quad_u8 pTrialMaxColor, const(vec4F) pXl, const(vec4F) pXh, uint iscale)
Undocumented in source. Be warned that the author may not have intended to support it.
get_bc7_color_index_size
int get_bc7_color_index_size(int mode, int index_selection_bit)
Undocumented in source. Be warned that the author may not have intended to support it.
handle_alpha_block
void handle_alpha_block(void* pBlock, const(color_quad_u8)* pPixels, const(bc7enc16_compress_block_params)* pComp_params, color_cell_compressor_params* pParams)
Undocumented in source. Be warned that the author may not have intended to support it.
maximumf
float maximumf(float a, float b)
Undocumented in source. Be warned that the author may not have intended to support it.
maximumu
uint maximumu(uint a, uint b)
Undocumented in source. Be warned that the author may not have intended to support it.
maximumub
ubyte maximumub(ubyte a, ubyte b)
Undocumented in source. Be warned that the author may not have intended to support it.
minimumf
float minimumf(float a, float b)
Undocumented in source. Be warned that the author may not have intended to support it.
minimumu
uint minimumu(uint a, uint b)
Undocumented in source. Be warned that the author may not have intended to support it.
minimumub
ubyte minimumub(ubyte a, ubyte b)
Undocumented in source. Be warned that the author may not have intended to support it.
pack_mode1_to_one_color
ulong pack_mode1_to_one_color(const(color_cell_compressor_params)* pParams, color_cell_compressor_results* pResults, uint r, uint g, uint b, ubyte* pSelectors)
Undocumented in source. Be warned that the author may not have intended to support it.
saturate
float saturate(float value)
Undocumented in source. Be warned that the author may not have intended to support it.
scale_color
color_quad_u8 scale_color(const(color_quad_u8) pC, const(color_cell_compressor_params)* pParams)
Undocumented in source. Be warned that the author may not have intended to support it.
set_block_bits
void set_block_bits(ubyte* pBytes, uint val, uint num_bits, uint* pCur_ofs)
Undocumented in source. Be warned that the author may not have intended to support it.
squaref
float squaref(float i)
Undocumented in source. Be warned that the author may not have intended to support it.
squarei
int squarei(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_add
vec4F vec4F_add(const(vec4F)* pLHS, const(vec4F)* pRHS)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_dot
float vec4F_dot(const(vec4F)* pLHS, const(vec4F)* pRHS)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_from_color
vec4F vec4F_from_color(const(color_quad_u8)* pC)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_mul
vec4F vec4F_mul(const(vec4F)* pLHS, float s)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_normalize_in_place
vec4F* vec4F_normalize_in_place(vec4F* pV)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_saturate
vec4F vec4F_saturate(const(vec4F)* pV)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_saturate_in_place
void vec4F_saturate_in_place(vec4F pV)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_set
vec4F* vec4F_set(vec4F* pV, float x, float y, float z, float w)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_set_scalar
vec4F* vec4F_set_scalar(vec4F* pV, float x)
Undocumented in source. Be warned that the author may not have intended to support it.
vec4F_sub
vec4F vec4F_sub(const(vec4F)* pLHS, const(vec4F)* pRHS)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

BC7ENC16_BLOCK_SIZE
enum BC7ENC16_BLOCK_SIZE;
Undocumented in source.
BC7ENC16_FALSE
enum BC7ENC16_FALSE;
Undocumented in source.
BC7ENC16_MAX_PARTITIONS1
enum BC7ENC16_MAX_PARTITIONS1;
Undocumented in source.
BC7ENC16_MAX_UBER_LEVEL
enum BC7ENC16_MAX_UBER_LEVEL;
Undocumented in source.
BC7ENC16_TRUE
enum BC7ENC16_TRUE;
Undocumented in source.

Static functions

encode_bc7_block
void encode_bc7_block(void* pBlock, const(bc7_optimization_results)* pResults)
Undocumented in source. Be warned that the author may not have intended to support it.
find_optimal_solution
ulong find_optimal_solution(uint mode, vec4F xl, vec4F xh, color_cell_compressor_params* pParams, color_cell_compressor_results* pResults)
Undocumented in source. Be warned that the author may not have intended to support it.
handle_opaque_block
void handle_opaque_block(void* pBlock, const(color_quad_u8)* pPixels, const(bc7enc16_compress_block_params)* pComp_params, color_cell_compressor_params* pParams)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

g_bc7_alpha_precision_table
byte[8] g_bc7_alpha_precision_table;
Undocumented in source.
g_bc7_color_index_bitcount
ubyte[8] g_bc7_color_index_bitcount;
Undocumented in source.
g_bc7_color_precision_table
ubyte[8] g_bc7_color_precision_table;
Undocumented in source.
g_bc7_mode_1_optimal_endpoints
endpoint_err[2][256] g_bc7_mode_1_optimal_endpoints;
Undocumented in source.
g_bc7_mode_has_p_bits
ubyte[8] g_bc7_mode_has_p_bits;
Undocumented in source.
g_bc7_mode_has_shared_p_bits
ubyte[8] g_bc7_mode_has_shared_p_bits;
Undocumented in source.
g_bc7_num_subsets
ubyte[8] g_bc7_num_subsets;
Undocumented in source.
g_bc7_partition1
ubyte[64] g_bc7_partition1;
Undocumented in source.
g_bc7_partition2
ubyte[64 * 16] g_bc7_partition2;
Undocumented in source.
g_bc7_partition_bits
ubyte[8] g_bc7_partition_bits;
Undocumented in source.
g_bc7_table_anchor_index_second_subset
ubyte[64] g_bc7_table_anchor_index_second_subset;
Undocumented in source.
g_bc7_weights3
uint[8] g_bc7_weights3;
Undocumented in source.
g_bc7_weights3x
float[8 * 4] g_bc7_weights3x;
Undocumented in source.
g_bc7_weights4
uint[16] g_bc7_weights4;
Undocumented in source.
g_bc7_weights4x
float[16 * 4] g_bc7_weights4x;
Undocumented in source.
g_partition_predictors
uint[35] g_partition_predictors;
Undocumented in source.
g_tableInitialized
bool g_tableInitialized;
Undocumented in source.
g_tableProtect
Mutex g_tableProtect;
Undocumented in source.

Structs

bc7_optimization_results
struct bc7_optimization_results
Undocumented in source.
bc7enc16_compress_block_params
struct bc7enc16_compress_block_params
Undocumented in source.
color_cell_compressor_params
struct color_cell_compressor_params
Undocumented in source.
color_cell_compressor_results
struct color_cell_compressor_results
Undocumented in source.
color_quad_u8
struct color_quad_u8
Undocumented in source.
endpoint_err
struct endpoint_err
Undocumented in source.
vec4F
struct vec4F
Undocumented in source.

Variables

BC7ENC16_MODE_1_OPTIMAL_INDEX
enum uint BC7ENC16_MODE_1_OPTIMAL_INDEX;
Undocumented in source.

Meta