aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-03-10 13:32:10 -0700
committerMichael Niedermayer <michaelni@gmx.at>2013-03-13 03:57:33 +0100
commitcc5d17e0264027ebcd831b88247d4224e7b0d0e3 (patch)
treeccd898775d799a603c41362a131839f704f3426e
parent04a75bb74f5db7463e9bb0453a2f7bfd54d1dc07 (diff)
downloadffmpeg-cc5d17e0264027ebcd831b88247d4224e7b0d0e3.tar.gz
mimic: use hpeldsp instead of dsputil for half-pel functions.
-rwxr-xr-xconfigure2
-rw-r--r--libavcodec/mimic.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/configure b/configure
index 2b97006171..71d88b0625 100755
--- a/configure
+++ b/configure
@@ -1749,7 +1749,7 @@ lagarith_decoder_select="dsputil"
ljpeg_encoder_select="aandcttables mpegvideoenc"
loco_decoder_select="golomb"
mdec_decoder_select="dsputil error_resilience mpegvideo"
-mimic_decoder_select="dsputil"
+mimic_decoder_select="dsputil hpeldsp"
mjpeg_encoder_select="aandcttables dsputil mpegvideoenc"
mlp_decoder_select="dsputil mlp_parser"
motionpixels_decoder_select="dsputil"
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 90e39690ae..7ecdbc0205 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -28,6 +28,7 @@
#include "get_bits.h"
#include "bytestream.h"
#include "dsputil.h"
+#include "hpeldsp.h"
#include "thread.h"
#define MIMIC_HEADER_SIZE 20
@@ -52,6 +53,7 @@ typedef struct {
GetBitContext gb;
ScanTable scantable;
DSPContext dsp;
+ HpelDSPContext hdsp;
VLC vlc;
/* Kept in the context so multithreading can have a constant to read from */
@@ -144,6 +146,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx)
return ret;
}
ff_dsputil_init(&ctx->dsp, avctx);
+ ff_hpeldsp_init(&ctx->hdsp, avctx->flags);
ff_init_scantable(ctx->dsp.idct_permutation, &ctx->scantable, col_zag);
for (i = 0; i < FF_ARRAY_ELEMS(ctx->frames); i++) {
@@ -304,7 +307,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
cur_row, 0);
p += src -
ctx->flipped_ptrs[ctx->prev_index].data[plane];
- ctx->dsp.put_pixels_tab[1][0](dst, p, stride, 8);
+ ctx->hdsp.put_pixels_tab[1][0](dst, p, stride, 8);
} else {
av_log(ctx->avctx, AV_LOG_ERROR,
"No such backreference! Buggy sample.\n");
@@ -313,7 +316,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
} else {
ff_thread_await_progress(&ctx->frames[ctx->prev_index],
cur_row, 0);
- ctx->dsp.put_pixels_tab[1][0](dst, src, stride, 8);
+ ctx->hdsp.put_pixels_tab[1][0](dst, src, stride, 8);
}
src += 8;
dst += 8;