diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-03-10 14:16:00 -0700 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-13 03:59:00 +0100 |
commit | b42d594c85d4aac34de00f5f0e3634d5a8d90f56 (patch) | |
tree | 523a0c3f90cf566b6937ef6ad30b469c29b4f295 /libavcodec | |
parent | 771ba8f206e23f753f4f8ab04d2f6251911bfd99 (diff) | |
download | ffmpeg-b42d594c85d4aac34de00f5f0e3634d5a8d90f56.tar.gz |
svq1enc: use hpeldsp instead of dsputil for half-pel functions.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/svq1enc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 7b79bc06b1..cf9157f456 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -27,6 +27,8 @@ */ #include "avcodec.h" +#include "dsputil.h" +#include "hpeldsp.h" #include "mpegvideo.h" #include "h263.h" #include "internal.h" @@ -42,6 +44,7 @@ typedef struct SVQ1Context { MpegEncContext m; AVCodecContext *avctx; DSPContext dsp; + HpelDSPContext hdsp; AVFrame picture; AVFrame current_picture; AVFrame last_picture; @@ -443,7 +446,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, dxy = (mx & 1) + 2 * (my & 1); - s->dsp.put_pixels_tab[0][dxy](temp + 16, + s->hdsp.put_pixels_tab[0][dxy](temp + 16, ref + (mx >> 1) + stride * (my >> 1), stride, 16); @@ -458,7 +461,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, score[2] += vlc[1] * lambda; if (score[2] < score[best] && mx == 0 && my == 0) { best = 2; - s->dsp.put_pixels_tab[0][0](decoded, ref, stride, 16); + s->hdsp.put_pixels_tab[0][0](decoded, ref, stride, 16); for (i = 0; i < 6; i++) count[2][i] = 0; put_bits(&s->pb, vlc[1], vlc[0]); @@ -488,7 +491,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, avpriv_copy_bits(&s->pb, reorder_buffer[best][i], count[best][i]); if (best == 0) - s->dsp.put_pixels_tab[0][0](decoded, temp, stride, 16); + s->hdsp.put_pixels_tab[0][0](decoded, temp, stride, 16); } s->m.first_slice_line = 0; } @@ -500,6 +503,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) SVQ1Context *const s = avctx->priv_data; ff_dsputil_init(&s->dsp, avctx); + ff_hpeldsp_init(&s->hdsp, avctx->flags); avctx->coded_frame = &s->picture; s->frame_width = avctx->width; |