svq3: Use hpeldsp instead of dsputil for half-pel functions
authorRonald S. Bultje <rsbultje@gmail.com>
Sun, 10 Mar 2013 21:12:58 +0000 (14:12 -0700)
committerMartin Storsjö <martin@martin.st>
Fri, 19 Apr 2013 20:18:27 +0000 (23:18 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
configure
libavcodec/svq3.c

index 429bf1f..50d2cc8 100755 (executable)
--- a/configure
+++ b/configure
@@ -1642,7 +1642,7 @@ sipr_decoder_select="lsp"
 sp5x_decoder_select="dsputil"
 svq1_decoder_select="hpeldsp"
 svq1_encoder_select="aandcttables dsputil mpegvideoenc"
 sp5x_decoder_select="dsputil"
 svq1_decoder_select="hpeldsp"
 svq1_encoder_select="aandcttables dsputil mpegvideoenc"
-svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo videodsp"
+svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel hpeldsp mpegvideo videodsp"
 svq3_decoder_suggest="error_resilience zlib"
 tak_decoder_select="dsputil"
 theora_decoder_select="vp3_decoder"
 svq3_decoder_suggest="error_resilience zlib"
 tak_decoder_select="dsputil"
 theora_decoder_select="vp3_decoder"
index 0c3af86..1ecc1b2 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "h264_mvpred.h"
 #include "golomb.h"
 
 #include "h264_mvpred.h"
 #include "golomb.h"
+#include "hpeldsp.h"
 #include "rectangle.h"
 #include "vdpau_internal.h"
 
 #include "rectangle.h"
 #include "vdpau_internal.h"
 
@@ -65,6 +66,7 @@
 
 typedef struct {
     H264Context h;
 
 typedef struct {
     H264Context h;
+    HpelDSPContext hdsp;
     Picture *cur_pic;
     Picture *next_pic;
     Picture *last_pic;
     Picture *cur_pic;
     Picture *next_pic;
     Picture *last_pic;
@@ -312,9 +314,9 @@ static inline void svq3_mc_dir_part(SVQ3Context *s,
              : h->dsp.put_tpel_pixels_tab)[dxy](dest, src, h->linesize,
                                                 width, height);
     else
              : h->dsp.put_tpel_pixels_tab)[dxy](dest, src, h->linesize,
                                                 width, height);
     else
-        (avg ? h->dsp.avg_pixels_tab
-             : h->dsp.put_pixels_tab)[blocksize][dxy](dest, src, h->linesize,
-                                                      height);
+        (avg ? s->hdsp.avg_pixels_tab
+             : s->hdsp.put_pixels_tab)[blocksize][dxy](dest, src, h->linesize,
+                                                       height);
 
     if (!(h->flags & CODEC_FLAG_GRAY)) {
         mx     = mx + (mx < (int) x) >> 1;
 
     if (!(h->flags & CODEC_FLAG_GRAY)) {
         mx     = mx + (mx < (int) x) >> 1;
@@ -340,10 +342,10 @@ static inline void svq3_mc_dir_part(SVQ3Context *s,
                                                         h->uvlinesize,
                                                         width, height);
             else
                                                         h->uvlinesize,
                                                         width, height);
             else
-                (avg ? h->dsp.avg_pixels_tab
-                     : h->dsp.put_pixels_tab)[blocksize][dxy](dest, src,
-                                                              h->uvlinesize,
-                                                              height);
+                (avg ? s->hdsp.avg_pixels_tab
+                     : s->hdsp.put_pixels_tab)[blocksize][dxy](dest, src,
+                                                               h->uvlinesize,
+                                                               height);
         }
     }
 }
         }
     }
 }
@@ -865,6 +867,7 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx)
     if (ff_h264_decode_init(avctx) < 0)
         return -1;
 
     if (ff_h264_decode_init(avctx) < 0)
         return -1;
 
+    ff_hpeldsp_init(&s->hdsp, avctx->flags);
     h->flags           = avctx->flags;
     h->is_complex      = 1;
     h->picture_structure = PICT_FRAME;
     h->flags           = avctx->flags;
     h->is_complex      = 1;
     h->picture_structure = PICT_FRAME;