Commit bca50e5c authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegvideo: Fix block height for lowres 3 interlaced blocks

Fixes green trash
Fixes part of Ticket2535
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bc0cbaca
...@@ -2349,11 +2349,12 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s, ...@@ -2349,11 +2349,12 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy); pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) { if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
uvsx = (uvsx << 2) >> lowres; uvsx = (uvsx << 2) >> lowres;
uvsy = (uvsy << 2) >> lowres; uvsy = (uvsy << 2) >> lowres;
if (h >> s->chroma_y_shift) { if (hc) {
pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy); pix_op[op_index](dest_cb, ptr_cb, uvlinesize, hc, uvsx, uvsy);
pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy); pix_op[op_index](dest_cr, ptr_cr, uvlinesize, hc, uvsx, uvsy);
} }
} }
// FIXME h261 lowres loop filter // FIXME h261 lowres loop filter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment