Lines Matching refs:deUint8
284 inline deUint64 get64BitBlock (const deUint8* src, int blockNdx) in get64BitBlock()
296 inline deUint64 get128BitBlockStart (const deUint8* src, int blockNdx) in get128BitBlockStart()
302 inline deUint64 get128BitBlockEnd (const deUint8* src, int blockNdx) in get128BitBlockEnd()
322 inline deUint8 extend4To8 (deUint8 src) in extend4To8()
325 return (deUint8)((src << 4) | src); in extend4To8()
328 inline deUint8 extend5To8 (deUint8 src) in extend5To8()
331 return (deUint8)((src << 3) | (src >> 2)); in extend5To8()
334 inline deUint8 extend6To8 (deUint8 src) in extend6To8()
337 return (deUint8)((src << 2) | (src >> 4)); in extend6To8()
340 inline deUint8 extend7To8 (deUint8 src) in extend7To8()
343 return (deUint8)((src << 1) | (src >> 6)); in extend7To8()
346 inline deInt8 extendSigned3To8 (deUint8 src) in extendSigned3To8()
352 inline deUint8 extend5Delta3To8 (deUint8 base5, deUint8 delta3) in extend5Delta3To8()
354 const deUint8 t = (deUint8)((deInt8)base5 + extendSigned3To8(delta3)); in extend5Delta3To8()
372 void decompressETC1Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8], deUint64 src) in decompressETC1Block()
377 deUint8 baseR[2]; in decompressETC1Block()
378 deUint8 baseG[2]; in decompressETC1Block()
379 deUint8 baseB[2]; in decompressETC1Block()
384 baseR[0] = extend4To8((deUint8)getBits(src, 60, 63)); in decompressETC1Block()
385 baseR[1] = extend4To8((deUint8)getBits(src, 56, 59)); in decompressETC1Block()
386 baseG[0] = extend4To8((deUint8)getBits(src, 52, 55)); in decompressETC1Block()
387 baseG[1] = extend4To8((deUint8)getBits(src, 48, 51)); in decompressETC1Block()
388 baseB[0] = extend4To8((deUint8)getBits(src, 44, 47)); in decompressETC1Block()
389 baseB[1] = extend4To8((deUint8)getBits(src, 40, 43)); in decompressETC1Block()
394 deUint8 bR = (deUint8)getBits(src, 59, 63); // 5b in decompressETC1Block()
395 deUint8 dR = (deUint8)getBits(src, 56, 58); // 3b in decompressETC1Block()
396 deUint8 bG = (deUint8)getBits(src, 51, 55); in decompressETC1Block()
397 deUint8 dG = (deUint8)getBits(src, 48, 50); in decompressETC1Block()
398 deUint8 bB = (deUint8)getBits(src, 43, 47); in decompressETC1Block()
399 deUint8 dB = (deUint8)getBits(src, 40, 42); in decompressETC1Block()
434 dst[dstOffset+0] = (deUint8)deClamp32((int)baseR[subBlock] + modifier, 0, 255); in decompressETC1Block()
435 dst[dstOffset+1] = (deUint8)deClamp32((int)baseG[subBlock] + modifier, 0, 255); in decompressETC1Block()
436 dst[dstOffset+2] = (deUint8)deClamp32((int)baseB[subBlock] + modifier, 0, 255); in decompressETC1Block()
441 void decompressETC2Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8], deUint64 src, deUint8 alp… in decompressETC2Block()
458 const deInt8 selDR = extendSigned3To8((deUint8)getBits(src, 56, 58)); // 3 bits. in decompressETC2Block()
459 const deInt8 selDG = extendSigned3To8((deUint8)getBits(src, 48, 50)); in decompressETC2Block()
460 const deInt8 selDB = extendSigned3To8((deUint8)getBits(src, 40, 42)); in decompressETC2Block()
492 deUint8 baseR[2]; in decompressETC2Block()
493 deUint8 baseG[2]; in decompressETC2Block()
494 deUint8 baseB[2]; in decompressETC2Block()
499 baseR[0] = extend4To8((deUint8)getBits(src, 60, 63)); in decompressETC2Block()
500 baseR[1] = extend4To8((deUint8)getBits(src, 56, 59)); in decompressETC2Block()
501 baseG[0] = extend4To8((deUint8)getBits(src, 52, 55)); in decompressETC2Block()
502 baseG[1] = extend4To8((deUint8)getBits(src, 48, 51)); in decompressETC2Block()
503 baseB[0] = extend4To8((deUint8)getBits(src, 44, 47)); in decompressETC2Block()
504 baseB[1] = extend4To8((deUint8)getBits(src, 40, 43)); in decompressETC2Block()
513 baseR[1] = extend5To8((deUint8)(selBR + selDR)); in decompressETC2Block()
514 baseG[1] = extend5To8((deUint8)(selBG + selDG)); in decompressETC2Block()
515 baseB[1] = extend5To8((deUint8)(selBB + selDB)); in decompressETC2Block()
547 dst[dstOffset+0] = (deUint8)deClamp32((int)baseR[subBlock] + modifier, 0, 255); in decompressETC2Block()
548 dst[dstOffset+1] = (deUint8)deClamp32((int)baseG[subBlock] + modifier, 0, 255); in decompressETC2Block()
549 dst[dstOffset+2] = (deUint8)deClamp32((int)baseB[subBlock] + modifier, 0, 255); in decompressETC2Block()
561 deUint8 paintR[4]; in decompressETC2Block()
562 deUint8 paintG[4]; in decompressETC2Block()
563 deUint8 paintB[4]; in decompressETC2Block()
568 const deUint8 R1a = (deUint8)getBits(src, 59, 60); in decompressETC2Block()
569 const deUint8 R1b = (deUint8)getBits(src, 56, 57); in decompressETC2Block()
570 const deUint8 G1 = (deUint8)getBits(src, 52, 55); in decompressETC2Block()
571 const deUint8 B1 = (deUint8)getBits(src, 48, 51); in decompressETC2Block()
572 const deUint8 R2 = (deUint8)getBits(src, 44, 47); in decompressETC2Block()
573 const deUint8 G2 = (deUint8)getBits(src, 40, 43); in decompressETC2Block()
574 const deUint8 B2 = (deUint8)getBits(src, 36, 39); in decompressETC2Block()
578 paintR[0] = extend4To8((deUint8)((R1a << 2) | R1b)); in decompressETC2Block()
584 paintR[1] = (deUint8)deClamp32((int)paintR[2] + dist, 0, 255); in decompressETC2Block()
585 paintG[1] = (deUint8)deClamp32((int)paintG[2] + dist, 0, 255); in decompressETC2Block()
586 paintB[1] = (deUint8)deClamp32((int)paintB[2] + dist, 0, 255); in decompressETC2Block()
587 paintR[3] = (deUint8)deClamp32((int)paintR[2] - dist, 0, 255); in decompressETC2Block()
588 paintG[3] = (deUint8)deClamp32((int)paintG[2] - dist, 0, 255); in decompressETC2Block()
589 paintB[3] = (deUint8)deClamp32((int)paintB[2] - dist, 0, 255); in decompressETC2Block()
594 const deUint8 R1 = (deUint8)getBits(src, 59, 62); in decompressETC2Block()
595 const deUint8 G1a = (deUint8)getBits(src, 56, 58); in decompressETC2Block()
596 const deUint8 G1b = (deUint8)getBit(src, 52); in decompressETC2Block()
597 const deUint8 B1a = (deUint8)getBit(src, 51); in decompressETC2Block()
598 const deUint8 B1b = (deUint8)getBits(src, 47, 49); in decompressETC2Block()
599 const deUint8 R2 = (deUint8)getBits(src, 43, 46); in decompressETC2Block()
600 const deUint8 G2 = (deUint8)getBits(src, 39, 42); in decompressETC2Block()
601 const deUint8 B2 = (deUint8)getBits(src, 35, 38); in decompressETC2Block()
602 deUint8 baseR[2]; in decompressETC2Block()
603 deUint8 baseG[2]; in decompressETC2Block()
604 deUint8 baseB[2]; in decompressETC2Block()
610 baseG[0] = extend4To8((deUint8)((G1a << 1) | G1b)); in decompressETC2Block()
611 baseB[0] = extend4To8((deUint8)((B1a << 3) | B1b)); in decompressETC2Block()
620 paintR[0] = (deUint8)deClamp32((int)baseR[0] + dist, 0, 255); in decompressETC2Block()
621 paintG[0] = (deUint8)deClamp32((int)baseG[0] + dist, 0, 255); in decompressETC2Block()
622 paintB[0] = (deUint8)deClamp32((int)baseB[0] + dist, 0, 255); in decompressETC2Block()
623 paintR[1] = (deUint8)deClamp32((int)baseR[0] - dist, 0, 255); in decompressETC2Block()
624 paintG[1] = (deUint8)deClamp32((int)baseG[0] - dist, 0, 255); in decompressETC2Block()
625 paintB[1] = (deUint8)deClamp32((int)baseB[0] - dist, 0, 255); in decompressETC2Block()
626 paintR[2] = (deUint8)deClamp32((int)baseR[1] + dist, 0, 255); in decompressETC2Block()
627 paintG[2] = (deUint8)deClamp32((int)baseG[1] + dist, 0, 255); in decompressETC2Block()
628 paintB[2] = (deUint8)deClamp32((int)baseB[1] + dist, 0, 255); in decompressETC2Block()
629 paintR[3] = (deUint8)deClamp32((int)baseR[1] - dist, 0, 255); in decompressETC2Block()
630 paintG[3] = (deUint8)deClamp32((int)baseG[1] - dist, 0, 255); in decompressETC2Block()
631 paintB[3] = (deUint8)deClamp32((int)baseB[1] - dist, 0, 255); in decompressETC2Block()
652 dst[dstOffset+0] = (deUint8)deClamp32((int)paintR[paintNdx], 0, 255); in decompressETC2Block()
653 dst[dstOffset+1] = (deUint8)deClamp32((int)paintG[paintNdx], 0, 255); in decompressETC2Block()
654 dst[dstOffset+2] = (deUint8)deClamp32((int)paintB[paintNdx], 0, 255); in decompressETC2Block()
664 const deUint8 GO1 = (deUint8)getBit(src, 56); in decompressETC2Block()
665 const deUint8 GO2 = (deUint8)getBits(src, 49, 54); in decompressETC2Block()
666 const deUint8 BO1 = (deUint8)getBit(src, 48); in decompressETC2Block()
667 const deUint8 BO2 = (deUint8)getBits(src, 43, 44); in decompressETC2Block()
668 const deUint8 BO3 = (deUint8)getBits(src, 39, 41); in decompressETC2Block()
669 const deUint8 RH1 = (deUint8)getBits(src, 34, 38); in decompressETC2Block()
670 const deUint8 RH2 = (deUint8)getBit(src, 32); in decompressETC2Block()
671 const deUint8 RO = extend6To8((deUint8)getBits(src, 57, 62)); in decompressETC2Block()
672 const deUint8 GO = extend7To8((deUint8)((GO1 << 6) | GO2)); in decompressETC2Block()
673 const deUint8 BO = extend6To8((deUint8)((BO1 << 5) | (BO2 << 3) | BO3)); in decompressETC2Block()
674 const deUint8 RH = extend6To8((deUint8)((RH1 << 1) | RH2)); in decompressETC2Block()
675 const deUint8 GH = extend7To8((deUint8)getBits(src, 25, 31)); in decompressETC2Block()
676 const deUint8 BH = extend6To8((deUint8)getBits(src, 19, 24)); in decompressETC2Block()
677 const deUint8 RV = extend6To8((deUint8)getBits(src, 13, 18)); in decompressETC2Block()
678 const deUint8 GV = extend7To8((deUint8)getBits(src, 6, 12)); in decompressETC2Block()
679 const deUint8 BV = extend6To8((deUint8)getBits(src, 0, 5)); in decompressETC2Block()
692 dst[dstOffset+0] = (deUint8)deClamp32(unclampedR, 0, 255); in decompressETC2Block()
693 dst[dstOffset+1] = (deUint8)deClamp32(unclampedG, 0, 255); in decompressETC2Block()
694 dst[dstOffset+2] = (deUint8)deClamp32(unclampedB, 0, 255); in decompressETC2Block()
703 void decompressEAC8Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_A8], deUint64 src) in decompressEAC8Block()
725 const deUint8 baseCodeword = (deUint8)getBits(src, 56, 63); in decompressEAC8Block()
726 const deUint8 multiplier = (deUint8)getBits(src, 52, 55); in decompressEAC8Block()
738 dst[dstOffset] = (deUint8)deClamp32((int)baseCodeword + (int)multiplier*modifier, 0, 255); in decompressEAC8Block()
742 void decompressEAC11Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11], deUint64 src, bool signed… in decompressEAC11Block()
812 void decompressETC1 (const PixelBufferAccess& dst, const deUint8* src) in decompressETC1()
816 deUint8* const dstPtr = (deUint8*)dst.getDataPtr(); in decompressETC1()
822 void decompressETC2 (const PixelBufferAccess& dst, const deUint8* src) in decompressETC2()
826 deUint8* const dstPtr = (deUint8*)dst.getDataPtr(); in decompressETC2()
832 void decompressETC2_EAC_RGBA8 (const PixelBufferAccess& dst, const deUint8* src) in decompressETC2_EAC_RGBA8()
836 deUint8* const dstPtr = (deUint8*)dst.getDataPtr(); in decompressETC2_EAC_RGBA8()
842 deUint8 uncompressedBlockAlpha[ETC2_UNCOMPRESSED_BLOCK_SIZE_A8]; in decompressETC2_EAC_RGBA8()
843 deUint8 uncompressedBlockRGB[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8]; in decompressETC2_EAC_RGBA8()
854 …const deUint8* const srcPixelRGB = &uncompressedBlockRGB[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESS… in decompressETC2_EAC_RGBA8()
855 …const deUint8* const srcPixelAlpha = &uncompressedBlockAlpha[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPR… in decompressETC2_EAC_RGBA8()
856 deUint8* const dstPixel = dstPtr + y*dstRowPitch + x*dstPixelSize; in decompressETC2_EAC_RGBA8()
867 void decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1 (const PixelBufferAccess& dst, const deUint8* src) in decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1()
871 deUint8* const dstPtr = (deUint8*)dst.getDataPtr(); in decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1()
876 deUint8 uncompressedBlockRGB[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8]; in decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1()
877 deUint8 uncompressedBlockAlpha[ETC2_UNCOMPRESSED_BLOCK_SIZE_A8]; in decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1()
887 …const deUint8* const srcPixel = &uncompressedBlockRGB[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESSED_… in decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1()
888 …const deUint8* const srcPixelAlpha = &uncompressedBlockAlpha[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPR… in decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1()
889 deUint8* const dstPixel = dstPtr + y*dstRowPitch + x*dstPixelSize; in decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1()
900 void decompressEAC_R11 (const PixelBufferAccess& dst, const deUint8* src, bool signedMode) in decompressEAC_R11()
904 deUint8* const dstPtr = (deUint8*)dst.getDataPtr(); in decompressEAC_R11()
909 deUint8 uncompressedBlock[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11]; in decompressEAC_R11()
939 void decompressEAC_RG11 (const PixelBufferAccess& dst, const deUint8* src, bool signedMode) in decompressEAC_RG11()
943 deUint8* const dstPtr = (deUint8*)dst.getDataPtr(); in decompressEAC_RG11()
949 deUint8 uncompressedBlockR[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11]; in decompressEAC_RG11()
950 deUint8 uncompressedBlockG[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11]; in decompressEAC_RG11()
985 void decompressBlock (CompressedTexFormat format, const PixelBufferAccess& dst, const deUint8* src,… in decompressBlock()
1048 void decompress (const PixelBufferAccess& dst, CompressedTexFormat fmt, const deUint8* src, const T… in decompress()
1057 …std::vector<deUint8> uncompressedBlock (dst.getFormat().getPixelSize() * blockPixelSize.x() * bloc… in decompress()
1067 const deUint8* const blockPtr = src + componentSum(blockPos * blockPitches); in decompress()