• Home
  • Raw
  • Download

Lines Matching refs:etc1_uint32

168         etc1_uint32 low, bool second, bool flipped) {  in decode_subblock()
201 etc1_uint32 high = (pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3]; in etc1_decode_block()
202 etc1_uint32 low = (pIn[4] << 24) | (pIn[5] << 16) | (pIn[6] << 8) | pIn[7]; in etc1_decode_block()
234 etc1_uint32 high;
235 etc1_uint32 low;
236 etc1_uint32 score; // Lower is more accurate
247 void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask, in etc_average_colors_subblock()
298 static etc1_uint32 chooseModifier(const etc1_byte* pBaseColors, in chooseModifier()
299 const etc1_byte* pIn, etc1_uint32 *pLow, int bitIndex, in chooseModifier()
301 etc1_uint32 bestScore = ~0; in chooseModifier()
312 etc1_uint32 score = (etc1_uint32) (6 * square(decodedG - pixelG)); in chooseModifier()
317 score += (etc1_uint32) (3 * square(decodedR - pixelR)); in chooseModifier()
322 score += (etc1_uint32) square(decodedB - pixelB); in chooseModifier()
328 etc1_uint32 lowMask = (((bestIndex >> 1) << 16) | (bestIndex & 1)) in chooseModifier()
335 void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_subblock_helper()
433 void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_block_helper()
472 static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) { in writeBigEndian()
484 void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask, in etc1_encode_block()
503 etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height) { in etc1_get_encoded_data_size()
512 int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height, in etc1_encode_image()
513 etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) { in etc1_encode_image()
523 etc1_uint32 encodedWidth = (width + 3) & ~3; in etc1_encode_image()
524 etc1_uint32 encodedHeight = (height + 3) & ~3; in etc1_encode_image()
526 for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { in etc1_encode_image()
527 etc1_uint32 yEnd = height - y; in etc1_encode_image()
532 for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { in etc1_encode_image()
533 etc1_uint32 xEnd = width - x; in etc1_encode_image()
538 for (etc1_uint32 cy = 0; cy < yEnd; cy++) { in etc1_encode_image()
544 for (etc1_uint32 cx = 0; cx < xEnd; cx++) { in etc1_encode_image()
569 etc1_uint32 width, etc1_uint32 height, in etc1_decode_image()
570 etc1_uint32 pixelSize, etc1_uint32 stride) { in etc1_decode_image()
576 etc1_uint32 encodedWidth = (width + 3) & ~3; in etc1_decode_image()
577 etc1_uint32 encodedHeight = (height + 3) & ~3; in etc1_decode_image()
579 for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { in etc1_decode_image()
580 etc1_uint32 yEnd = height - y; in etc1_decode_image()
584 for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { in etc1_decode_image()
585 etc1_uint32 xEnd = width - x; in etc1_decode_image()
591 for (etc1_uint32 cy = 0; cy < yEnd; cy++) { in etc1_decode_image()
597 for (etc1_uint32 cx = 0; cx < xEnd; cx++) { in etc1_decode_image()
601 etc1_uint32 pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); in etc1_decode_image()
614 static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
615 static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
616 static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10;
617 static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
618 static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
620 static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0;
622 static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) { in writeBEUint16()
627 static etc1_uint32 readBEUint16(const etc1_byte* pIn) { in readBEUint16()
633 void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) { in etc1_pkm_format_header()
635 etc1_uint32 encodedWidth = (width + 3) & ~3; in etc1_pkm_format_header()
636 etc1_uint32 encodedHeight = (height + 3) & ~3; in etc1_pkm_format_header()
650 etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET); in etc1_pkm_is_valid()
651 etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET); in etc1_pkm_is_valid()
652 etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET); in etc1_pkm_is_valid()
653 etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET); in etc1_pkm_is_valid()
654 etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET); in etc1_pkm_is_valid()
662 etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) { in etc1_pkm_get_width()
668 etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){ in etc1_pkm_get_height()