diff options
Diffstat (limited to 'libavcodec/wmv2.c')
-rw-r--r-- | libavcodec/wmv2.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c index 4420f494a6..8d30259b15 100644 --- a/libavcodec/wmv2.c +++ b/libavcodec/wmv2.c @@ -1,20 +1,20 @@ /* - * Copyright (c) 2002 The Libav Project + * Copyright (c) 2002 The FFmpeg Project * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -94,7 +94,8 @@ void ff_mspel_motion(MpegEncContext *s, { Wmv2Context * const w= (Wmv2Context*)s; uint8_t *ptr; - int dxy, offset, mx, my, src_x, src_y, v_edge_pos, linesize, uvlinesize; + int dxy, mx, my, src_x, src_y, v_edge_pos; + ptrdiff_t offset, linesize, uvlinesize; int emu=0; dxy = ((motion_y & 1) << 1) | (motion_x & 1); @@ -116,15 +117,15 @@ void ff_mspel_motion(MpegEncContext *s, uvlinesize = s->uvlinesize; ptr = ref_picture[0] + (src_y * linesize) + src_x; - 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, 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; } - } s->dsp.put_mspel_pixels_tab[dxy](dest_y , ptr , linesize); s->dsp.put_mspel_pixels_tab[dxy](dest_y+8 , ptr+8 , linesize); @@ -160,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); |