diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 06:03:58 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-25 06:03:58 +0400 |
commit | d312ffdd79bd22b5a051790c993eda6b1366cdfc (patch) | |
tree | b61a29485179bef208f5d13b37549eae5f6b5366 /libavcodec/mpegvideo.c | |
parent | 1a535fc477cdff811a4bb19fb39046fdcc477fe0 (diff) |
mpegvideo: fix lowres on field pictures
Fixes Ticket1846
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 7b4a48606e..1bf8c6e85e 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2092,17 +2092,17 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s, if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || (unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - h, 0)) { s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, - s->linesize, 17, 17 + field_based, + linesize >> field_based, 17, 17 + field_based, src_x, src_y << field_based, h_edge_pos, v_edge_pos); ptr_y = s->edge_emu_buffer; if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) { uint8_t *uvbuf = s->edge_emu_buffer + 18 * s->linesize; - s->dsp.emulated_edge_mc(uvbuf , ptr_cb, s->uvlinesize, 9, + s->dsp.emulated_edge_mc(uvbuf , ptr_cb, uvlinesize >> field_based, 9, 9 + field_based, uvsrc_x, uvsrc_y << field_based, h_edge_pos >> 1, v_edge_pos >> 1); - s->dsp.emulated_edge_mc(uvbuf + 16, ptr_cr, s->uvlinesize, 9, + s->dsp.emulated_edge_mc(uvbuf + 16, ptr_cr, uvlinesize >> field_based, 9, 9 + field_based, uvsrc_x, uvsrc_y << field_based, h_edge_pos >> 1, v_edge_pos >> 1); |