summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat_tmp.h
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-06-15 19:20:05 +0100
committerJosé Fonseca <[email protected]>2009-06-15 19:20:05 +0100
commit053d8eb8914cae274ccd19abb0a492e7ca220660 (patch)
tree478a80561da595e022ef0e6716fecd2c4f7fdafe /src/mesa/main/texformat_tmp.h
parent6214c7262fe2d31553a4974022e08a7715693014 (diff)
mesa: Use appropriate float/integer types.
Diffstat (limited to 'src/mesa/main/texformat_tmp.h')
-rw-r--r--src/mesa/main/texformat_tmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index 1020624faa2..eb160deff93 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -1347,7 +1347,7 @@ static void FETCH(f_ycbcr)( const struct gl_texture_image *texImage,
const GLubyte cb = *src0 & 0xff; /* chroma U */
const GLubyte y1 = (*src1 >> 8) & 0xff; /* luminance */
const GLubyte cr = *src1 & 0xff; /* chroma V */
- const GLfloat y = (i & 1) ? y1 : y0; /* choose even/odd luminance */
+ const GLubyte y = (i & 1) ? y1 : y0; /* choose even/odd luminance */
GLfloat r = 1.164F * (y - 16) + 1.596F * (cr - 128);
GLfloat g = 1.164F * (y - 16) - 0.813F * (cr - 128) - 0.391F * (cb - 128);
GLfloat b = 1.164F * (y - 16) + 2.018F * (cb - 128);
@@ -1388,7 +1388,7 @@ static void FETCH(f_ycbcr_rev)( const struct gl_texture_image *texImage,
const GLubyte cr = (*src0 >> 8) & 0xff; /* chroma V */
const GLubyte y1 = *src1 & 0xff; /* luminance */
const GLubyte cb = (*src1 >> 8) & 0xff; /* chroma U */
- const GLfloat y = (i & 1) ? y1 : y0; /* choose even/odd luminance */
+ const GLubyte y = (i & 1) ? y1 : y0; /* choose even/odd luminance */
GLfloat r = 1.164F * (y - 16) + 1.596F * (cr - 128);
GLfloat g = 1.164F * (y - 16) - 0.813F * (cr - 128) - 0.391F * (cb - 128);
GLfloat b = 1.164F * (y - 16) + 2.018F * (cb - 128);