summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/img_format.h
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2011-05-10 17:51:39 +0000
committerUoti Urpala <uau@mplayer2.org>2011-06-29 10:49:41 +0300
commit57f48fc1bf96504d169d82d2a27c1f1ad82ca2d1 (patch)
treef3c2359ed018d8f37de6953c42375b16609fc214 /libmpcodecs/img_format.h
parentf293935d39cc3bf5141e3b12c980e6918e78886a (diff)
downloadmpv-57f48fc1bf96504d169d82d2a27c1f1ad82ca2d1.tar.bz2
mpv-57f48fc1bf96504d169d82d2a27c1f1ad82ca2d1.tar.xz
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
Diffstat (limited to 'libmpcodecs/img_format.h')
-rw-r--r--libmpcodecs/img_format.h3
1 files changed, 2 insertions, 1 deletions
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 */