diff options
author | Ronald S. Bultje <rbultje@gmail.com> | 2013-10-14 03:13:10 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-11-15 10:16:27 +0100 |
commit | 458446acfa1441d283dacf9e6e545beb083b8bb0 (patch) | |
tree | 49178dd81fe5208c996c942fb0c7e7a08f2e51db /libavcodec/wmv2.c | |
parent | 3cbe1126530449336e2ce59b194bdb8c4eb4abb4 (diff) | |
download | ffmpeg-458446acfa1441d283dacf9e6e545beb083b8bb0.tar.gz |
lavc: Edge emulation with dst/src linesize
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
Diffstat (limited to 'libavcodec/wmv2.c')
-rw-r--r-- | libavcodec/wmv2.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index f4bc907740..b3307763a0 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -120,8 +120,12 @@ void ff_mspel_motion(MpegEncContext *s, if(s->flags&CODEC_FLAG_EMU_EDGE){ if(src_x<1 || src_y<1 || src_x + 17 >= s->h_edge_pos || src_y + h+1 >= v_edge_pos){ - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr - 1 - s->linesize, s->linesize, 19, 19, - src_x-1, src_y-1, s->h_edge_pos, s->v_edge_pos); + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, + ptr - 1 - s->linesize, + s->linesize, s->linesize, + 19, 19, + src_x - 1, src_y - 1, + s->h_edge_pos, s->v_edge_pos); ptr= s->edge_emu_buffer + 1 + s->linesize; emu=1; } @@ -161,16 +165,22 @@ void ff_mspel_motion(MpegEncContext *s, offset = (src_y * uvlinesize) + src_x; ptr = ref_picture[1] + offset; if(emu){ - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, - src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); + 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; } pix_op[1][dxy](dest_cb, ptr, uvlinesize, h >> 1); ptr = ref_picture[2] + offset; if(emu){ - s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, - src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); + 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; } pix_op[1][dxy](dest_cr, ptr, uvlinesize, h >> 1); |