#pragma once
#include "basisu_enc.h"
#include "basisu_gpu_texture.h"
#include "../transcoder/basisu_astc_helpers.h"
#include "../transcoder/basisu_astc_hdr_core.h"
namespace basisu
{
void astc_hdr_enc_init();
const uint32_t MODE11_FIRST_ISE_RANGE = …, MODE11_LAST_ISE_RANGE = …;
const uint32_t MODE7_PART1_FIRST_ISE_RANGE = …, MODE7_PART1_LAST_ISE_RANGE = …;
const uint32_t MODE7_PART2_FIRST_ISE_RANGE = …, MODE7_PART2_LAST_ISE_RANGE = …;
const uint32_t MODE11_PART2_FIRST_ISE_RANGE = …, MODE11_PART2_LAST_ISE_RANGE = …;
const uint32_t MODE11_TOTAL_SUBMODES = …;
const uint32_t MODE7_TOTAL_SUBMODES = …;
struct astc_hdr_codec_options
{ … };
struct astc_hdr_pack_results
{ … };
void interpolate_qlog12_colors(
const int e[2][3],
basist::half_float* pDecoded_half,
vec3F* pDecoded_float,
uint32_t n, uint32_t ise_weight_range);
bool get_astc_hdr_mode_11_block_colors(
const uint8_t* pEndpoints,
basist::half_float* pDecoded_half,
vec3F* pDecoded_float,
uint32_t n, uint32_t ise_weight_range, uint32_t ise_endpoint_range);
bool get_astc_hdr_mode_7_block_colors(
const uint8_t* pEndpoints,
basist::half_float* pDecoded_half,
vec3F* pDecoded_float,
uint32_t n, uint32_t ise_weight_range, uint32_t ise_endpoint_range);
double eval_selectors(
uint32_t num_pixels,
uint8_t* pWeights,
const basist::half_float* pBlock_pixels_half,
uint32_t num_weight_levels,
const basist::half_float* pDecoded_half,
const astc_hdr_codec_options& coptions,
uint32_t usable_selector_bitmask = UINT32_MAX);
double compute_block_error(const basist::half_float* pOrig_block, const basist::half_float* pPacked_block, const astc_hdr_codec_options& coptions);
bool astc_hdr_enc_block(
const float* pRGBPixels,
const astc_hdr_codec_options& coptions,
basisu::vector<astc_hdr_pack_results> &all_results);
bool astc_hdr_pack_results_to_block(basist::astc_blk& dst_blk, const astc_hdr_pack_results& results);
bool astc_hdr_refine_weights(const basist::half_float* pSource_block, astc_hdr_pack_results& cur_results, const astc_hdr_codec_options& coptions, float bc6h_weight, bool* pImproved_flag);
struct astc_hdr_block_stats
{ … };
}