Home | History | Annotate | Download | only in common

Lines Matching refs:deUint8

320 static inline deUint64 get64BitBlock (const deUint8* src, int blockNdx)
330 static inline deUint64 get128BitBlockStart (const deUint8* src, int blockNdx)
336 static inline deUint64 get128BitBlockEnd (const deUint8* src, int blockNdx)
353 static inline deUint8 extend4To8 (deUint8 src)
359 static inline deUint8 extend5To8 (deUint8 src)
365 static inline deUint8 extend6To8 (deUint8 src)
371 static inline deUint8 extend7To8 (deUint8 src)
377 static inline deInt8 extendSigned3To8 (deUint8 src)
383 static inline deUint8 extend5Delta3To8 (deUint8 base5, deUint8 delta3)
385 const deUint8 t = (deUint8)((deInt8)base5 + extendSigned3To8(delta3));
403 static void decompressETC1Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8], deUint64 src)
408 deUint8 baseR[2];
409 deUint8 baseG[2];
410 deUint8 baseB[2];
415 baseR[0] = extend4To8((deUint8)getBits(src, 60, 63));
416 baseR[1] = extend4To8((deUint8)getBits(src, 56, 59));
417 baseG[0] = extend4To8((deUint8)getBits(src, 52, 55));
418 baseG[1] = extend4To8((deUint8)getBits(src, 48, 51));
419 baseB[0] = extend4To8((deUint8)getBits(src, 44, 47));
420 baseB[1] = extend4To8((deUint8)getBits(src, 40, 43));
425 deUint8 bR = (deUint8)getBits(src, 59, 63); // 5b
426 deUint8 dR = (deUint8)getBits(src, 56, 58); // 3b
427 deUint8 bG = (deUint8)getBits(src, 51, 55);
428 deUint8 dG = (deUint8)getBits(src, 48, 50);
429 deUint8 bB = (deUint8)getBits(src, 43, 47);
430 deUint8 dB = (deUint8)getBits(src, 40, 42);
465 dst[dstOffset+0] = (deUint8)deClamp32((int)baseR[subBlock] + modifier, 0, 255);
466 dst[dstOffset+1] = (deUint8)deClamp32((int)baseG[subBlock] + modifier, 0, 255);
467 dst[dstOffset+2] = (deUint8)deClamp32((int)baseB[subBlock] + modifier, 0, 255);
472 static void decompressETC2Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8], deUint64 src, deUint8 alphaDst[ETC2_UNCOMPRESSED_BLOCK_SIZE_A8], bool alphaMode)
489 const deInt8 selDR = extendSigned3To8((deUint8)getBits(src, 56, 58)); // 3 bits.
490 const deInt8 selDG = extendSigned3To8((deUint8)getBits(src, 48, 50));
491 const deInt8 selDB = extendSigned3To8((deUint8)getBits(src, 40, 42));
523 deUint8 baseR[2];
524 deUint8 baseG[2];
525 deUint8 baseB[2];
530 baseR[0] = extend4To8((deUint8)getBits(src, 60, 63));
531 baseR[1] = extend4To8((deUint8)getBits(src, 56, 59));
532 baseG[0] = extend4To8((deUint8)getBits(src, 52, 55));
533 baseG[1] = extend4To8((deUint8)getBits(src, 48, 51));
534 baseB[0] = extend4To8((deUint8)getBits(src, 44, 47));
535 baseB[1] = extend4To8((deUint8)getBits(src, 40, 43));
544 baseR[1] = extend5To8((deUint8)(selBR + selDR));
545 baseG[1] = extend5To8((deUint8)(selBG + selDG));
546 baseB[1] = extend5To8((deUint8)(selBB + selDB));
578 dst[dstOffset+0] = (deUint8)deClamp32((int)baseR[subBlock] + modifier, 0, 255);
579 dst[dstOffset+1] = (deUint8)deClamp32((int)baseG[subBlock] + modifier, 0, 255);
580 dst[dstOffset+2] = (deUint8)deClamp32((int)baseB[subBlock] + modifier, 0, 255);
592 deUint8 paintR[4];
593 deUint8 paintG[4];
594 deUint8 paintB[4];
599 const deUint8 R1a = (deUint8)getBits(src, 59, 60);
600 const deUint8 R1b = (deUint8)getBits(src, 56, 57);
601 const deUint8 G1 = (deUint8)getBits(src, 52, 55);
602 const deUint8 B1 = (deUint8)getBits(src, 48, 51);
603 const deUint8 R2 = (deUint8)getBits(src, 44, 47);
604 const deUint8 G2 = (deUint8)getBits(src, 40, 43);
605 const deUint8 B2 = (deUint8)getBits(src, 36, 39);
615 paintR[1] = (deUint8)deClamp32((int)paintR[2] + dist, 0, 255);
616 paintG[1] = (deUint8)deClamp32((int)paintG[2] + dist, 0, 255);
617 paintB[1] = (deUint8)deClamp32((int)paintB[2] + dist, 0, 255);
618 paintR[3] = (deUint8)deClamp32((int)paintR[2] - dist, 0, 255);
619 paintG[3] = (deUint8)deClamp32((int)paintG[2] - dist, 0, 255);
620 paintB[3] = (deUint8)deClamp32((int)paintB[2] - dist, 0, 255);
625 const deUint8 R1 = (deUint8)getBits(src, 59, 62);
626 const deUint8 G1a = (deUint8)getBits(src, 56, 58);
627 const deUint8 G1b = (deUint8)getBit(src, 52);
628 const deUint8 B1a = (deUint8)getBit(src, 51);
629 const deUint8 B1b = (deUint8)getBits(src, 47, 49);
630 const deUint8 R2 = (deUint8)getBits(src, 43, 46);
631 const deUint8 G2 = (deUint8)getBits(src, 39, 42);
632 const deUint8 B2 = (deUint8)getBits(src, 35, 38);
633 deUint8 baseR[2];
634 deUint8 baseG[2];
635 deUint8 baseB[2];
651 paintR[0] = (deUint8)deClamp32((int)baseR[0] + dist, 0, 255);
652 paintG[0] = (deUint8)deClamp32((int)baseG[0] + dist, 0, 255);
653 paintB[0] = (deUint8)deClamp32((int)baseB[0] + dist, 0, 255);
654 paintR[1] = (deUint8)deClamp32((int)baseR[0] - dist, 0, 255);
655 paintG[1] = (deUint8)deClamp32((int)baseG[0] - dist, 0, 255);
656 paintB[1] = (deUint8)deClamp32((int)baseB[0] - dist, 0, 255);
657 paintR[2] = (deUint8)deClamp32((int)baseR[1] + dist, 0, 255);
658 paintG[2] = (deUint8)deClamp32((int)baseG[1] + dist, 0, 255);
659 paintB[2] = (deUint8)deClamp32((int)baseB[1] + dist, 0, 255);
660 paintR[3] = (deUint8)deClamp32((int)baseR[1] - dist, 0, 255);
661 paintG[3] = (deUint8)deClamp32((int)baseG[1] - dist, 0, 255);
662 paintB[3] = (deUint8)deClamp32((int)baseB[1] - dist, 0, 255);
683 dst[dstOffset+0] = (deUint8)deClamp32((int)paintR[paintNdx], 0, 255);
684 dst[dstOffset+1] = (deUint8)deClamp32((int)paintG[paintNdx], 0, 255);
685 dst[dstOffset+2] = (deUint8)deClamp32((int)paintB[paintNdx], 0, 255);
695 const deUint8 GO1 = (deUint8)getBit(src, 56);
696 const deUint8 GO2 = (deUint8)getBits(src, 49, 54);
697 const deUint8 BO1 = (deUint8)getBit(src, 48);
698 const deUint8 BO2 = (deUint8)getBits(src, 43, 44);
699 const deUint8 BO3 = (deUint8)getBits(src, 39, 41);
700 const deUint8 RH1 = (deUint8)getBits(src, 34, 38);
701 const deUint8 RH2 = (deUint8)getBit(src, 32);
702 const deUint8 RO = extend6To8((deUint8)getBits(src, 57, 62));
703 const deUint8 GO = extend7To8((GO1 << 6) | GO2);
704 const deUint8 BO = extend6To8((BO1 << 5) | (BO2 << 3) | BO3);
705 const deUint8 RH = extend6To8((RH1 << 1) | RH2);
706 const deUint8 GH = extend7To8((deUint8)getBits(src, 25, 31));
707 const deUint8 BH = extend6To8((deUint8)getBits(src, 19, 24));
708 const deUint8 RV = extend6To8((deUint8)getBits(src, 13, 18));
709 const deUint8 GV = extend7To8((deUint8)getBits(src, 6, 12));
710 const deUint8 BV = extend6To8((deUint8)getBits(src, 0, 5));
723 dst[dstOffset+0] = (deUint8)deClamp32(unclampedR, 0, 255);
724 dst[dstOffset+1] = (deUint8)deClamp32(unclampedG, 0, 255);
725 dst[dstOffset+2] = (deUint8)deClamp32(unclampedB, 0, 255);
734 static void decompressEAC8Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_A8], deUint64 src)
756 const deUint8 baseCodeword = (deUint8)getBits(src, 56, 63);
757 const deUint8 multiplier = (deUint8)getBits(src, 52, 55);
769 dst[dstOffset] = (deUint8)deClamp32((int)baseCodeword + (int)multiplier*modifier, 0, 255);
773 static void decompressEAC11Block (deUint8 dst[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11], deUint64 src, bool signedMode)
835 static void decompressETC1 (const tcu::PixelBufferAccess& dst, int width, int height, const deUint8* src)
844 deUint8* const dstPtr = (deUint8*)dst.getDataPtr();
853 deUint8 uncompressedBlock[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8];
865 const deUint8* const srcPixel = &uncompressedBlock[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESSED_PIXEL_SIZE_RGB8];
866 deUint8* const dstPixel = dstPtr + (baseY+y)*dstRowPitch + (baseX+x)*dstPixelSize;
878 static void decompressETC2 (const tcu::PixelBufferAccess& dst, int width, int height, const deUint8* src)
884 deUint8* const dstPtr = (deUint8*)dst.getDataPtr();
893 deUint8 uncompressedBlock[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8];
905 const deUint8* const srcPixel = &uncompressedBlock[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESSED_PIXEL_SIZE_RGB8];
906 deUint8
918 static void decompressETC2_EAC_RGBA8 (const tcu::PixelBufferAccess& dst, int width, int height, const deUint8* src)
924 deUint8* const dstPtr = (deUint8*)dst.getDataPtr();
934 deUint8 uncompressedBlockAlpha[ETC2_UNCOMPRESSED_BLOCK_SIZE_A8];
935 deUint8 uncompressedBlockRGB[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8];
948 const deUint8* const srcPixelRGB = &uncompressedBlockRGB[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESSED_PIXEL_SIZE_RGB8];
949 const deUint8* const srcPixelAlpha = &uncompressedBlockAlpha[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESSED_PIXEL_SIZE_A8];
950 deUint8* const dstPixel = dstPtr + (baseY+y)*dstRowPitch + (baseX+x)*dstPixelSize;
963 static void decompressETC2_RGB8_PUNCHTHROUGH_ALPHA1 (const tcu::PixelBufferAccess& dst, int width, int height, const deUint8* src)
969 deUint8* const dstPtr = (deUint8*)dst.getDataPtr();
978 deUint8 uncompressedBlockRGB[ETC2_UNCOMPRESSED_BLOCK_SIZE_RGB8];
979 deUint8 uncompressedBlockAlpha[ETC2_UNCOMPRESSED_BLOCK_SIZE_A8];
991 const deUint8* const srcPixel = &uncompressedBlockRGB[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESSED_PIXEL_SIZE_RGB8];
992 const deUint8* const srcPixelAlpha = &uncompressedBlockAlpha[(y*ETC2_BLOCK_WIDTH + x)*ETC2_UNCOMPRESSED_PIXEL_SIZE_A8];
993 deUint8* const dstPixel = dstPtr + (baseY+y)*dstRowPitch + (baseX+x)*dstPixelSize;
1006 static void decompressEAC_R11 (const tcu::PixelBufferAccess& dst, int width, int height, const deUint8* src, bool signedMode)
1012 deUint8* const dstPtr = (deUint8*)dst.getDataPtr();
1021 deUint8 uncompressedBlock[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11];
1055 static void decompressEAC_RG11 (const tcu::PixelBufferAccess& dst, int width, int height, const deUint8* src, bool signedMode)
1061 deUint8* const dstPtr = (deUint8*)dst.getDataPtr();
1071 deUint8 uncompressedBlockR[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11];
1072 deUint8 uncompressedBlockG[ETC2_UNCOMPRESSED_BLOCK_SIZE_R11];
1185 Block128 (const deUint8* src)
1470 deUint8* const dstU = (deUint8*)dst;
1519 deUint8* const dstU = (deUint8*)dst;
2377 deUint8 seed1 = rnum & 0xf;
2378 deUint8 seed2 = (rnum >> 4) & 0xf;
2379 deUint8 seed3 = (rnum >> 8) & 0xf;
2380 deUint8 seed4 = (rnum >> 12) & 0xf;
2381 deUint8 seed5 = (rnum >> 16) & 0xf;
2382 deUint8 seed6 = (rnum >> 20) & 0xf;
2383 deUint8 seed7 = (rnum >> 24) & 0xf;
2384 deUint8 seed8 = (rnum >> 28) & 0xf;
2385 deUint8 seed9 = (rnum >> 18) & 0xf;
2386 deUint8 seed10 = (rnum >> 22) & 0xf;
2387 deUint8 seed11 = (rnum >> 26) & 0xf;
2388 deUint8 seed12 = ((rnum >> 30) | (rnum << 2)) & 0xf;
2439 ((deUint8*)dst)[texelNdx*4 + 0] = 0xff;
2440 ((deUint8*)dst)[texelNdx*4 + 1] = 0;
2441 ((deUint8*)dst)[texelNdx*4 + 2] = 0xff;
2442 ((deUint8*)dst)[texelNdx*4 + 3] = 0xff;
2464 ((deUint8*)dst)[texelNdx*4 + channelNdx] = (c & 0xff00) >> 8;
2579 static void decompressASTC (const tcu::PixelBufferAccess& dst, int width, int height, const deUint8* data, int blockWidth, int blockHeight, bool isSRGB, bool isLDR)
2589 deUint8 sRGB[ASTC_MAX_BLOCK_WIDTH*ASTC_MAX_BLOCK_HEIGHT*4];