Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions inc/crn_decomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ static void* crnd_default_realloc(void* p, size_t size, size_t* pActual_size, bo
}

static size_t crnd_default_msize(void* p, void* pUser_data) {
pUser_data;
(void)pUser_data;
#ifdef WIN32
return p ? _msize(p) : 0;
#else
Expand Down Expand Up @@ -3335,8 +3335,8 @@ class crn_unpacker {

bool unpack_dxt1(uint8** pDst, uint32 output_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (output_pitch_in_bytes >> 2) - (width << 1);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3387,8 +3387,8 @@ class crn_unpacker {
bool unpack_dxt5(uint8** pDst, uint32 row_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (row_pitch_in_bytes >> 2) - (width << 2);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3449,8 +3449,8 @@ class crn_unpacker {

bool unpack_dxn(uint8** pDst, uint32 row_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (row_pitch_in_bytes >> 2) - (width << 2);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3512,8 +3512,8 @@ class crn_unpacker {

bool unpack_dxt5a(uint8** pDst, uint32 row_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (row_pitch_in_bytes >> 2) - (width << 1);

if (m_block_buffer.size() < width)
Expand Down Expand Up @@ -3564,8 +3564,8 @@ class crn_unpacker {

bool unpack_etc1(uint8** pDst, uint32 output_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (output_pitch_in_bytes >> 2) - (width << 1);

if (m_block_buffer.size() < width << 1)
Expand Down Expand Up @@ -3631,8 +3631,8 @@ class crn_unpacker {
bool unpack_etc2a(uint8** pDst, uint32 output_pitch_in_bytes, uint32 output_width, uint32 output_height) {
const uint32 num_color_endpoints = m_color_endpoints.size();
const uint32 num_alpha_endpoints = m_alpha_endpoints.size();
const uint32 width = output_width + 1 & ~1;
const uint32 height = output_height + 1 & ~1;
const uint32 width = (output_width + 1) & ~1;
const uint32 height = (output_height + 1) & ~1;
const int32 delta_pitch_in_dwords = (output_pitch_in_bytes >> 2) - (width << 2);

if (m_block_buffer.size() < width << 1)
Expand Down