diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-07-17 11:04:26 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-07-17 11:04:26 +0000 |
commit | 4c9ede2e4bef23592d124324a11c5237e5063c8a (patch) | |
tree | a76f2797a1977523c9b8df8c57c5fe5d95882767 | |
parent | cc504d3c3c3e11d58b381865ebee891b0f3c2d6e (diff) | |
download | ffmpeg-4c9ede2e4bef23592d124324a11c5237e5063c8a.tar.gz |
interlaced mpeg2 fix ... replacing linesize>>1 by uvlinesize brainlessly wasnt a good idea
Originally committed as revision 771 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegvideo.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 38de3d831e..69788e97c8 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -992,7 +992,7 @@ static inline void mpeg_motion(MpegEncContext *s, int motion_x, int motion_y, int h) { UINT8 *ptr; - int dxy, offset, mx, my, src_x, src_y, height, linesize; + int dxy, offset, mx, my, src_x, src_y, height, linesize, uvlinesize; int emu=0; if(s->quarter_sample) @@ -1012,7 +1012,8 @@ if(s->quarter_sample) src_y = clip(src_y, -16, height); if (src_y == height) dxy &= ~2; - linesize = s->linesize << field_based; + linesize = s->linesize << field_based; + uvlinesize = s->uvlinesize << field_based; ptr = ref_picture[0] + (src_y * linesize) + (src_x) + src_offset; dest_y += dest_offset; @@ -1053,21 +1054,20 @@ if(s->quarter_sample) src_y = clip(src_y, -8, height >> 1); if (src_y == (height >> 1)) dxy &= ~2; - - offset = (src_y * s->uvlinesize) + src_x + (src_offset >> 1); + offset = (src_y * uvlinesize) + src_x + (src_offset >> 1); ptr = ref_picture[1] + offset; if(emu){ - emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, (h>>1)+1, src_x, src_y, s->width>>1, height>>1); + emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, (h>>1)+1, src_x, src_y, s->width>>1, height>>1); ptr= s->edge_emu_buffer; } - pix_op[dxy](dest_cb + (dest_offset >> 1), ptr, s->uvlinesize, h >> 1); + pix_op[dxy](dest_cb + (dest_offset >> 1), ptr, uvlinesize, h >> 1); ptr = ref_picture[2] + offset; if(emu){ - emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, (h>>1)+1, src_x, src_y, s->width>>1, height>>1); + emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, (h>>1)+1, src_x, src_y, s->width>>1, height>>1); ptr= s->edge_emu_buffer; } - pix_op[dxy](dest_cr + (dest_offset >> 1), ptr, s->uvlinesize, h >> 1); + pix_op[dxy](dest_cr + (dest_offset >> 1), ptr, uvlinesize, h >> 1); } static inline void qpel_motion(MpegEncContext *s, |