Lines Matching refs:etc1_byte

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