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/mp_image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libmpcodecs/mp_image.c') diff --git a/libmpcodecs/mp_image.c b/libmpcodecs/mp_image.c index 4d2892cf81..88702dde60 100644 --- a/libmpcodecs/mp_image.c +++ b/libmpcodecs/mp_image.c @@ -123,9 +123,9 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ } mpi->flags|=MP_IMGFLAG_YUV; mpi->num_planes=3; - if (mp_get_chroma_shift(out_fmt, NULL, NULL)) { + if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) { mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift); + mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL); mpi->chroma_width = mpi->width >> mpi->chroma_x_shift; mpi->chroma_height = mpi->height >> mpi->chroma_y_shift; } -- cgit v1.2.3