summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-17 22:18:21 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-18 00:28:06 +0200
commit123272374180d8dc3ce9dff50f0c77d5b3b3341f (patch)
tree2c2add85161e74ebe6d4301a6607adc521112582 /libavutil
parenta66675268f63dd6794ce946c7edbcb8b49ae0f13 (diff)
parent0f96f0d9968a767ead3aec823fcdfb78f26f7be7 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: aacenc: Fix issues with huge values of bit_rate. dv_tablegen: Drop unnecessary av_unused attribute from dv_vlc_map_tableinit(). proresenc: multithreaded quantiser search riff: use bps instead of bits_per_coded_sample in the WAVEFORMATEXTENSIBLE header avconv: only set the "channels" option when it exists for the specified input format avplay: update get_buffer to be inline with avconv aacdec: More robust output configuration. faac: Fix multi-channel ordering faac: Add .channel_layouts rtmp: Support 'rtmp_playpath', an option which overrides the stream identifier rtmp: Support 'rtmp_app', an option which overrides the name of application avutil: add better documentation for AVSampleFormat Conflicts: libavcodec/aac.h libavcodec/aacdec.c libavcodec/aacenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/samplefmt.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h
index af015d0cc3..99fde99e8c 100644
--- a/libavutil/samplefmt.h
+++ b/libavutil/samplefmt.h
@@ -22,7 +22,26 @@
#include "avutil.h"
/**
- * all in native-endian format
+ * Audio Sample Formats
+ *
+ * @par
+ * The data described by the sample format is always in native-endian order.
+ * Sample values can be expressed by native C types, hence the lack of a signed
+ * 24-bit sample format even though it is a common raw audio data format.
+ *
+ * @par
+ * The floating-point formats are based on full volume being in the range
+ * [-1.0, 1.0]. Any values outside this range are beyond full volume level.
+ *
+ * @par
+ * The data layout as used in av_samples_fill_arrays() and elsewhere in Libav
+ * (such as AVFrame in libavcodec) is as follows:
+ *
+ * For planar sample formats, each audio channel is in a separate data plane,
+ * and linesize is the buffer size, in bytes, for a single plane. All data
+ * planes must be the same size. For packed sample formats, only the first data
+ * plane is used, and samples for each channel are interleaved. In this case,
+ * linesize is the buffer size, in bytes, for the 1 plane.
*/
enum AVSampleFormat {
AV_SAMPLE_FMT_NONE = -1,
@@ -147,6 +166,9 @@ int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
* buffer for planar layout, or the aligned size of the buffer for all channels
* for packed layout.
*
+ * @see enum AVSampleFormat
+ * The documentation for AVSampleFormat describes the data layout.
+ *
* @param[out] audio_data array to be filled with the pointer for each channel
* @param[out] linesize calculated linesize, may be NULL
* @param buf the pointer to a buffer containing the samples
@@ -165,6 +187,9 @@ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize, uint8_t *buf,
* linesize accordingly.
* The allocated samples buffer can be freed by using av_freep(&audio_data[0])
*
+ * @see enum AVSampleFormat
+ * The documentation for AVSampleFormat describes the data layout.
+ *
* @param[out] audio_data array to be filled with the pointer for each channel
* @param[out] linesize aligned size for audio buffer(s), may be NULL
* @param nb_channels number of audio channels