mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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
This commit is contained in:
parent
cc504d3c3c
commit
4c9ede2e4b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user