#include "basisu_etc.h"
#if BASISU_SUPPORT_SSE
#define CPPSPMD_NAME …
#include "basisu_kernels_declares.h"
#endif
#define BASISU_DEBUG_ETC_ENCODER …
#define BASISU_DEBUG_ETC_ENCODER_DEEPER …
namespace basisu
{
const int8_t g_etc2_eac_tables[16][8] = …;
const int8_t g_etc2_eac_tables8[16][8] = …;
static uint16_t g_etc1_inverse_lookup[2 * 8 * 4][256];
static const uint16_t g_etc1_color8_to_etc_block_config_0_255[2][33] = …;
static const uint16_t g_etc1_color8_to_etc_block_config_1_to_254[254][12] = …;
static uint32_t etc1_decode_value(uint32_t diff, uint32_t inten, uint32_t selector, uint32_t packed_c)
{ … }
void pack_etc1_solid_color_init()
{ … }
uint64_t pack_etc1_block_solid_color(etc_block& block, const uint8_t* pColor)
{ … }
const uint32_t BASISU_ETC1_CLUSTER_FIT_ORDER_TABLE_SIZE = …;
static const struct { … } g_cluster_fit_order_tab[BASISU_ETC1_CLUSTER_FIT_ORDER_TABLE_SIZE] = …;
const int g_etc1_inten_tables[cETC1IntenModifierValues][cETC1SelectorValues] = …;
const uint8_t g_etc1_to_selector_index[cETC1SelectorValues] = …;
const uint8_t g_selector_index_to_etc1[cETC1SelectorValues] = …;
const etc_coord2 g_etc1_pixel_coords[2][2][8] = …;
const uint32_t g_etc1_pixel_indices[2][2][8] = …;
uint16_t etc_block::pack_color5(const color_rgba& color, bool scaled, uint32_t bias)
{ … }
uint16_t etc_block::pack_color5(uint32_t r, uint32_t g, uint32_t b, bool scaled, uint32_t bias)
{ … }
color_rgba etc_block::unpack_color5(uint16_t packed_color5, bool scaled, uint32_t alpha)
{ … }
void etc_block::unpack_color5(color_rgba& result, uint16_t packed_color5, bool scaled)
{ … }
void etc_block::unpack_color5(uint32_t& r, uint32_t& g, uint32_t& b, uint16_t packed_color5, bool scaled)
{ … }
bool etc_block::unpack_color5(color_rgba& result, uint16_t packed_color5, uint16_t packed_delta3, bool scaled, uint32_t alpha)
{ … }
bool etc_block::unpack_color5(uint32_t& r, uint32_t& g, uint32_t& b, uint16_t packed_color5, uint16_t packed_delta3, bool scaled, uint32_t alpha)
{ … }
uint16_t etc_block::pack_delta3(const color_rgba_i16& color)
{ … }
uint16_t etc_block::pack_delta3(int r, int g, int b)
{ … }
color_rgba_i16 etc_block::unpack_delta3(uint16_t packed_delta3)
{ … }
void etc_block::unpack_delta3(int& r, int& g, int& b, uint16_t packed_delta3)
{ … }
uint16_t etc_block::pack_color4(const color_rgba& color, bool scaled, uint32_t bias)
{ … }
uint16_t etc_block::pack_color4(uint32_t r, uint32_t g, uint32_t b, bool scaled, uint32_t bias)
{ … }
color_rgba etc_block::unpack_color4(uint16_t packed_color4, bool scaled, uint32_t alpha)
{ … }
void etc_block::unpack_color4(uint32_t& r, uint32_t& g, uint32_t& b, uint16_t packed_color4, bool scaled)
{ … }
void etc_block::get_diff_subblock_colors(color_rgba* pDst, uint16_t packed_color5, uint32_t table_idx)
{ … }
bool etc_block::get_diff_subblock_colors(color_rgba* pDst, uint16_t packed_color5, uint16_t packed_delta3, uint32_t table_idx)
{ … }
void etc_block::get_abs_subblock_colors(color_rgba* pDst, uint16_t packed_color4, uint32_t table_idx)
{ … }
bool unpack_etc1(const etc_block& block, color_rgba *pDst, bool preserve_alpha)
{ … }
inline int extend_6_to_8(uint32_t n)
{ … }
inline int extend_7_to_8(uint32_t n)
{ … }
inline int extend_4_to_8(uint32_t n)
{ … }
uint64_t etc_block::evaluate_etc1_error(const color_rgba* pBlock_pixels, bool perceptual, int subblock_index) const
{ … }
void etc_block::get_subblock_pixels(color_rgba* pPixels, int subblock_index) const
{ … }
bool etc1_optimizer::compute()
{ … }
void etc1_optimizer::refine_solution(uint32_t max_refinement_trials)
{ … }
void etc1_optimizer::compute_internal_neighborhood(int scan_r, int scan_g, int scan_b)
{ … }
void etc1_optimizer::compute_internal_cluster_fit(uint32_t total_perms_to_try)
{ … }
void etc1_optimizer::init(const params& params, results& result)
{ … }
bool etc1_optimizer::check_for_redundant_solution(const etc1_solution_coordinates& coords)
{ … }
static uint8_t g_eval_dist_tables[8][256] = …;
bool etc1_optimizer::evaluate_solution_slow(const etc1_solution_coordinates& coords, potential_solution& trial_solution, potential_solution* pBest_solution)
{ … }
bool etc1_optimizer::evaluate_solution_fast(const etc1_solution_coordinates& coords, potential_solution& trial_solution, potential_solution* pBest_solution)
{ … }
uint64_t pack_eac_a8(pack_eac_a8_results& results, const uint8_t* pPixels, uint32_t num_pixels, uint32_t base_search_rad, uint32_t mul_search_rad, uint32_t table_mask)
{ … }
void pack_eac_a8(eac_a8_block* pBlock, const uint8_t* pPixels, uint32_t base_search_rad, uint32_t mul_search_rad, uint32_t table_mask)
{ … }
}