From 57f48fc1bf96504d169d82d2a27c1f1ad82ca2d1 Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 10 May 2011 17:51:39 +0000 Subject: vo_gl: don't accept 9/10-bit formats as input Make mp_get_chroma_shift() simpler/more generic and add an argument to get the per-component bit depth. Use this to check more properly for supported formats in gl and gl2 vos (only 8 and 16 bit are supported, 9 and 10 are not). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33452 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/img_format.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmpcodecs/img_format.h') diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index 52a5ffbe25..2fc9775ee1 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -227,8 +227,9 @@ const char *vo_format_name(int format); /** * Calculates the scale shifts for the chroma planes for planar YUV * + * \param component_bits bits per component * \return bits-per-pixel for format if successful (i.e. format is 3 or 4-planes planar YUV), 0 otherwise */ -int mp_get_chroma_shift(int format, int *x_shift, int *y_shift); +int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits); #endif /* MPLAYER_IMG_FORMAT_H */ -- cgit v1.2.3