aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo_motion.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-23 20:59:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-23 21:10:10 +0200
commitd7463c681363d6057601e705d0bf775738529841 (patch)
tree5aaab61d15d220df649ead3e432c36f72219ab2a /libavcodec/mpegvideo_motion.c
parent32cf26cc6a0dc1425ed60b8ac99552fd858fab9b (diff)
parentfab9df63a3156ffe1f9490aafaea41e03ef60ddf (diff)
downloadffmpeg-d7463c681363d6057601e705d0bf775738529841.tar.gz
Merge commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf'
* commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf': dsputil: Split off global motion compensation bits into a separate context Conflicts: libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/ppc/dsputil_altivec.h libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_motion.c')
-rw-r--r--libavcodec/mpegvideo_motion.c67
1 files changed, 33 insertions, 34 deletions
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index b006b99002..0d3ba08dee 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -26,7 +26,6 @@
#include "libavutil/avassert.h"
#include "libavutil/internal.h"
#include "avcodec.h"
-#include "dsputil.h"
#include "h261.h"
#include "mpegutils.h"
#include "mpegvideo.h"
@@ -73,10 +72,10 @@ static void gmc1_motion(MpegEncContext *s,
}
if ((motion_x | motion_y) & 7) {
- s->dsp.gmc1(dest_y, ptr, linesize, 16,
- motion_x & 15, motion_y & 15, 128 - s->no_rounding);
- s->dsp.gmc1(dest_y + 8, ptr + 8, linesize, 16,
- motion_x & 15, motion_y & 15, 128 - s->no_rounding);
+ s->mdsp.gmc1(dest_y, ptr, linesize, 16,
+ motion_x & 15, motion_y & 15, 128 - s->no_rounding);
+ s->mdsp.gmc1(dest_y + 8, ptr + 8, linesize, 16,
+ motion_x & 15, motion_y & 15, 128 - s->no_rounding);
} else {
int dxy;
@@ -116,8 +115,8 @@ static void gmc1_motion(MpegEncContext *s,
ptr = s->edge_emu_buffer;
emu = 1;
}
- s->dsp.gmc1(dest_cb, ptr, uvlinesize, 8,
- motion_x & 15, motion_y & 15, 128 - s->no_rounding);
+ s->mdsp.gmc1(dest_cb, ptr, uvlinesize, 8,
+ motion_x & 15, motion_y & 15, 128 - s->no_rounding);
ptr = ref_picture[2] + offset;
if (emu) {
@@ -128,8 +127,8 @@ static void gmc1_motion(MpegEncContext *s,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
ptr = s->edge_emu_buffer;
}
- s->dsp.gmc1(dest_cr, ptr, uvlinesize, 8,
- motion_x & 15, motion_y & 15, 128 - s->no_rounding);
+ s->mdsp.gmc1(dest_cr, ptr, uvlinesize, 8,
+ motion_x & 15, motion_y & 15, 128 - s->no_rounding);
}
static void gmc_motion(MpegEncContext *s,
@@ -151,19 +150,19 @@ static void gmc_motion(MpegEncContext *s,
oy = s->sprite_offset[0][1] + s->sprite_delta[1][0] * s->mb_x * 16 +
s->sprite_delta[1][1] * s->mb_y * 16;
- s->dsp.gmc(dest_y, ptr, linesize, 16,
- ox, oy,
- s->sprite_delta[0][0], s->sprite_delta[0][1],
- s->sprite_delta[1][0], s->sprite_delta[1][1],
- a + 1, (1 << (2 * a + 1)) - s->no_rounding,
- s->h_edge_pos, s->v_edge_pos);
- s->dsp.gmc(dest_y + 8, ptr, linesize, 16,
- ox + s->sprite_delta[0][0] * 8,
- oy + s->sprite_delta[1][0] * 8,
- s->sprite_delta[0][0], s->sprite_delta[0][1],
- s->sprite_delta[1][0], s->sprite_delta[1][1],
- a + 1, (1 << (2 * a + 1)) - s->no_rounding,
- s->h_edge_pos, s->v_edge_pos);
+ s->mdsp.gmc(dest_y, ptr, linesize, 16,
+ ox, oy,
+ s->sprite_delta[0][0], s->sprite_delta[0][1],
+ s->sprite_delta[1][0], s->sprite_delta[1][1],
+ a + 1, (1 << (2 * a + 1)) - s->no_rounding,
+ s->h_edge_pos, s->v_edge_pos);
+ s->mdsp.gmc(dest_y + 8, ptr, linesize, 16,
+ ox + s->sprite_delta[0][0] * 8,
+ oy + s->sprite_delta[1][0] * 8,
+ s->sprite_delta[0][0], s->sprite_delta[0][1],
+ s->sprite_delta[1][0], s->sprite_delta[1][1],
+ a + 1, (1 << (2 * a + 1)) - s->no_rounding,
+ s->h_edge_pos, s->v_edge_pos);
if (CONFIG_GRAY && s->flags & CODEC_FLAG_GRAY)
return;
@@ -174,20 +173,20 @@ static void gmc_motion(MpegEncContext *s,
s->sprite_delta[1][1] * s->mb_y * 8;
ptr = ref_picture[1];
- s->dsp.gmc(dest_cb, ptr, uvlinesize, 8,
- ox, oy,
- s->sprite_delta[0][0], s->sprite_delta[0][1],
- s->sprite_delta[1][0], s->sprite_delta[1][1],
- a + 1, (1 << (2 * a + 1)) - s->no_rounding,
- s->h_edge_pos >> 1, s->v_edge_pos >> 1);
+ s->mdsp.gmc(dest_cb, ptr, uvlinesize, 8,
+ ox, oy,
+ s->sprite_delta[0][0], s->sprite_delta[0][1],
+ s->sprite_delta[1][0], s->sprite_delta[1][1],
+ a + 1, (1 << (2 * a + 1)) - s->no_rounding,
+ s->h_edge_pos >> 1, s->v_edge_pos >> 1);
ptr = ref_picture[2];
- s->dsp.gmc(dest_cr, ptr, uvlinesize, 8,
- ox, oy,
- s->sprite_delta[0][0], s->sprite_delta[0][1],
- s->sprite_delta[1][0], s->sprite_delta[1][1],
- a + 1, (1 << (2 * a + 1)) - s->no_rounding,
- s->h_edge_pos >> 1, s->v_edge_pos >> 1);
+ s->mdsp.gmc(dest_cr, ptr, uvlinesize, 8,
+ ox, oy,
+ s->sprite_delta[0][0], s->sprite_delta[0][1],
+ s->sprite_delta[1][0], s->sprite_delta[1][1],
+ a + 1, (1 << (2 * a + 1)) - s->no_rounding,
+ s->h_edge_pos >> 1, s->v_edge_pos >> 1);
}
static inline int hpel_motion(MpegEncContext *s,