# HG changeset patch # User bellard # Date 1044215500 0 # Node ID e308ea014922f1eaaa5900b8b551c69b7c50aebb # Parent 45308962220f2733d2f8099ecc372d2bd7a40ee7 fixed copy diff -r 45308962220f -r e308ea014922 jpeg.c --- a/jpeg.c Sun Feb 02 19:18:09 2003 +0000 +++ b/jpeg.c Sun Feb 02 19:51:40 2003 +0000 @@ -125,11 +125,11 @@ switch(c->pix_fmt) { default: case PIX_FMT_YUV420P: - w >>= 1; - h >>= 1; + w = (w + 1) >> 1; + h = (h + 1) >> 1; break; case PIX_FMT_YUV422P: - w >>= 1; + w = (w + 1) >> 1; break; case PIX_FMT_YUV444P: break;