summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
Diffstat (limited to 'libvo')
-rw-r--r--libvo/gl_common.h3
-rw-r--r--libvo/vo_gl.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/libvo/gl_common.h b/libvo/gl_common.h
index a637006f5c..ddf0856956 100644
--- a/libvo/gl_common.h
+++ b/libvo/gl_common.h
@@ -347,6 +347,9 @@ int loadGPUProgram(GLenum target, char *prog);
#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)
+#define SET_YUV_CONVERSION(c) ((c) & YUV_CONVERSION_MASK)
+#define SET_YUV_LUM_SCALER(s) (((s) & YUV_SCALER_MASK) << YUV_LUM_SCALER_SHIFT)
+#define SET_YUV_CHROM_SCALER(s) (((s) & YUV_SCALER_MASK) << YUV_CHROM_SCALER_SHIFT)
/** \} */
typedef struct {
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index 236e69eda7..f339f2aee8 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -534,7 +534,9 @@ static int initGl(uint32_t d_width, uint32_t d_height) {
int scale_type = mipmap_gen ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR;
autodetectGlExtensions();
gl_target = use_rectangle == 1 ? GL_TEXTURE_RECTANGLE : GL_TEXTURE_2D;
- yuvconvtype = use_yuv | lscale << YUV_LUM_SCALER_SHIFT | cscale << YUV_CHROM_SCALER_SHIFT;
+ yuvconvtype = SET_YUV_CONVERSION(use_yuv) |
+ SET_YUV_LUM_SCALER(lscale) |
+ SET_YUV_CHROM_SCALER(cscale);
texSize(image_width, image_height, &texture_width, &texture_height);