Lines Matching refs:GLubyte
34 typedef GLubyte GLchan;
56 static void dxt135_decode_imageblock ( const GLubyte *img_block_src,
64 GLubyte bit_pos = 2 * (j * 4 + i) ;
65 GLubyte code = (GLubyte) ((bits >> bit_pos) & 3);
111 static void fetch_2d_texel_rgb_dxt1(GLint srcRowStride, const GLubyte *pixdata,
118 const GLubyte *blksrc = (pixdata + ((srcRowStride + 3) / 4 * (j / 4) + (i / 4)) * 8);
123 static void fetch_2d_texel_rgba_dxt1(GLint srcRowStride, const GLubyte *pixdata,
130 const GLubyte *blksrc = (pixdata + ((srcRowStride + 3) / 4 * (j / 4) + (i / 4)) * 8);
134 static void fetch_2d_texel_rgba_dxt3(GLint srcRowStride, const GLubyte *pixdata,
142 const GLubyte *blksrc = (pixdata + ((srcRowStride + 3) / 4 * (j / 4) + (i / 4)) * 16);
143 const GLubyte anibble = (blksrc[((j&3) * 4 + (i&3)) / 2] >> (4 * (i&1))) & 0xf;
145 rgba[ACOMP] = UBYTE_TO_CHAN( (GLubyte)(EXP4TO8(anibble)) );
148 static void fetch_2d_texel_rgba_dxt5(GLint srcRowStride, const GLubyte *pixdata,
156 const GLubyte *blksrc = (pixdata + ((srcRowStride + 3) / 4 * (j / 4) + (i / 4)) * 16);
157 const GLubyte alpha0 = blksrc[0];
158 const GLubyte alpha1 = blksrc[1];
159 const GLubyte bit_pos = ((j&3) * 4 + (i&3)) * 3;
160 const GLubyte acodelow = blksrc[2 + bit_pos / 8];
161 const GLubyte acodehigh = blksrc[3 + bit_pos / 8];
162 const GLubyte code = (acodelow >> (bit_pos & 0x7) |
188 static void fancybasecolorsearch( UNUSED GLubyte *blkaddr, GLubyte srccolors[4][4][4], GLubyte *bestcolor[2],
199 GLubyte nrcolor[2];
201 GLubyte enc = 0;
202 GLubyte cv[4][4];
203 GLubyte testcolor[2][3];
314 GLubyte coldiffred, coldiffgreen, coldiffblue, coldiffmax, factor, ind0, ind1;
380 static void storedxtencodedblock( GLubyte *blkaddr, GLubyte srccolors[4][4][4], GLubyte *bestcolor[2],
390 GLubyte *colorptr;
391 GLubyte enc = 0;
392 GLubyte cv[4][4];
503 static void encodedxtcolorblockfaster( GLubyte *blkaddr, GLubyte srccolors[4][4][4],
514 GLubyte *bestcolor[2];
515 GLubyte basecolors[2][3];
516 GLubyte i, j;
558 static void writedxt5encodedalphablock( GLubyte *blkaddr, GLubyte alphabase1, GLubyte alphabase2,
559 GLubyte alphaenc[16])
571 static void encodedxt5alpha(GLubyte *blkaddr, GLubyte srccolors[4][4][4],
574 GLubyte alphabase[2], alphause[2];
577 GLubyte i, j, aindex, acutValues[7];
578 GLubyte alphaenc1[16], alphaenc2[16], alphaenc3[16];
744 GLubyte nralphainrangelow = 0;
745 GLubyte nralphainrangehigh = 0;
889 writedxt5encodedalphablock( blkaddr, (GLubyte)alphatest[0], (GLubyte)alphatest[1], alphaenc3 );
893 static void extractsrccolors( GLubyte srcpixels[4][4][4], const GLchan *srcaddr,
896 GLubyte i, j, c;
911 const GLubyte *srcPixData, GLubyte *dest, int dstRowStride,
916 GLubyte *blkaddr = dest;
917 GLubyte srcpixels[4][4][4];
944 const GLubyte *srcPixData, GLubyte *dest, int dstRowStride)
947 GLubyte *blkaddr = dest;
948 GLubyte srcpixels[4][4][4];
982 const GLubyte *srcPixData, GLubyte *dest, int dstRowStride)
985 GLubyte *blkaddr = dest;
986 GLubyte srcpixels[4][4][4];
1013 const GLubyte *srcPixData, GLenum destFormat,
1014 GLubyte *dest, GLint dstRowStride)