summaryrefslogtreecommitdiff
path: root/libavutil/samplefmt.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-11-12 15:58:40 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-23 18:39:28 -0500
commit8889cc4f5b767b323901115a92318a024336e2a1 (patch)
tree504d4b6e562e10d90b48c80c3a01d9c0659e4313 /libavutil/samplefmt.h
parentaa38cff2c6fdc1c0a7245f8a2aef5f6d4d2881d1 (diff)
downloadffmpeg-8889cc4f5b767b323901115a92318a024336e2a1.tar.gz
libavutil: add planar sample formats and av_sample_fmt_is_planar()
Diffstat (limited to 'libavutil/samplefmt.h')
-rw-r--r--libavutil/samplefmt.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h
index e38214927f..ce7ffc737b 100644
--- a/libavutil/samplefmt.h
+++ b/libavutil/samplefmt.h
@@ -31,6 +31,13 @@ enum AVSampleFormat {
AV_SAMPLE_FMT_S32, ///< signed 32 bits
AV_SAMPLE_FMT_FLT, ///< float
AV_SAMPLE_FMT_DBL, ///< double
+
+ AV_SAMPLE_FMT_U8P, ///< unsigned 8 bits, planar
+ AV_SAMPLE_FMT_S16P, ///< signed 16 bits, planar
+ AV_SAMPLE_FMT_S32P, ///< signed 32 bits, planar
+ AV_SAMPLE_FMT_FLTP, ///< float, planar
+ AV_SAMPLE_FMT_DBLP, ///< double, planar
+
AV_SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if linking dynamically
};
@@ -77,4 +84,12 @@ int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt);
*/
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);
+/**
+ * Check if the sample format is planar.
+ *
+ * @param sample_fmt the sample format to inspect
+ * @return 1 if the sample format is planar, 0 if it is interleaved
+ */
+int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt);
+
#endif /* AVUTIL_SAMPLEFMT_H */