summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/mp_image.c
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/mp_image.c
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/mp_image.c')
-rw-r--r--libmpcodecs/mp_image.c4
1 files changed, 2 insertions, 2 deletions
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;
}