#pragma once
#include "../transcoder/basisu.h"
#include "basisu_enc.h"
#include "basisu_etc.h"
namespace basisu
{
bool opencl_init(bool force_serialization);
void opencl_deinit();
bool opencl_is_available();
struct opencl_context;
opencl_context_ptr;
opencl_context_ptr opencl_create_context();
void opencl_destroy_context(opencl_context_ptr context);
#pragma pack(push, 1)
struct cl_pixel_block
{ … };
#pragma pack(pop)
const uint32_t OPENCL_ENCODE_ETC1S_MAX_PERMS = …;
bool opencl_set_pixel_blocks(opencl_context_ptr pContext, uint32_t total_blocks, const cl_pixel_block* pPixel_blocks);
bool opencl_encode_etc1s_blocks(opencl_context_ptr pContext, etc_block* pOutput_blocks, bool perceptual, uint32_t total_perms);
#pragma pack(push, 1)
struct cl_pixel_cluster
{ … };
#pragma pack(pop)
bool opencl_encode_etc1s_pixel_clusters(
opencl_context_ptr pContext,
etc_block* pOutput_blocks,
uint32_t total_clusters,
const cl_pixel_cluster *pClusters,
uint64_t total_pixels,
const color_rgba *pPixels,
const uint32_t *pPixel_weights,
bool perceptual, uint32_t total_perms);
#pragma pack(push, 1)
struct cl_block_info_struct
{ … };
struct cl_endpoint_cluster_struct
{ … };
#pragma pack(pop)
bool opencl_refine_endpoint_clusterization(
opencl_context_ptr pContext,
const cl_block_info_struct *pPixel_block_info,
uint32_t total_clusters,
const cl_endpoint_cluster_struct *pCluster_info,
const uint32_t *pSorted_block_indices,
uint32_t* pOutput_cluster_indices,
bool perceptual);
#pragma pack(push, 1)
struct fosc_selector_struct
{ … };
struct fosc_block_struct
{ … };
struct fosc_param_struct
{ … };
#pragma pack(pop)
bool opencl_find_optimal_selector_clusters_for_each_block(
opencl_context_ptr pContext,
const fosc_block_struct* pInput_block_info,
uint32_t total_input_selectors,
const fosc_selector_struct* pInput_selectors,
const uint32_t* pSelector_cluster_indices,
uint32_t* pOutput_selector_cluster_indices,
bool perceptual);
#pragma pack(push, 1)
struct ds_param_struct
{ … };
#pragma pack(pop)
bool opencl_determine_selectors(
opencl_context_ptr pContext,
const color_rgba* pInput_etc_color5_and_inten,
etc_block* pOutput_blocks,
bool perceptual);
}