summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.h
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-07 13:24:54 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-07 13:24:54 +0000
commit0965bcee4367e23d306804963c79c628315dbb15 (patch)
tree873f433e7ecd9ebd24b4509251c3ed34d3dc64ce /libvo/gl_common.h
parent82cb987e543864b0cb375a663f9a2c4e0bfe8bfd (diff)
downloadmpv-0965bcee4367e23d306804963c79c628315dbb15.tar.bz2
mpv-0965bcee4367e23d306804963c79c628315dbb15.tar.xz
Reworked YUV2RGB fragment program setup in preparation for upcoming patches
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18620 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/gl_common.h')
-rw-r--r--libvo/gl_common.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index cf08f988ad..d9b9193c98 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -223,11 +223,28 @@ void glDrawTex(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
#define YUV_CONVERSION_FRAGMENT_LOOKUP 4
//! use ATI specific register combiners ("fragment program")
#define YUV_CONVERSION_COMBINERS_ATI 5
+//! use normal bilinear scaling for textures
+#define YUV_SCALER_BILIN 0
+//! mask for conversion type
+#define YUV_CONVERSION_MASK 0xF
+//! mask for scaler type
+#define YUV_SCALER_MASK 0xF
+//! shift value for luminance scaler type
+#define YUV_LUM_SCALER_SHIFT 8
+//! shift value for chrominance scaler type
+#define YUV_CHROM_SCALER_SHIFT 12
+//! extract conversion out of type
+#define YUV_CONVERSION(t) (t & YUV_CONVERSION_MASK)
+//! extract luminance scaler out of type
+#define YUV_LUM_SCALER(t) ((t >> YUV_LUM_SCALER_SHIFT) & YUV_SCALER_MASK)
+//! extract chrominance scaler out of type
+#define YUV_CHROM_SCALER(t) ((t >> YUV_CHROM_SCALER_SHIFT) & YUV_SCALER_MASK)
/** \} */
void glSetupYUVConversion(GLenum target, int type,
float brightness, float contrast,
float hue, float saturation,
- float rgamma, float ggamma, float bgamma);
+ float rgamma, float ggamma, float bgamma,
+ int texw, int texh);
void glEnableYUVConversion(GLenum target, int type);
void glDisableYUVConversion(GLenum target, int type);