summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_motion.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-15 13:56:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-15 15:07:10 +0100
commit91e00c4a785d3f4cd44f1044d3e7b1b34fee8b5c (patch)
treea866df7014974a63c167522f426dc53596d3c77b /libavcodec/mpegvideo_motion.c
parente28130bcaf48281b431ea611a546e7520bb90dda (diff)
parent458446acfa1441d283dacf9e6e545beb083b8bb0 (diff)
downloadffmpeg-91e00c4a785d3f4cd44f1044d3e7b1b34fee8b5c.tar.gz
Merge commit '458446acfa1441d283dacf9e6e545beb083b8bb0'
* commit '458446acfa1441d283dacf9e6e545beb083b8bb0': lavc: Edge emulation with dst/src linesize Conflicts: libavcodec/cavs.c libavcodec/h264.c libavcodec/hevc.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/rv34.c libavcodec/svq3.c libavcodec/vc1dec.c libavcodec/videodsp.h libavcodec/videodsp_template.c libavcodec/vp3.c libavcodec/vp8.c libavcodec/wmv2.c libavcodec/x86/videodsp.asm libavcodec/x86/videodsp_init.c Changes to the asm are not merged, they are left for volunteers or in their absence for later. The changes this merge introduces are reordering of the function arguments See: face578d56c2d1375e40d5e2a28acc122132bc55 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_motion.c')
-rw-r--r--libavcodec/mpegvideo_motion.c56
1 files changed, 26 insertions, 30 deletions
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index 48bfe5d52a..9ec3789058 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -62,8 +62,8 @@ static void gmc1_motion(MpegEncContext *s,
if ((unsigned)src_x >= FFMAX(s->h_edge_pos - 17, 0) ||
(unsigned)src_y >= FFMAX(s->v_edge_pos - 17, 0)) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer, linesize, ptr,
- linesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr,
+ linesize, linesize,
17, 17,
src_x, src_y,
s->h_edge_pos, s->v_edge_pos);
@@ -106,8 +106,8 @@ static void gmc1_motion(MpegEncContext *s,
ptr = ref_picture[1] + offset;
if ((unsigned)src_x >= FFMAX((s->h_edge_pos >> 1) - 9, 0) ||
(unsigned)src_y >= FFMAX((s->v_edge_pos >> 1) - 9, 0)) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer, uvlinesize,
- ptr, uvlinesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr,
+ uvlinesize, uvlinesize,
9, 9,
src_x, src_y,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
@@ -119,8 +119,8 @@ static void gmc1_motion(MpegEncContext *s,
ptr = ref_picture[2] + offset;
if (emu) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer, uvlinesize,
- ptr, uvlinesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr,
+ uvlinesize, uvlinesize,
9, 9,
src_x, src_y,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
@@ -212,8 +212,8 @@ static inline int hpel_motion(MpegEncContext *s,
if (s->flags & CODEC_FLAG_EMU_EDGE) {
if ((unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x & 1) - 8, 0) ||
(unsigned)src_y > FFMAX(s->v_edge_pos - (motion_y & 1) - 8, 0)) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer, s->linesize, src,
- s->linesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, src,
+ s->linesize, s->linesize,
9, 9,
src_x, src_y,
s->h_edge_pos, s->v_edge_pos);
@@ -317,21 +317,21 @@ void mpeg_motion_internal(MpegEncContext *s,
src_y);
return;
}
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer, s->linesize, ptr_y,
- s->linesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y,
+ s->linesize, s->linesize,
17, 17 + field_based,
src_x, src_y << field_based,
s->h_edge_pos, s->v_edge_pos);
ptr_y = s->edge_emu_buffer;
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize;
- s->vdsp.emulated_edge_mc(uvbuf, s->uvlinesize, ptr_cb,
- s->uvlinesize,
+ s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
+ s->uvlinesize, s->uvlinesize,
9, 9 + field_based,
uvsrc_x, uvsrc_y << field_based,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
- s->vdsp.emulated_edge_mc(uvbuf + 16, s->uvlinesize, ptr_cr,
- s->uvlinesize,
+ s->vdsp.emulated_edge_mc(uvbuf + 16, ptr_cr,
+ s->uvlinesize, s->uvlinesize,
9, 9 + field_based,
uvsrc_x, uvsrc_y << field_based,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
@@ -538,24 +538,21 @@ static inline void qpel_motion(MpegEncContext *s,
if ((unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x & 3) - 16, 0) ||
(unsigned)src_y > FFMAX( v_edge_pos - (motion_y & 3) - h, 0)) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer,
- s->linesize,
- ptr_y, s->linesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y,
+ s->linesize, s->linesize,
17, 17 + field_based,
src_x, src_y << field_based,
s->h_edge_pos, s->v_edge_pos);
ptr_y = s->edge_emu_buffer;
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize;
- s->vdsp.emulated_edge_mc(uvbuf, s->uvlinesize,
- ptr_cb,
- s->uvlinesize,
+ s->vdsp.emulated_edge_mc(uvbuf, ptr_cb,
+ s->uvlinesize, s->uvlinesize,
9, 9 + field_based,
uvsrc_x, uvsrc_y << field_based,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
- s->vdsp.emulated_edge_mc(uvbuf + 16, s->uvlinesize,
- ptr_cr,
- s->uvlinesize,
+ s->vdsp.emulated_edge_mc(uvbuf + 16, ptr_cr,
+ s->uvlinesize, s->uvlinesize,
9, 9 + field_based,
uvsrc_x, uvsrc_y << field_based,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
@@ -625,8 +622,8 @@ static void chroma_4mv_motion(MpegEncContext *s,
if (s->flags & CODEC_FLAG_EMU_EDGE) {
if ((unsigned)src_x > FFMAX((s->h_edge_pos >> 1) - (dxy & 1) - 8, 0) ||
(unsigned)src_y > FFMAX((s->v_edge_pos >> 1) - (dxy >> 1) - 8, 0)) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer, s->uvlinesize,
- ptr, s->uvlinesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr,
+ s->uvlinesize, s->uvlinesize,
9, 9, src_x, src_y,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
ptr = s->edge_emu_buffer;
@@ -637,8 +634,8 @@ static void chroma_4mv_motion(MpegEncContext *s,
ptr = ref_picture[2] + offset;
if (emu) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer, s->uvlinesize,
- ptr, s->uvlinesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr,
+ s->uvlinesize, s->uvlinesize,
9, 9, src_x, src_y,
s->h_edge_pos >> 1, s->v_edge_pos >> 1);
ptr = s->edge_emu_buffer;
@@ -785,9 +782,8 @@ static inline void apply_8x8(MpegEncContext *s,
if (s->flags & CODEC_FLAG_EMU_EDGE) {
if ((unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x & 3) - 8, 0) ||
(unsigned)src_y > FFMAX(s->v_edge_pos - (motion_y & 3) - 8, 0)) {
- s->vdsp.emulated_edge_mc(s->edge_emu_buffer,
- s->linesize, ptr,
- s->linesize,
+ s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr,
+ s->linesize, s->linesize,
9, 9,
src_x, src_y,
s->h_edge_pos,