Lines Matching refs:etc1_byte
122 static inline etc1_byte clamp(int x) { in clamp()
123 return (etc1_byte) (x >= 0 ? (x < 255 ? x : 255) : 0); in clamp()
167 void decode_subblock(etc1_byte* pOut, int r, int g, int b, const int* table, in decode_subblock()
190 etc1_byte* q = pOut + 3 * (x + 4 * y); in decode_subblock()
200 void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut) { in etc1_decode_block()
247 void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask, in etc_average_colors_subblock()
248 etc1_byte* pColors, bool flipped, bool second) { in etc_average_colors_subblock()
263 const etc1_byte* p = pIn + i * 3; in etc_average_colors_subblock()
280 const etc1_byte* p = pIn + i * 3; in etc_average_colors_subblock()
288 pColors[0] = (etc1_byte)((r + 4) >> 3); in etc_average_colors_subblock()
289 pColors[1] = (etc1_byte)((g + 4) >> 3); in etc_average_colors_subblock()
290 pColors[2] = (etc1_byte)((b + 4) >> 3); 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()
335 void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_subblock_helper()
337 const etc1_byte* pBaseColors, const int* pModifierTable) { in etc_encode_subblock_helper()
377 static void etc_encodeBaseColors(etc1_byte* pBaseColors, in etc_encodeBaseColors()
378 const etc1_byte* pColors, etc_compressed* pCompressed) { in etc_encodeBaseColors()
433 void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_block_helper()
434 const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) { in etc_encode_block_helper()
439 etc1_byte pBaseColors[6]; in etc_encode_block_helper()
472 static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) { in writeBigEndian()
473 pOut[0] = (etc1_byte)(d >> 24); in writeBigEndian()
474 pOut[1] = (etc1_byte)(d >> 16); in writeBigEndian()
475 pOut[2] = (etc1_byte)(d >> 8); in writeBigEndian()
476 pOut[3] = (etc1_byte) d; in writeBigEndian()
484 void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask, in etc1_encode_block()
485 etc1_byte* pOut) { in etc1_encode_block()
486 etc1_byte colors[6]; in etc1_encode_block()
487 etc1_byte flippedColors[6]; in etc1_encode_block()
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()
520 etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; in etc1_encode_image()
521 etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE]; in etc1_encode_image()
539 etc1_byte* q = block + (cy * 4) * 3; in etc1_encode_image()
540 const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy); in etc1_encode_image()
568 int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut, in etc1_decode_image()
574 etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; in etc1_decode_image()
592 const etc1_byte* q = block + (cy * 4) * 3; in etc1_decode_image()
593 etc1_byte* p = pOut + pixelSize * x + stride * (y + cy); in etc1_decode_image()
598 etc1_byte r = *q++; in etc1_decode_image()
599 etc1_byte g = *q++; in etc1_decode_image()
600 etc1_byte b = *q++; in etc1_decode_image()
602 *p++ = (etc1_byte) pixel; in etc1_decode_image()
603 *p++ = (etc1_byte) (pixel >> 8); in etc1_decode_image()
622 static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) { in writeBEUint16()
623 pOut[0] = (etc1_byte) (data >> 8); in writeBEUint16()
624 pOut[1] = (etc1_byte) 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()
646 etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) { 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()