diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-09-20 08:01:19 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2013-09-28 20:28:08 -0400 |
commit | face578d56c2d1375e40d5e2a28acc122132bc55 (patch) | |
tree | 8a4fe63c8066b59ea41dd09285b4a82587a65030 /libavcodec/wmv2.c | |
parent | f574b4da567cc1c175ab5463fb5b3901cbaa5595 (diff) | |
download | ffmpeg-face578d56c2d1375e40d5e2a28acc122132bc55.tar.gz |
Rewrite emu_edge functions to have separate src/dst_stride arguments.
This allows supporting files for which the image stride is smaller than
the max. 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 | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index eea819bfdb..8d30259b15 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -119,8 +119,10 @@ void ff_mspel_motion(MpegEncContext *s, 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, s->linesize, + ptr - 1 - 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; } @@ -159,16 +161,18 @@ 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, s->uvlinesize, + ptr, 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, s->uvlinesize, + ptr, 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); |