aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/pixdesc.h
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-11-12 01:25:43 +0100
committerLuca Barbato <lu_zero@gentoo.org>2012-11-13 16:14:55 +0100
commitc1a02e884ac785033baab356a5437adf057a4189 (patch)
treecaa6e75ce56cbc0d15cae71eb38947ed730e46c9 /libavutil/pixdesc.h
parent22a0827dff29a94e7fd07ad2782f169b2703c70d (diff)
downloadffmpeg-c1a02e884ac785033baab356a5437adf057a4189.tar.gz
pixdesc: add av_pix_fmt_get_chroma_sub_sample
Deprecate avcodec_get_chroma_sub_sample.
Diffstat (limited to 'libavutil/pixdesc.h')
-rw-r--r--libavutil/pixdesc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h
index 7da17bcf12..a944c66dd3 100644
--- a/libavutil/pixdesc.h
+++ b/libavutil/pixdesc.h
@@ -203,4 +203,18 @@ const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev);
*/
enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc);
+/**
+ * Utility function to access log2_chroma_w log2_chroma_h from
+ * the pixel format AVPixFmtDescriptor.
+ *
+ * @param[in] pix_fmt the pixel format
+ * @param[out] h_shift store log2_chroma_h
+ * @param[out] v_shift store log2_chroma_w
+ *
+ * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format
+ */
+int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
+ int *h_shift, int *v_shift);
+
+
#endif /* AVUTIL_PIXDESC_H */