Home | History | Annotate | Download | only in common

Lines Matching refs:deUint32

43 static inline deUint8 getChannel (deUint32 color)
48 inline deUint32 readRGBA8Raw (const ConstPixelBufferAccess& src, deUint32 x, deUint32 y)
50 return *(const deUint32*)((const deUint8*)src.getDataPtr() + y*src.getRowPitch() + x*4);
53 inline RGBA readRGBA8 (const ConstPixelBufferAccess& src, deUint32 x, deUint32 y)
55 deUint32 raw = readRGBA8Raw(src, x, y);
56 deUint32 res = 0;
66 inline deUint8 interpolateChannel (deUint32 fx1, deUint32 fy1, deUint8 p00, deUint8 p01, deUint8 p10, deUint8 p11)
68 const deUint32 fx0 = (1u<<NUM_SUBPIXEL_BITS) - fx1;
69 const deUint32 fy0 = (1u<<NUM_SUBPIXEL_BITS) - fy1;
70 const deUint32 half = 1u<<(NUM_SUBPIXEL_BITS*2 - 1);
71 const deUint32 sum = fx0*fy0*p00 + fx1*fy0*p10 + fx0*fy1*p01 + fx1*fy1*p11;
72 const deUint32 rounded = (sum + half) >> (NUM_SUBPIXEL_BITS*2);
74 DE_ASSERT(de::inRange<deUint32>(rounded, 0, 0xff));
78 RGBA bilinearSampleRGBA8 (const ConstPixelBufferAccess& access, deUint32 u, deUint32 v)
80 deUint32 x0 = u>>NUM_SUBPIXEL_BITS;
81 deUint32 y0 = v>>NUM_SUBPIXEL_BITS;
82 deUint32 x1 = x0+1; //de::min(x0+1, (deUint32)(access.getWidth()-1));
83 deUint32 y1 = y0+1; //de::min(y0+1, (deUint32)(access.getHeight()-1));
85 DE_ASSERT(x1 < (deUint32)access.getWidth());
86 DE_ASSERT(y1 < (deUint32)access.getHeight());
88 deUint32 fx1 = u-(x0<<NUM_SUBPIXEL_BITS);
89 deUint32 fy1 = v-(y0<<NUM_SUBPIXEL_BITS);
91 deUint32 p00 = readRGBA8Raw(access, x0, y0);
92 deUint32 p10 = readRGBA8Raw(access, x1, y0);
93 deUint32 p01 = readRGBA8Raw(access, x0, y1);
94 deUint32 p11 = readRGBA8Raw(access, x1, y1);
96 deUint32 res = 0;
108 const RGBA resPix = readRGBA8(result, (deUint32)x, (deUint32)y);
112 const deUint32 x0 = (deUint32)de::max(x-1, 0);
113 const deUint32 x1 = (deUint32)x;
114 const deUint32 x2 = (deUint32)de::min(x+1, reference.getWidth()-1);
115 const deUint32 y0 = (deUint32)de::max(y-1, 0);
116 const deUint32 y1 = (deUint32)y;
117 const deUint32 y2 = (deUint32)de::min(y+1, reference.getHeight()-1);
134 static const deUint32 s_offsets[][2] =
175 if (compareThreshold(resPix, bilinearSampleRGBA8(reference, (deUint32)u, (deUint32)v), threshold))