diff options
author | uid32519 <none@none> | 2001-07-04 20:32:29 +0000 |
---|---|---|
committer | uid32519 <none@none> | 2001-07-04 20:32:29 +0000 |
commit | 733a94dbd41f79c4a1b7e137bd8e032eebfaf043 (patch) | |
tree | 676ede9ee4bb316870ca7cba71aafab4a8dad864 /src/video_out/alphablend.c | |
parent | 6140dca53aa5cc3d72b851f66360eecee72430e4 (diff) | |
download | xine-lib-733a94dbd41f79c4a1b7e137bd8e032eebfaf043.tar.gz xine-lib-733a94dbd41f79c4a1b7e137bd8e032eebfaf043.tar.bz2 |
latest overlay patches from James, simple overlays should work
CVS patchset: 254
CVS date: 2001/07/04 20:32:29
Diffstat (limited to 'src/video_out/alphablend.c')
-rw-r--r-- | src/video_out/alphablend.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c index ac77fbbce..134c8aac3 100644 --- a/src/video_out/alphablend.c +++ b/src/video_out/alphablend.c @@ -4,6 +4,8 @@ /* * + * Copyright (C) James Courtier-Dutton James@superbug.demon.co.uk - July 2001 + * * Copyright (C) 2000 Thomas Mirlacher * * This program is free software; you can redistribute it and/or modify @@ -249,15 +251,15 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl, int src_width = img_overl->width; int src_height = img_overl->height; uint8_t *src_data = img_overl->data; - + int step=dst_width - src_width; int x_off = img_overl->x; int y_off = img_overl->y; uint8_t *dst_y = dst_img + dst_width * y_off + x_off; uint8_t *dst_cr = dst_img + dst_width * dst_height + - (y_off / 2) * (dst_width / 2) + (x_off / 2); + (y_off / 2) * (dst_width / 2) + (x_off / 2) + 1; uint8_t *dst_cb = dst_img + (dst_width * dst_height * 5) / 4 + - (y_off / 2) * (dst_width / 2) + (x_off / 2); + (y_off / 2) * (dst_width / 2) + (x_off / 2) + 1; int x, y; @@ -298,11 +300,11 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl, src_data++; } - dst_y += dst_width - src_width; + dst_y += step; if (y & 1) { - dst_cr += (dst_width - src_width) / 2; - dst_cb += (dst_width - src_width) / 2; + dst_cr += (step + 1) / 2; + dst_cb += (step + 1) / 2; } } } |