diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2012-11-12 01:25:43 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-11-13 16:14:55 +0100 |
commit | c1a02e884ac785033baab356a5437adf057a4189 (patch) | |
tree | caa6e75ce56cbc0d15cae71eb38947ed730e46c9 /libavutil/pixdesc.h | |
parent | 22a0827dff29a94e7fd07ad2782f169b2703c70d (diff) | |
download | ffmpeg-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.h | 14 |
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 */ |