diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 14:35:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-13 14:35:42 +0200 |
commit | d6c342fdc0b434b514f99e1feaa108ab17bba806 (patch) | |
tree | 244b8c09cff87b34e1c94cfe3e8e2e15b415ce3c /libavcodec/pcm.c | |
parent | d197bd4f5ee752c95ebaf7d94257ca5121309674 (diff) | |
parent | d5c62122a7b26704bf867a1262df358623bf5edf (diff) | |
download | ffmpeg-d6c342fdc0b434b514f99e1feaa108ab17bba806.tar.gz |
Merge commit 'd5c62122a7b26704bf867a1262df358623bf5edf'
* commit 'd5c62122a7b26704bf867a1262df358623bf5edf':
Move av_reverse table to libavcodec
Conflicts:
libavcodec/asvenc.c
libavcodec/vble.c
libavutil/common.h
libavutil/mathematics.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r-- | libavcodec/pcm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index dd626dc58b..e2ae9f964c 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -24,10 +24,11 @@ * PCM codecs */ -#include "libavutil/common.h" /* for av_reverse */ +#include "libavutil/attributes.h" #include "avcodec.h" #include "bytestream.h" #include "internal.h" +#include "mathops.h" #include "pcm_tablegen.h" #define MAX_CHANNELS 64 @@ -122,8 +123,8 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, break; case AV_CODEC_ID_PCM_S24DAUD: for (; n > 0; n--) { - uint32_t tmp = av_reverse[(*samples >> 8) & 0xff] + - (av_reverse[*samples & 0xff] << 8); + uint32_t tmp = ff_reverse[(*samples >> 8) & 0xff] + + (ff_reverse[*samples & 0xff] << 8); tmp <<= 4; // sync flags would go here bytestream_put_be24(&dst, tmp); samples++; @@ -334,8 +335,8 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, for (; n > 0; n--) { uint32_t v = bytestream_get_be24(&src); v >>= 4; // sync flags are here - AV_WN16A(samples, av_reverse[(v >> 8) & 0xff] + - (av_reverse[v & 0xff] << 8)); + AV_WN16A(samples, ff_reverse[(v >> 8) & 0xff] + + (ff_reverse[v & 0xff] << 8)); samples += 2; } break; |