[FFmpeg-cvslog] avcodec/mpegvideo: Fix block height for lowres 3 interlaced blocks
Michael Niedermayer
git at videolan.org
Tue May 14 01:54:57 CEST 2013
ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Wed May 8 01:17:45 2013 +0200| [d8c4ee6feaef4cb6843a45301c07c72001ca1572] | committer: Michael Niedermayer
avcodec/mpegvideo: Fix block height for lowres 3 interlaced blocks
Fixes green trash
Fixes part of Ticket2535
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit bca50e5cd52240d885afeb3edb0fa2c74b352add)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d8c4ee6feaef4cb6843a45301c07c72001ca1572
---
libavcodec/mpegvideo.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 9e1f67c..2317f64 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2125,11 +2125,12 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
+ int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
uvsx = (uvsx << 2) >> lowres;
uvsy = (uvsy << 2) >> lowres;
- if (h >> s->chroma_y_shift) {
- pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
- pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
+ if (hc) {
+ pix_op[op_index](dest_cb, ptr_cb, uvlinesize, hc, uvsx, uvsy);
+ pix_op[op_index](dest_cr, ptr_cr, uvlinesize, hc, uvsx, uvsy);
}
}
// FIXME h261 lowres loop filter
More information about the ffmpeg-cvslog
mailing list