• Home
  • Raw
  • Download

Lines Matching refs:etc1_uint32

176         etc1_uint32 low, bool second, bool flipped) {  in decode_subblock()
209 etc1_uint32 high = (pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3]; in etc1_decode_block()
210 etc1_uint32 low = (pIn[4] << 24) | (pIn[5] << 16) | (pIn[6] << 8) | pIn[7]; in etc1_decode_block()
242 etc1_uint32 high;
243 etc1_uint32 low;
244 etc1_uint32 score; // Lower is more accurate
255 void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask, in etc_average_colors_subblock()
306 static etc1_uint32 chooseModifier(const etc1_byte* pBaseColors, in chooseModifier()
307 const etc1_byte* pIn, etc1_uint32 *pLow, int bitIndex, in chooseModifier()
309 etc1_uint32 bestScore = ~0; in chooseModifier()
320 etc1_uint32 score = (etc1_uint32) (6 * square(decodedG - pixelG)); in chooseModifier()
325 score += (etc1_uint32) (3 * square(decodedR - pixelR)); in chooseModifier()
330 score += (etc1_uint32) square(decodedB - pixelB); in chooseModifier()
336 etc1_uint32 lowMask = (((bestIndex >> 1) << 16) | (bestIndex & 1)) in chooseModifier()
343 void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_subblock_helper()
441 void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_block_helper()
480 static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) { in writeBigEndian()
492 void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask, in etc1_encode_block()
511 etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height) { in etc1_get_encoded_data_size()
520 int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height, in etc1_encode_image()
521 etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) { in etc1_encode_image()
531 etc1_uint32 encodedWidth = (width + 3) & ~3; in etc1_encode_image()
532 etc1_uint32 encodedHeight = (height + 3) & ~3; in etc1_encode_image()
534 for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { in etc1_encode_image()
535 etc1_uint32 yEnd = height - y; in etc1_encode_image()
540 for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { in etc1_encode_image()
541 etc1_uint32 xEnd = width - x; in etc1_encode_image()
546 for (etc1_uint32 cy = 0; cy < yEnd; cy++) { in etc1_encode_image()
552 for (etc1_uint32 cx = 0; cx < xEnd; cx++) { in etc1_encode_image()
577 etc1_uint32 width, etc1_uint32 height, in etc1_decode_image()
578 etc1_uint32 pixelSize, etc1_uint32 stride) { in etc1_decode_image()
584 etc1_uint32 encodedWidth = (width + 3) & ~3; in etc1_decode_image()
585 etc1_uint32 encodedHeight = (height + 3) & ~3; in etc1_decode_image()
587 for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { in etc1_decode_image()
588 etc1_uint32 yEnd = height - y; in etc1_decode_image()
592 for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { in etc1_decode_image()
593 etc1_uint32 xEnd = width - x; in etc1_decode_image()
599 for (etc1_uint32 cy = 0; cy < yEnd; cy++) { in etc1_decode_image()
605 for (etc1_uint32 cx = 0; cx < xEnd; cx++) { in etc1_decode_image()
609 etc1_uint32 pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); in etc1_decode_image()
622 static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
623 static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
624 static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10;
625 static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
626 static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
628 static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0;
630 static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) { in writeBEUint16()
635 static etc1_uint32 readBEUint16(const etc1_byte* pIn) { in readBEUint16()
641 void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) { in etc1_pkm_format_header()
643 etc1_uint32 encodedWidth = (width + 3) & ~3; in etc1_pkm_format_header()
644 etc1_uint32 encodedHeight = (height + 3) & ~3; in etc1_pkm_format_header()
658 etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET); in etc1_pkm_is_valid()
659 etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET); in etc1_pkm_is_valid()
660 etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET); in etc1_pkm_is_valid()
661 etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET); in etc1_pkm_is_valid()
662 etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET); in etc1_pkm_is_valid()
670 etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) { in etc1_pkm_get_width()
676 etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){ in etc1_pkm_get_height()