From e17745d976e48cf8c7711443374ae241faafd95e Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 22 Jan 2002 01:43:13 +0000 Subject: - small w32codec bugfixes - remove (hopefully) unneeded memcpy - fix SDL capabilities - add fb and SDL warnings CVS patchset: 1436 CVS date: 2002/01/22 01:43:13 --- src/video_out/alphablend.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/video_out/alphablend.c') diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c index 28c20b53d..ce50a7b21 100644 --- a/src/video_out/alphablend.c +++ b/src/video_out/alphablend.c @@ -394,7 +394,7 @@ static void mem_blend8(uint8_t *mem, uint8_t val, uint8_t o, size_t sz) } } -void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl, +void blend_yuv (uint8_t *dst_base[3], vo_overlay_t * img_overl, int dst_width, int dst_height) { clut_t *my_clut; @@ -413,10 +413,11 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl, int x, y; uint8_t clr=0; - uint8_t *dst_y = dst_img + dst_width * y_off + x_off; - uint8_t *dst_cr = dst_img + dst_width * dst_height + + uint8_t *dst_y = dst_base[0] + dst_width * y_off + x_off; + uint8_t *dst_cr = dst_base[1] + + (y_off / 2) * (dst_width / 2) + (x_off / 2) + 1; + uint8_t *dst_cb = dst_base[2] + (y_off / 2) * (dst_width / 2) + (x_off / 2) + 1; - uint8_t *dst_cb = dst_cr + (dst_width * dst_height) / 4; #ifdef LOG_BLEND_YUV printf("overlay_blend started x=%d, y=%d, w=%d h=%d\n",img_overl->x,img_overl->y,img_overl->width,img_overl->height); #endif -- cgit v1.2.3