summaryrefslogtreecommitdiff
path: root/libavcodec/truemotion2.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-02-13 17:57:05 +0100
committerDiego Biurrun <diego@biurrun.de>2014-06-22 18:22:31 -0700
commitc67b449bebbe0b35c73b203683e77a0a649bc765 (patch)
treefef2691cbb548198024dbc1461419dfdd9d3fea2 /libavcodec/truemotion2.c
parent7b9ef8d701c319c26f7d0664fe977e176764c74e (diff)
downloadffmpeg-c67b449bebbe0b35c73b203683e77a0a649bc765.tar.gz
dsputil: Split bswap*_buf() off into a separate context
Diffstat (limited to 'libavcodec/truemotion2.c')
-rw-r--r--libavcodec/truemotion2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 888692435b..122643db0e 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -27,9 +27,9 @@
#include <inttypes.h>
#include "avcodec.h"
+#include "bswapdsp.h"
#include "bytestream.h"
#include "get_bits.h"
-#include "dsputil.h"
#include "internal.h"
#define TM2_ESCAPE 0x80000000
@@ -63,7 +63,7 @@ typedef struct TM2Context {
AVFrame *pic;
GetBitContext gb;
- DSPContext dsp;
+ BswapDSPContext bdsp;
/* TM2 streams */
int *tokens[TM2_NUM_STREAMS];
@@ -858,7 +858,8 @@ static int decode_frame(AVCodecContext *avctx,
return ret;
}
- l->dsp.bswap_buf((uint32_t*)swbuf, (const uint32_t*)buf, buf_size >> 2);
+ l->bdsp.bswap_buf((uint32_t *) swbuf, (const uint32_t *) buf,
+ buf_size >> 2);
if ((ret = tm2_read_header(l, swbuf)) < 0) {
av_free(swbuf);
@@ -909,7 +910,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
if (!l->pic)
return AVERROR(ENOMEM);
- ff_dsputil_init(&l->dsp, avctx);
+ ff_bswapdsp_init(&l->bdsp);
l->last = av_malloc(4 * sizeof(*l->last) * (w >> 2));
l->clast = av_malloc(4 * sizeof(*l->clast) * (w >> 2));