Mercurial > mplayer.hg
changeset 4706:a4400910be9f
yv12 slices fix by Robert Kesterson <robertk@robertk.com>
author | arpi |
---|---|
date | Thu, 14 Feb 2002 22:31:21 +0000 |
parents | f6d45a3f005c |
children | af6fe94d455b |
files | libvo/vo_yuv4mpeg.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_yuv4mpeg.c Thu Feb 14 22:15:53 2002 +0000 +++ b/libvo/vo_yuv4mpeg.c Thu Feb 14 22:31:21 2002 +0000 @@ -108,18 +108,19 @@ } { // copy U + V: + int imgstride = image_width >> 1; uint8_t *src1 = srcimg[1]; uint8_t *src2 = srcimg[2]; - uint8_t *dstu = image_u + image_width * (y / 2) + (x / 2); - uint8_t *dstv = image_v + image_width * (y / 2) + (x / 2); + uint8_t *dstu = image_u + imgstride * (y >> 1) + (x >> 1); + uint8_t *dstv = image_v + imgstride * (y >> 1) + (x >> 1); for (i = 0; i < h / 2; i++) { - memcpy(dstu, src1 , w / 2); - memcpy(dstv, src2, w / 2); + memcpy(dstu, src1 , w >> 1); + memcpy(dstv, src2, w >> 1); src1 += stride[1]; src2 += stride[2]; - dstu += image_width / 2; - dstv += image_width / 2; + dstu += imgstride; + dstv += imgstride; } } } @@ -154,7 +155,6 @@ rgb24toyv12(src[0], image_y, image_u, image_v, image_width, image_height, image_width, image_width / 2, image_width * 3); -// RGB2YUV(image_width, image_height, src[0], image_y, image_u, image_v, 1); } break; }