Home | History | Annotate | Download | only in etc1

Lines Matching refs:etc1_byte

130 static inline etc1_byte clamp(int x) {
131 return (etc1_byte) (x >= 0 ? (x < 255 ? x : 255) : 0);
175 void decode_subblock(etc1_byte* pOut, int r, int g, int b, const int* table,
198 etc1_byte* q = pOut + 3 * (x + 4 * y);
208 void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut) {
255 void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask,
256 etc1_byte* pColors, bool flipped, bool second) {
271 const etc1_byte* p = pIn + i * 3;
288 const etc1_byte* p = pIn + i * 3;
296 pColors[0] = (etc1_byte)((r + 4) >> 3);
297 pColors[1] = (etc1_byte)((g + 4) >> 3);
298 pColors[2] = (etc1_byte)((b + 4) >> 3);
306 static etc1_uint32 chooseModifier(const etc1_byte* pBaseColors,
307 const etc1_byte* pIn, etc1_uint32 *pLow, int bitIndex,
343 void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask,
345 const etc1_byte* pBaseColors, const int* pModifierTable) {
385 static void etc_encodeBaseColors(etc1_byte* pBaseColors,
386 const etc1_byte* pColors, etc_compressed* pCompressed) {
441 void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask,
442 const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) {
447 etc1_byte pBaseColors[6];
480 static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) {
481 pOut[0] = (etc1_byte)(d >> 24);
482 pOut[1] = (etc1_byte)(d >> 16);
483 pOut[2] = (etc1_byte)(d >> 8);
484 pOut[3] = (etc1_byte) d;
492 void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask,
493 etc1_byte* pOut) {
494 etc1_byte colors[6];
495 etc1_byte flippedColors[6];
520 int etc1_encode_image(const etc1_byte
521 etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) {
528 etc1_byte block[ETC1_DECODED_BLOCK_SIZE];
529 etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE];
547 etc1_byte* q = block + (cy * 4) * 3;
548 const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy);
576 int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut,
582 etc1_byte block[ETC1_DECODED_BLOCK_SIZE];
600 const etc1_byte* q = block + (cy * 4) * 3;
601 etc1_byte* p = pOut + pixelSize * x + stride * (y + cy);
606 etc1_byte r = *q++;
607 etc1_byte g = *q++;
608 etc1_byte b = *q++;
610 *p++ = (etc1_byte) pixel;
611 *p++ = (etc1_byte) (pixel >> 8);
630 static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) {
631 pOut[0] = (etc1_byte) (data >> 8);
632 pOut[1] = (etc1_byte) data;
635 static etc1_uint32 readBEUint16(const etc1_byte* pIn) {
641 void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) {
654 etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) {
670 etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) {
676 etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){