aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/motion_est.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-03-10 13:55:07 -0700
committerMichael Niedermayer <michaelni@gmx.at>2013-03-13 03:58:00 +0100
commit4ba5dbc0e4dc8737c71af77b6a5a905d6de2b76b (patch)
tree9022230c0b60013c132020a1c260ab63f1924ea0 /libavcodec/motion_est.c
parent46523897774cc0a748dab3be66df9b4cacc7233f (diff)
downloadffmpeg-4ba5dbc0e4dc8737c71af77b6a5a905d6de2b76b.tar.gz
mpegvideo: use hpeldsp instead of dsputil for half-pel functions.
This also converts vc1, since that is mpegvideo-based.
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r--libavcodec/motion_est.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index faccfbb25e..dc8e39b581 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -338,9 +338,9 @@ int ff_init_me(MpegEncContext *s){
else
c->sub_motion_search= hpel_motion_search;
}
- c->hpel_avg= s->dsp.avg_pixels_tab;
- if(s->no_rounding) c->hpel_put= s->dsp.put_no_rnd_pixels_tab;
- else c->hpel_put= s->dsp.put_pixels_tab;
+ c->hpel_avg= s->hdsp.avg_pixels_tab;
+ if(s->no_rounding) c->hpel_put= s->hdsp.put_no_rnd_pixels_tab;
+ else c->hpel_put= s->hdsp.put_pixels_tab;
if(s->linesize){
c->stride = s->linesize;
@@ -640,9 +640,9 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift)
dxy = ((my4 & 1) << 1) | (mx4 & 1);
if(s->no_rounding)
- s->dsp.put_no_rnd_pixels_tab[1][dxy](dest_y , ref , stride, h);
+ s->hdsp.put_no_rnd_pixels_tab[1][dxy](dest_y , ref , stride, h);
else
- s->dsp.put_pixels_tab [1][dxy](dest_y , ref , stride, h);
+ s->hdsp.put_pixels_tab [1][dxy](dest_y , ref , stride, h);
}
dmin_sum+= (mv_penalty[mx4-pred_x4] + mv_penalty[my4-pred_y4])*c->mb_penalty_factor;
}else
@@ -681,11 +681,11 @@ static inline int h263_mv4_search(MpegEncContext *s, int mx, int my, int shift)
offset= (s->mb_x*8 + (mx>>1)) + (s->mb_y*8 + (my>>1))*s->uvlinesize;
if(s->no_rounding){
- s->dsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad , s->last_picture.f.data[1] + offset, s->uvlinesize, 8);
- s->dsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad + 8, s->last_picture.f.data[2] + offset, s->uvlinesize, 8);
+ s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad , s->last_picture.f.data[1] + offset, s->uvlinesize, 8);
+ s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad + 8, s->last_picture.f.data[2] + offset, s->uvlinesize, 8);
}else{
- s->dsp.put_pixels_tab [1][dxy](c->scratchpad , s->last_picture.f.data[1] + offset, s->uvlinesize, 8);
- s->dsp.put_pixels_tab [1][dxy](c->scratchpad + 8, s->last_picture.f.data[2] + offset, s->uvlinesize, 8);
+ s->hdsp.put_pixels_tab [1][dxy](c->scratchpad , s->last_picture.f.data[1] + offset, s->uvlinesize, 8);
+ s->hdsp.put_pixels_tab [1][dxy](c->scratchpad + 8, s->last_picture.f.data[2] + offset, s->uvlinesize, 8);
}
dmin_sum += s->dsp.mb_cmp[1](s, s->new_picture.f.data[1] + s->mb_x*8 + s->mb_y*8*s->uvlinesize, c->scratchpad , s->uvlinesize, 8);
@@ -793,9 +793,9 @@ static int interlaced_search(MpegEncContext *s, int ref_index,
dxy = ((my_i & 1) << 1) | (mx_i & 1);
if(s->no_rounding){
- s->dsp.put_no_rnd_pixels_tab[size][dxy](c->scratchpad, ref , stride, h);
+ s->hdsp.put_no_rnd_pixels_tab[size][dxy](c->scratchpad, ref , stride, h);
}else{
- s->dsp.put_pixels_tab [size][dxy](c->scratchpad, ref , stride, h);
+ s->hdsp.put_pixels_tab [size][dxy](c->scratchpad, ref , stride, h);
}
dmin= s->dsp.mb_cmp[size](s, c->src[block][0], c->scratchpad, stride, h);
dmin+= (mv_penalty[mx_i-c->pred_x] + mv_penalty[my_i-c->pred_y] + 1)*c->mb_penalty_factor;
@@ -1236,14 +1236,14 @@ static inline int check_bidir_mv(MpegEncContext * s,
src_y = motion_fy >> 1;
ptr = ref_data[0] + (src_y * stride) + src_x;
- s->dsp.put_pixels_tab[size][dxy](dest_y , ptr , stride, h);
+ s->hdsp.put_pixels_tab[size][dxy](dest_y , ptr , stride, h);
dxy = ((motion_by & 1) << 1) | (motion_bx & 1);
src_x = motion_bx >> 1;
src_y = motion_by >> 1;
ptr = ref2_data[0] + (src_y * stride) + src_x;
- s->dsp.avg_pixels_tab[size][dxy](dest_y , ptr , stride, h);
+ s->hdsp.avg_pixels_tab[size][dxy](dest_y , ptr , stride, h);
}
fbmin = (mv_penalty_f[motion_fx-pred_fx] + mv_penalty_f[motion_fy-pred_fy])*c->mb_penalty_factor