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()
429 void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask, in etc_encode_block_helper()
430 const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) { in etc_encode_block_helper()
435 etc1_byte pBaseColors[6]; in etc_encode_block_helper()
468 static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) { in writeBigEndian()
469 pOut[0] = (etc1_byte)(d >> 24); in writeBigEndian()
470 pOut[1] = (etc1_byte)(d >> 16); in writeBigEndian()
471 pOut[2] = (etc1_byte)(d >> 8); in writeBigEndian()
472 pOut[3] = (etc1_byte) d; in writeBigEndian()
480 void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask, in etc1_encode_block()
481 etc1_byte* pOut) { in etc1_encode_block()
482 etc1_byte colors[6]; in etc1_encode_block()
483 etc1_byte flippedColors[6]; in etc1_encode_block()
508 int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height, in etc1_encode_image()
509 etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) { in etc1_encode_image()
516 etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; in etc1_encode_image()
517 etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE]; in etc1_encode_image()
535 etc1_byte* q = block + (cy * 4) * 3; in etc1_encode_image()
536 const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy); in etc1_encode_image()
564 int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut, in etc1_decode_image()
570 etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; in etc1_decode_image()
588 const etc1_byte* q = block + (cy * 4) * 3; in etc1_decode_image()
589 etc1_byte* p = pOut + pixelSize * x + stride * (y + cy); in etc1_decode_image()
594 etc1_byte r = *q++; in etc1_decode_image()
595 etc1_byte g = *q++; in etc1_decode_image()
596 etc1_byte b = *q++; in etc1_decode_image()
598 *p++ = (etc1_byte) pixel; in etc1_decode_image()
599 *p++ = (etc1_byte) (pixel >> 8); in etc1_decode_image()
618 static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) { in writeBEUint16()
619 pOut[0] = (etc1_byte) (data >> 8); in writeBEUint16()
620 pOut[1] = (etc1_byte) data; in writeBEUint16()
623 static etc1_uint32 readBEUint16(const etc1_byte* pIn) { in readBEUint16()
629 void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) { in etc1_pkm_format_header()
642 etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) { in etc1_pkm_is_valid()
658 etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) { in etc1_pkm_get_width()
664 etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){ in etc1_pkm_get_height()