diff libmpcodecs/mp_image.c @ 33365:706871635af7

Make mp_get_chroma_shift simpler/more generic and add an argument to get the per-component bit depth. Use this to checking more properly for supported formats in gl and gl2 vos (only 8 and 16 bit are supported, 9 and 10 are not).
author reimar
date Tue, 10 May 2011 17:51:39 +0000
parents e1ee4895e500
children cf2a4f4cac0e
line wrap: on
line diff
--- a/libmpcodecs/mp_image.c	Tue May 10 08:42:52 2011 +0000
+++ b/libmpcodecs/mp_image.c	Tue May 10 17:51:39 2011 +0000
@@ -123,9 +123,9 @@
     }
     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;
     }