diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-21 20:06:22 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-21 20:06:22 +0000 |
commit | 63e8d9760f23a4edf81e9ae58c4f6d3baa6ff4dd (patch) | |
tree | c2a7e585f116b18204d49b0a779d2549485518a0 /libavcodec/pcm-mpeg.c | |
parent | d6e602536c049a952969e95bb8f3897f5d46b914 (diff) | |
download | ffmpeg-63e8d9760f23a4edf81e9ae58c4f6d3baa6ff4dd.tar.gz |
Use the new libavcore audio channel API.
This also allows to remove a linking dependency of libavfilter on
libavcodec.
Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/pcm-mpeg.c')
-rw-r--r-- | libavcodec/pcm-mpeg.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/libavcodec/pcm-mpeg.c b/libavcodec/pcm-mpeg.c index 59c4ecfd4a..cf2792b593 100644 --- a/libavcodec/pcm-mpeg.c +++ b/libavcodec/pcm-mpeg.c @@ -24,6 +24,7 @@ * PCM codecs for encodings found in MPEG streams (DVD/Blu-ray) */ +#include "libavcore/audioconvert.h" #include "avcodec.h" #include "bytestream.h" @@ -53,9 +54,9 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx, { static const uint8_t bits_per_samples[4] = { 0, 16, 20, 24 }; static const uint32_t channel_layouts[16] = { - 0, CH_LAYOUT_MONO, 0, CH_LAYOUT_STEREO, CH_LAYOUT_SURROUND, - CH_LAYOUT_2_1, CH_LAYOUT_4POINT0, CH_LAYOUT_2_2, CH_LAYOUT_5POINT0, - CH_LAYOUT_5POINT1, CH_LAYOUT_7POINT0, CH_LAYOUT_7POINT1, 0, 0, 0, 0 + 0, AV_CH_LAYOUT_MONO, 0, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_SURROUND, + AV_CH_LAYOUT_2_1, AV_CH_LAYOUT_4POINT0, AV_CH_LAYOUT_2_2, AV_CH_LAYOUT_5POINT0, + AV_CH_LAYOUT_5POINT1, AV_CH_LAYOUT_7POINT0, AV_CH_LAYOUT_7POINT1, 0, 0, 0, 0 }; static const uint8_t channels[16] = { 0, 1, 0, 2, 3, 3, 4, 4, 5, 6, 7, 8, 0, 0, 0, 0 @@ -158,9 +159,9 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, if (samples) { switch (avctx->channel_layout) { /* cases with same number of source and coded channels */ - case CH_LAYOUT_STEREO: - case CH_LAYOUT_4POINT0: - case CH_LAYOUT_2_2: + case AV_CH_LAYOUT_STEREO: + case AV_CH_LAYOUT_4POINT0: + case AV_CH_LAYOUT_2_2: samples *= num_source_channels; if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { #if HAVE_BIGENDIAN @@ -177,10 +178,10 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, } break; /* cases where number of source channels = coded channels + 1 */ - case CH_LAYOUT_MONO: - case CH_LAYOUT_SURROUND: - case CH_LAYOUT_2_1: - case CH_LAYOUT_5POINT0: + case AV_CH_LAYOUT_MONO: + case AV_CH_LAYOUT_SURROUND: + case AV_CH_LAYOUT_2_1: + case AV_CH_LAYOUT_5POINT0: if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { do { #if HAVE_BIGENDIAN @@ -206,7 +207,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, } break; /* remapping: L, R, C, LBack, RBack, LF */ - case CH_LAYOUT_5POINT1: + case AV_CH_LAYOUT_5POINT1: if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { do { dst16[0] = bytestream_get_be16(&src); @@ -230,7 +231,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, } break; /* remapping: L, R, C, LSide, LBack, RBack, RSide, <unused> */ - case CH_LAYOUT_7POINT0: + case AV_CH_LAYOUT_7POINT0: if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { do { dst16[0] = bytestream_get_be16(&src); @@ -258,7 +259,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, } break; /* remapping: L, R, C, LSide, LBack, RBack, RSide, LF */ - case CH_LAYOUT_7POINT1: + case AV_CH_LAYOUT_7POINT1: if (AV_SAMPLE_FMT_S16 == avctx->sample_fmt) { do { dst16[0] = bytestream_get_be16(&src); |