[FFmpeg-devel] [PATCH 15/33] mimic: use hpeldsp.

Ronald S. Bultje rsbultje at gmail.com
Wed Feb 6 04:27:28 CET 2013


From: "Ronald S. Bultje" <rsbultje at gmail.com>

---
 configure          | 1 +
 libavcodec/mimic.c | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 15de012..17f7fe6 100755
--- a/configure
+++ b/configure
@@ -1694,6 +1694,7 @@ jpegls_encoder_select="golomb"
 ljpeg_encoder_select="aandcttables mpegvideoenc"
 loco_decoder_select="golomb"
 mdec_decoder_select="error_resilience mpegvideo"
+mimic_decoder_select="hpeldsp"
 mjpeg_encoder_select="aandcttables mpegvideoenc"
 mlp_decoder_select="mlp_parser"
 mp1_decoder_select="mpegaudio"
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 54d27e8..77ae2cd 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 */
@@ -123,6 +125,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);
 
     return 0;
@@ -268,7 +271,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");
@@ -277,7 +280,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
                 } else {
                     ff_thread_await_progress(&ctx->buf_ptrs[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;
-- 
1.7.11.3



More information about the ffmpeg-devel mailing list