summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/img_format.h
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-30 11:08:44 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-12-30 11:08:44 +0000
commit92f20f876f7efac016d9b69aa01fe3d2f0fc6f68 (patch)
tree6ff28373a4f412ce4e63a733117cb6631c917af7 /libmpcodecs/img_format.h
parent427039acff27c8d9b605d9b807d6f3a2c15830aa (diff)
downloadmpv-92f20f876f7efac016d9b69aa01fe3d2f0fc6f68.tar.bz2
mpv-92f20f876f7efac016d9b69aa01fe3d2f0fc6f68.tar.xz
Add a helper function to get the chroma scale shift and use to simplify mpi setup.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30138 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/img_format.h')
-rw-r--r--libmpcodecs/img_format.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h
index 4c917b01e4..56d96c481a 100644
--- a/libmpcodecs/img_format.h
+++ b/libmpcodecs/img_format.h
@@ -133,4 +133,11 @@ typedef struct {
const char *vo_format_name(int format);
+/**
+ * Calculates the scale shifts for the chroma planes for planar YUV
+ *
+ * \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);
+
#endif /* MPLAYER_IMG_FORMAT_H */