Lines Matching defs:pixel
93 static void maskPixelForFormat(glw::GLenum internal_format, glw::GLubyte* pixel);
100 static std::string getPixelString(glw::GLenum internal_format, const glw::GLubyte* pixel);
123 static void readChannel(glw::GLenum type, glw::GLuint channel, const glw::GLubyte* pixel, glw::GLdouble& out_value);
125 static void writeChannel(glw::GLenum type, glw::GLuint channel, glw::GLdouble value, glw::GLubyte* pixel);
130 static void unpackPixel(glw::GLenum format, glw::GLenum type, const glw::GLubyte* pixel, glw::GLdouble& out_red,
242 * Pixel compatibility depends on pixel size. However value returned by getPixelSizeForFormat
247 * @return Size of pixel for compatibility checks
485 * @param left_pixel_size Size of left pixel
486 * @param left_pixel_data Data of left pixel
487 * @param right_pixel_size Size of right pixel
488 * @param right_pixel_data Data of right pixel
929 /** Returns mask that should be applied to pixel value
932 * @param pixel Pixel data
936 void Utils::maskPixelForFormat(GLenum internal_format, GLubyte* pixel)
942 pixel[0] |= 0x03;
950 /** Get size of pixel for given internal format
1082 /** Prepare string that represents bytes of pixel
1085 * @param pixel Pixel data
1089 std::string Utils::getPixelString(GLenum internal_format, const GLubyte* pixel)
1098 stream << std::setbase(16) << std::setw(2) << std::setfill('0') << (GLuint)pixel[i];
1646 * @param pixel Pixel data
1650 void readBaseTypeFromUnsignedChannel(GLuint channel, const GLubyte* pixel, GLdouble& out_value)
1655 const T* ptr = (T*)pixel;
1667 * @param pixel Pixel data
1671 void readBaseTypeFromSignedChannel(GLuint channel, const GLubyte* pixel, GLdouble& out_value)
1678 const T* ptr = (T*)pixel;
1690 * @param pixel Pixel data
1693 void readBaseTypeFromFloatChannel(GLuint channel, const GLubyte* pixel, GLdouble& out_value)
1695 const GLfloat* ptr = (const GLfloat*)pixel;
1707 * @param pixel Pixel data
1710 void readBaseTypeFromHalfFloatChannel(GLuint channel, const GLubyte* pixel, GLdouble& out_value)
1712 const deUint16* ptr = (const deUint16*)pixel;
1722 * @tparam T Type used to store pixel
1731 * @param pixel Pixel data
1736 void read3Channel(GLuint channel, const GLubyte* pixel, GLdouble& out_value)
1741 const T* ptr = (T*)pixel;
1781 * @tparam T Type used to store pixel
1792 * @param pixel Pixel data
1797 void read4Channel(GLuint channel, const GLubyte* pixel, GLdouble& out_value)
1802 const T* ptr = (T*)pixel;
1849 * @param pixel Pixel data
1852 void read11F_11F_10F_Channel(GLuint channel, const GLubyte* pixel, GLdouble& out_value)
1854 const deUint32* ptr = (deUint32*)pixel;
1890 * @tparam T Type used to store pixel
1894 * @param pixel Pixel data
1897 void writeBaseTypeToUnsignedChannel(GLuint channel, GLdouble value, GLubyte* pixel)
1905 T* ptr = (T*)pixel;
1912 * @tparam T Type used to store pixel
1916 * @param pixel Pixel data
1919 void writeBaseTypeToSignedChannel(GLuint channel, GLdouble value, GLubyte* pixel)
1929 T* ptr = (T*)pixel;
1938 * @param pixel Pixel data
1940 void writeBaseTypeToFloatChannel(GLuint channel, GLdouble value, GLubyte* pixel)
1944 GLfloat* ptr = (GLfloat*)pixel;
1953 * @param pixel Pixel data
1955 void writeBaseTypeToHalfFloatChannel(GLuint channel, GLdouble value, GLubyte* pixel)
1957 deUint16* ptr = (deUint16*)pixel;
1966 * @tparam T Type used to store pixel
1976 * @param pixel Pixel data
1980 void write3Channel(GLuint channel, GLdouble value, GLubyte* pixel)
1985 T* ptr = (T*)pixel;
2025 * @tparam T Type used to store pixel
2037 * @param pixel Pixel data
2041 void write4Channel(GLuint channel, GLdouble value, GLubyte* pixel)
2046 T* ptr = (T*)pixel;
2094 * @param pixel Pixel data
2096 void write11F_11F_10F_Channel(GLuint channel, GLdouble value, GLubyte* pixel)
2098 deUint32* ptr = (deUint32*)pixel;
2133 * @param type Type used by pixel
2135 * @param pixel Pixel data
2138 void Utils::readChannel(GLenum type, GLuint channel, const GLubyte* pixel, GLdouble& value)
2144 readBaseTypeFromUnsignedChannel<GLubyte>(channel, pixel, value);
2147 readBaseTypeFromUnsignedChannel<GLushort>(channel, pixel, value);
2150 readBaseTypeFromUnsignedChannel<GLuint>(channel, pixel, value);
2153 readBaseTypeFromSignedChannel<GLbyte>(channel, pixel, value);
2156 readBaseTypeFromSignedChannel<GLshort>(channel, pixel, value);
2159 readBaseTypeFromSignedChannel<GLint>(channel, pixel, value);
2162 readBaseTypeFromHalfFloatChannel(channel, pixel, value);
2165 readBaseTypeFromFloatChannel(channel, pixel, value);
2171 read3Channel<GLubyte, 3, 3, 2, 5, 2, 0>(channel, pixel, value);
2174 read3Channel<GLushort, 5, 6, 5, 11, 5, 0>(channel, pixel, value);
2179 read4Channel<GLushort, 4, 4, 4, 4, 12, 8, 4, 0>(channel, pixel, value);
2182 read4Channel<GLushort, 5, 5, 5, 1, 11, 6, 1, 0>(channel, pixel, value);
2185 read4Channel<GLuint, 2, 10, 10, 10, 30, 20, 10, 0>(3 - channel, pixel, value);
2188 read4Channel<GLuint, 5, 9, 9, 9, 27, 18, 9, 0>(3 - channel, pixel, value);
2193 read11F_11F_10F_Channel(channel, pixel, value);
2203 * @param type Type used by pixel
2206 * @param pixel Pixel data
2208 void Utils::writeChannel(GLenum type, GLuint channel, GLdouble value, GLubyte* pixel)
2214 writeBaseTypeToUnsignedChannel<GLubyte>(channel, value, pixel);
2217 writeBaseTypeToUnsignedChannel<GLushort>(channel, value, pixel);
2220 writeBaseTypeToUnsignedChannel<GLuint>(channel, value, pixel);
2223 writeBaseTypeToSignedChannel<GLbyte>(channel, value, pixel);
2226 writeBaseTypeToSignedChannel<GLshort>(channel, value, pixel);
2229 writeBaseTypeToSignedChannel<GLint>(channel, value, pixel);
2232 writeBaseTypeToHalfFloatChannel(channel, value, pixel);
2235 writeBaseTypeToFloatChannel(channel, value, pixel);
2242 write3Channel<GLubyte, 3, 3, 2, 5, 2, 0>(channel, value, pixel);
2245 write3Channel<GLushort, 5, 6, 5, 11, 5, 0>(channel, value, pixel);
2250 write4Channel<GLushort, 4, 4, 4, 4, 12, 8, 4, 0>(channel, value, pixel);
2253 write4Channel<GLushort, 5, 5, 5, 1, 11, 6, 1, 0>(channel, value, pixel);
2256 write4Channel<GLuint, 2, 10, 10, 10, 30, 20, 10, 0>(3 - channel, value, pixel);
2259 write4Channel<GLuint, 5, 9, 9, 9, 27, 18, 9, 0>(3 - channel, value, pixel);
2264 write11F_11F_10F_Channel(channel, value, pixel);
2272 /** Packs given channels to pixel
2371 /** Unpacks channels from pixel
2375 * @param pixel Pixel data
2381 void Utils::unpackPixel(GLenum format, GLenum type, const GLubyte* pixel, GLdouble& out_red, GLdouble& out_green,
2388 readChannel(type, 0, pixel, out_red);
2395 readChannel(type, 0, pixel, out_red);
2396 readChannel(type, 1, pixel, out_green);
2405 readChannel(type, 0, pixel, out_red);
2406 readChannel(type, 1, pixel, out_green);
2407 readChannel(type, 2, pixel, out_blue);
2408 readChannel(type, 3, pixel, out_alpha);
2411 readChannel(type, 0, pixel, out_red);
2412 readChannel(type, 1, pixel, out_green);
2413 readChannel(type, 2, pixel, out_blue);
2420 readChannel(type, 0, pixel, out_red);
2421 readChannel(type, 1, pixel, out_green);
2422 readChannel(type, 2, pixel, out_blue);
2423 readChannel(type, 3, pixel, out_alpha);
2451 * @param left_pixel Data of left pixel
2455 * @param right_pixel Data of right pixel
2935 /* For each pixel of region */
3046 /** Get pixel data for image
3192 GLubyte* pixel = line + pixel_offset;
3200 Utils::packPixel(internal_format, type, red, green, blue, alpha, pixel);
3728 /* For each pixel of region */
3833 /** Get pixel data for image