[08/27] interplayvideo: Use hpeldsp instead of dsputil for half-pel functions

Message ID 1365583975-73297-8-git-send-email-martin@martin.st
State Committed
Commit 8071264f2196d71ff49c3944c33f8d3d83f548f1
Headers show

Commit Message

Martin Storsjö April 10, 2013, 8:52 a.m.
From: "Ronald S. Bultje" <rsbultje@gmail.com>

This makes interplayvideo independent of dsputil.
---
 configure                   |    2 +-
 libavcodec/interplayvideo.c |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Kostya Shishkov April 10, 2013, 9:11 a.m. | #1
On Wed, Apr 10, 2013 at 11:52:36AM +0300, Martin Storsjö wrote:
> From: "Ronald S. Bultje" <rsbultje@gmail.com>
> 
> This makes interplayvideo independent of dsputil.
> ---
>  configure                   |    2 +-
>  libavcodec/interplayvideo.c |   10 +++++-----
>  2 files changed, 6 insertions(+), 6 deletions(-)

looks OK

Patch

diff --git a/configure b/configure
index 22e3b14..2abcf8f 100755
--- a/configure
+++ b/configure
@@ -1579,7 +1579,7 @@  huffyuv_encoder_select="dsputil huffman"
 iac_decoder_select="dsputil fft mdct sinewin"
 imc_decoder_select="dsputil fft mdct sinewin"
 indeo3_decoder_select="hpeldsp"
-interplay_video_decoder_select="dsputil"
+interplay_video_decoder_select="hpeldsp"
 jpegls_decoder_select="dsputil golomb"
 jpegls_encoder_select="golomb"
 jv_decoder_select="dsputil"
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 57035fd..b76fe6d 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -40,7 +40,7 @@ 
 
 #include "avcodec.h"
 #include "bytestream.h"
-#include "dsputil.h"
+#include "hpeldsp.h"
 #define BITSTREAM_READER_LE
 #include "get_bits.h"
 #include "internal.h"
@@ -50,7 +50,7 @@ 
 typedef struct IpvideoContext {
 
     AVCodecContext *avctx;
-    DSPContext dsp;
+    HpelDSPContext hdsp;
     AVFrame *second_last_frame;
     AVFrame *last_frame;
     const unsigned char *decoding_map;
@@ -83,8 +83,8 @@  static int copy_from(IpvideoContext *s, AVFrame *src, AVFrame *dst, int delta_x,
         av_log(s->avctx, AV_LOG_ERROR, "Invalid decode type, corrupted header?\n");
         return AVERROR(EINVAL);
     }
-    s->dsp.put_pixels_tab[!s->is_16bpp][0](s->pixel_ptr, src->data[0] + motion_offset,
-                                           dst->linesize[0], 8);
+    s->hdsp.put_pixels_tab[!s->is_16bpp][0](s->pixel_ptr, src->data[0] + motion_offset,
+                                            dst->linesize[0], 8);
     return 0;
 }
 
@@ -939,7 +939,7 @@  static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
     s->is_16bpp = avctx->bits_per_coded_sample == 16;
     avctx->pix_fmt = s->is_16bpp ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_PAL8;
 
-    ff_dsputil_init(&s->dsp, avctx);
+    ff_hpeldsp_init(&s->hdsp, avctx->flags);
 
     s->last_frame        = av_frame_alloc();
     s->second_last_frame = av_frame_alloc();