Lines Matching refs:etc1_byte
130 static inline etc1_byte clamp(int x) { in clamp()
131 return (etc1_byte) (x >= 0 ? (x < 255 ? x : 255) : 0); in clamp()
175 void decode_subblock(etc1_byte* pOut, int r, int g, int b, const int* table, in decode_subblock()
198 etc1_byte* q = pOut + 3 * (x + 4 * y); in decode_subblock()
208 void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut) { in etc1_decode_block()
255 void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask, in etc_average_colors_subblock()
256 etc1_byte* pColors, bool flipped, bool second) { in etc_average_colors_subblock()
271 const etc1_byte* p = pIn + i * 3; in etc_average_colors_subblock()
288 const etc1_byte* p = pIn + i * 3; in etc_average_colors_subblock()
296 pColors[0] = (etc1_byte)((r + 4) >> 3); in etc_average_colors_subblock()
297 pColors[1] = (etc1_byte)((g + 4) >> 3); in etc_average_colors_subblock()
298 pColors[2] = (etc1_byte)((b + 4) >> 3); 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()
343 void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_subblock_helper()
345 const etc1_byte* pBaseColors, const int* pModifierTable) { in etc_encode_subblock_helper()
385 static void etc_encodeBaseColors(etc1_byte* pBaseColors, in etc_encodeBaseColors()
386 const etc1_byte* pColors, etc_compressed* pCompressed) { in etc_encodeBaseColors()
443 void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_block_helper()
444 const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) { in etc_encode_block_helper()
449 etc1_byte pBaseColors[6]; in etc_encode_block_helper()
482 static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) { in writeBigEndian()
483 pOut[0] = (etc1_byte)(d >> 24); in writeBigEndian()
484 pOut[1] = (etc1_byte)(d >> 16); in writeBigEndian()
485 pOut[2] = (etc1_byte)(d >> 8); in writeBigEndian()
486 pOut[3] = (etc1_byte) d; in writeBigEndian()
494 void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask, in etc1_encode_block()
495 etc1_byte* pOut) { in etc1_encode_block()
496 etc1_byte colors[6]; in etc1_encode_block()
497 etc1_byte flippedColors[6]; in etc1_encode_block()
522 int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height, in etc1_encode_image()
523 etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) { in etc1_encode_image()
530 etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; in etc1_encode_image()
531 etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE]; in etc1_encode_image()
549 etc1_byte* q = block + (cy * 4) * 3; in etc1_encode_image()
550 const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy); in etc1_encode_image()
578 int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut, in etc1_decode_image()
584 etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; in etc1_decode_image()
602 const etc1_byte* q = block + (cy * 4) * 3; in etc1_decode_image()
603 etc1_byte* p = pOut + pixelSize * x + stride * (y + cy); in etc1_decode_image()
608 etc1_byte r = *q++; in etc1_decode_image()
609 etc1_byte g = *q++; in etc1_decode_image()
610 etc1_byte b = *q++; in etc1_decode_image()
612 *p++ = (etc1_byte) pixel; in etc1_decode_image()
613 *p++ = (etc1_byte) (pixel >> 8); in etc1_decode_image()
632 static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) { in writeBEUint16()
633 pOut[0] = (etc1_byte) (data >> 8); in writeBEUint16()
634 pOut[1] = (etc1_byte) data; in writeBEUint16()
637 static etc1_uint32 readBEUint16(const etc1_byte* pIn) { in readBEUint16()
643 void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) { in etc1_pkm_format_header()
656 etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) { in etc1_pkm_is_valid()
672 etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) { in etc1_pkm_get_width()
678 etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){ in etc1_pkm_get_height()