aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-22 03:30:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-22 03:32:08 +0200
commit33adcdb53118df8f281742b75adf861cda64801a (patch)
tree99df13bfaa2556aa492977829c0447088a140f06 /libavcodec
parentaf2ed4b7488468abc8ccdd1b45d810886a609e1e (diff)
downloadffmpeg-33adcdb53118df8f281742b75adf861cda64801a.tar.gz
mpeg2dec: Fix lowres 3
Fixes ticket212 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 0a0a11ebc9..d210865d29 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1722,8 +1722,10 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){
uvsx= (uvsx << 2) >> lowres;
uvsy= (uvsy << 2) >> lowres;
- 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(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);
+ }
}
//FIXME h261 lowres loop filter
}