mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-09-17 07:54:30 +00:00
Adjust compressor to deal with transcoder changes (start_decoding() renamed to start_transcoding), fixing compile warnings
This commit is contained in:
@@ -827,13 +827,13 @@ namespace basisu
|
||||
interval_timer tm;
|
||||
tm.start();
|
||||
|
||||
if (!decoder.start_decoding(&comp_data[0], (uint32_t)comp_data.size()))
|
||||
if (!decoder.start_transcoding(&comp_data[0], (uint32_t)comp_data.size()))
|
||||
{
|
||||
error_printf("decoder.start_decoding() failed!\n");
|
||||
error_printf("decoder.start_transcoding() failed!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
debug_printf("basisu_comppressor::start_decoding() took %3.3fms\n", tm.get_elapsed_ms());
|
||||
debug_printf("basisu_comppressor::start_transcoding() took %3.3fms\n", tm.get_elapsed_ms());
|
||||
|
||||
uint32_t total_orig_pixels = 0;
|
||||
uint32_t total_texels = 0;
|
||||
|
||||
@@ -322,14 +322,14 @@ namespace basisu
|
||||
if (block.m_lo.m_mode != (1 << 6))
|
||||
return false;
|
||||
|
||||
const uint32_t r0 = (block.m_lo.m_r0 << 1) | block.m_lo.m_p0;
|
||||
const uint32_t g0 = (block.m_lo.m_g0 << 1) | block.m_lo.m_p0;
|
||||
const uint32_t b0 = (block.m_lo.m_b0 << 1) | block.m_lo.m_p0;
|
||||
const uint32_t a0 = (block.m_lo.m_a0 << 1) | block.m_lo.m_p0;
|
||||
const uint32_t r1 = (block.m_lo.m_r1 << 1) | block.m_hi.m_p1;
|
||||
const uint32_t g1 = (block.m_lo.m_g1 << 1) | block.m_hi.m_p1;
|
||||
const uint32_t b1 = (block.m_lo.m_b1 << 1) | block.m_hi.m_p1;
|
||||
const uint32_t a1 = (block.m_lo.m_a1 << 1) | block.m_hi.m_p1;
|
||||
const uint32_t r0 = (uint32_t)((block.m_lo.m_r0 << 1) | block.m_lo.m_p0);
|
||||
const uint32_t g0 = (uint32_t)((block.m_lo.m_g0 << 1) | block.m_lo.m_p0);
|
||||
const uint32_t b0 = (uint32_t)((block.m_lo.m_b0 << 1) | block.m_lo.m_p0);
|
||||
const uint32_t a0 = (uint32_t)((block.m_lo.m_a0 << 1) | block.m_lo.m_p0);
|
||||
const uint32_t r1 = (uint32_t)((block.m_lo.m_r1 << 1) | block.m_hi.m_p1);
|
||||
const uint32_t g1 = (uint32_t)((block.m_lo.m_g1 << 1) | block.m_hi.m_p1);
|
||||
const uint32_t b1 = (uint32_t)((block.m_lo.m_b1 << 1) | block.m_hi.m_p1);
|
||||
const uint32_t a1 = (uint32_t)((block.m_lo.m_a1 << 1) | block.m_hi.m_p1);
|
||||
|
||||
color_rgba vals[16];
|
||||
for (uint32_t i = 0; i < 16; i++)
|
||||
|
||||
@@ -540,9 +540,9 @@ static bool unpack_and_validate_mode(command_line_params &opts, bool validate_fl
|
||||
printf("\n");
|
||||
printf(" Y Flipped: %u, Has alpha slices: %u\n", fileinfo.m_y_flipped, fileinfo.m_has_alpha_slices);
|
||||
|
||||
if (!dec.start_decoding(&basis_data[0], (uint32_t)basis_data.size()))
|
||||
if (!dec.start_transcoding(&basis_data[0], (uint32_t)basis_data.size()))
|
||||
{
|
||||
error_printf("start_decoding() failed!\n");
|
||||
error_printf("start_transcoding() failed!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user