diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-10 13:00:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-10 13:01:27 +0200 |
commit | eadba3e94daac2f48fd9ce7c9fdf5a562d3274ed (patch) | |
tree | e33c21663364927e22ba4a259ff8afb746e06ec6 /libavcodec/pcm.c | |
parent | b4e516e30e7004a0454a9009080c4de38987189a (diff) | |
parent | cbcd497f384f0f8ef3f76f85b29b644b900d6b9f (diff) | |
download | ffmpeg-eadba3e94daac2f48fd9ce7c9fdf5a562d3274ed.tar.gz |
Merge commit 'cbcd497f384f0f8ef3f76f85b29b644b900d6b9f'
* commit 'cbcd497f384f0f8ef3f76f85b29b644b900d6b9f':
adxdec: use planar sample format
adpcmdec: use planar sample format for adpcm_thp
adpcmdec: use planar sample format for adpcm_ea_xas
adpcmdec: use planar sample format for adpcm_ea_r1/r2/r3
adpcmdec: use planar sample format for adpcm_xa
adpcmdec: use planar sample format for adpcm_ima_ws for vqa version 3
adpcmdec: use planar sample format for adpcm_4xm
adpcmdec: use planar sample format for adpcm_ima_wav
adpcmdec: use planar sample format for adpcm_ima_qt
pcmdec: use planar sample format for pcm_lxf
mace: use planar sample format
atrac1: use planar sample format
build: non-x86: Only compile mpegvideo optimizations when necessary
rtpdec_mpeg4: au_headers is a single array, simple av_free is enough
avcodec: free extended_data instead address of it
fate: Add tests of the ff_make_absolute_url function
url: Handle relative urls starting with two slashes
url: Handle relative urls being just a new query string
url: Don't treat slashes in query parameters as directory separators
Conflicts:
libavcodec/adxdec.c
libavcodec/mips/Makefile
libavcodec/pcm.c
libavcodec/utils.c
libavformat/Makefile
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r-- | libavcodec/pcm.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index cc94a5e247..dd626dc58b 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -446,22 +446,21 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, { int i; n /= avctx->channels; - //unpack for (c = 0; c < avctx->channels; c++) { - dst_int32_t = (int32_t *)s->frame.data[c]; + dst_int32_t = (int32_t *)s->frame.extended_data[c]; for (i = 0; i < n; i++) { - //extract low 20 bits and expand to 32 bits - *dst_int32_t++ = (src[2] << 28) | - (src[1] << 20) | - (src[0] << 12) | - ((src[2] & 0xF) << 8) | - src[1]; - //extract high 20 bits and expand to 32 bits - *dst_int32_t++ = (src[4] << 24) | - (src[3] << 16) | - ((src[2] & 0xF0) << 8) | - (src[4] << 4) | - (src[3] >> 4); + // extract low 20 bits and expand to 32 bits + *dst_int32_t++ = (src[2] << 28) | + (src[1] << 20) | + (src[0] << 12) | + ((src[2] & 0x0F) << 8) | + src[1]; + // extract high 20 bits and expand to 32 bits + *dst_int32_t++ = (src[4] << 24) | + (src[3] << 16) | + ((src[2] & 0xF0) << 8) | + (src[4] << 4) | + (src[3] >> 4); src += 5; } } |