aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pcm.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-10-11 18:50:30 +0200
committerDiego Biurrun <diego@biurrun.de>2012-10-12 20:39:18 +0200
commitd5c62122a7b26704bf867a1262df358623bf5edf (patch)
tree187a81249ccd692b0d25c951185721055ef3c797 /libavcodec/pcm.c
parent930c9d4373e0f3cb7c64fcfc129127a309f6d066 (diff)
downloadffmpeg-d5c62122a7b26704bf867a1262df358623bf5edf.tar.gz
Move av_reverse table to libavcodec
It is only used in that library.
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 669a7e2c6b..c6c6bc03de 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
@@ -124,8 +125,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++;
@@ -332,8 +333,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;