Home | History | Annotate | Download | only in common

Lines Matching refs:deUint32

44 static inline deUint8 getChannel (deUint32 color)
50 inline deUint32 readRGBA8Raw (const ConstPixelBufferAccess& src, deUint32 x, deUint32 y)
52 return *(const deUint32*)((const deUint8*)src.getDataPtr() + y*src.getRowPitch() + x*4);
55 inline deUint32 readRGBA8Raw (const ConstPixelBufferAccess& src, deUint32 x, deUint32 y)
57 return deReverseBytes32(*(const deUint32*)((const deUint8*)src.getDataPtr() + y*src.getRowPitch() + x*4));
61 inline RGBA readRGBA8 (const ConstPixelBufferAccess& src, deUint32 x, deUint32 y)
63 deUint32 raw = readRGBA8Raw(src, x, y);
64 deUint32 res = 0;
74 inline deUint8 interpolateChannel (deUint32 fx1, deUint32 fy1, deUint8 p00, deUint8 p01, deUint8 p10, deUint8 p11)
76 const deUint32 fx0 = (1u<<NUM_SUBPIXEL_BITS) - fx1;
77 const deUint32 fy0 = (1u<<NUM_SUBPIXEL_BITS) - fy1;
78 const deUint32 half = 1u<<(NUM_SUBPIXEL_BITS*2 - 1);
79 const deUint32 sum = fx0*fy0*p00 + fx1*fy0*p10 + fx0*fy1*p01 + fx1*fy1*p11;
80 const deUint32 rounded = (sum + half) >> (NUM_SUBPIXEL_BITS*2);
82 DE_ASSERT(de::inRange<deUint32>(rounded, 0, 0xff));
86 RGBA bilinearSampleRGBA8 (const ConstPixelBufferAccess& access, deUint32 u, deUint32 v)
88 deUint32 x0 = u>>NUM_SUBPIXEL_BITS;
89 deUint32 y0 = v>>NUM_SUBPIXEL_BITS;
90 deUint32 x1 = x0+1; //de::min(x0+1, (deUint32)(access.getWidth()-1));
91 deUint32 y1 = y0+1; //de::min(y0+1, (deUint32)(access.getHeight()-1));
93 DE_ASSERT(x1 < (deUint32)access.getWidth());
94 DE_ASSERT(y1 < (deUint32)access.getHeight());
96 deUint32 fx1 = u-(x0<<NUM_SUBPIXEL_BITS);
97 deUint32 fy1 = v-(y0<<NUM_SUBPIXEL_BITS);
99 deUint32 p00 = readRGBA8Raw(access, x0, y0);
100 deUint32 p10 = readRGBA8Raw(access, x1, y0);
101 deUint32 p01 = readRGBA8Raw(access, x0, y1);
102 deUint32 p11 = readRGBA8Raw(access, x1, y1);
104 deUint32 res = 0;
116 const RGBA resPix = readRGBA8(result, (deUint32)x, (deUint32)y);
120 const deUint32 x0 = (deUint32)de::max(x-1, 0);
121 const deUint32 x1 = (deUint32)x;
122 const deUint32 x2 = (deUint32)de::min(x+1, reference.getWidth()-1);
123 const deUint32 y0 = (deUint32)de::max(y-1, 0);
124 const deUint32 y1 = (deUint32)y;
125 const deUint32 y2 = (deUint32)de::min(y+1, reference.getHeight()-1);
142 static const deUint32 s_offsets[][2] =
183 if (compareThreshold(resPix, bilinearSampleRGBA8(reference, (deUint32)u, (deUint32)v), threshold))