diff options
author | Rocky Bernstein <rockyb@users.sourceforge.net> | 2004-02-19 02:50:24 +0000 |
---|---|---|
committer | Rocky Bernstein <rockyb@users.sourceforge.net> | 2004-02-19 02:50:24 +0000 |
commit | 5cb036aff44c2ff274ec38b28382245c5f695689 (patch) | |
tree | b55f5f42c0cf359faddca2c2724bd41e626f8cdf /src/video_out/alphablend.c | |
parent | 8aec8d2b5344d4f748755cfb328fd811a8bfc526 (diff) | |
download | xine-lib-5cb036aff44c2ff274ec38b28382245c5f695689.tar.gz xine-lib-5cb036aff44c2ff274ec38b28382245c5f695689.tar.bz2 |
Mandrake patches from
http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/SPECS/xine-lib/
via Goetz Waschk who reports:
The amd64 patch (xine-lib-1-rc0a-amd64.patch) sets some conservative
CFLAGS for amd64,
the lib64 patch (xine-lib-1-rc0a-lib64.patch) replaces hardcoded
/lib to support the lib64 library dir on amd64,
the directfb patch (xine-lib-1-rc2-no-directfb.patch) adds a
configure option to disable directfb,
the linuxfb patch (xine-lib-1-rc3a-no-linuxfb.patch) does the same
for linux framebuffer and
the 64bit fixes patch (xine-lib-1-rc3-64bit-fixes.patch) doesn't
apply at the moment against the CVS -- demux_ogg.c was not applied.
it includes some 64 bit pointer and other fixes for 64bit architectures.
from Gwenole Beauchesne
I haven't tested other than apply and compile.
CVS patchset: 6174
CVS date: 2004/02/19 02:50:24
Diffstat (limited to 'src/video_out/alphablend.c')
-rw-r--r-- | src/video_out/alphablend.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c index f640fa38a..cbedf3ec8 100644 --- a/src/video_out/alphablend.c +++ b/src/video_out/alphablend.c @@ -944,7 +944,12 @@ void blend_yuy2 (uint8_t * dst_img, vo_overlay_t * img_overl, int x, y; int l; int clip_right; - uint32_t yuy2; + union { + uint32_t value; + uint8_t b[4]; + uint16_t h[2]; + } yuy2; + uint8_t clr = 0; uint8_t *dst_y = dst_img + dst_pitch * y_off + 2 * x_off; @@ -1078,34 +1083,34 @@ void blend_yuy2 (uint8_t * dst_img, vo_overlay_t * img_overl, if (o) { l = rle_this_bite>>1; if( !((x_off+x) & 1) ) { - *(((uint8_t *)&yuy2) + 0) = my_clut[clr].y; - *(((uint8_t *)&yuy2) + 1) = my_clut[clr].cb; - *(((uint8_t *)&yuy2) + 2) = my_clut[clr].y; - *(((uint8_t *)&yuy2) + 3) = my_clut[clr].cr; + yuy2.b[0] = my_clut[clr].y; + yuy2.b[1] = my_clut[clr].cb; + yuy2.b[2] = my_clut[clr].y; + yuy2.b[3] = my_clut[clr].cr; } else { - *(((uint8_t *)&yuy2) + 0) = my_clut[clr].y; - *(((uint8_t *)&yuy2) + 1) = my_clut[clr].cr; - *(((uint8_t *)&yuy2) + 2) = my_clut[clr].y; - *(((uint8_t *)&yuy2) + 3) = my_clut[clr].cb; + yuy2.b[0] = my_clut[clr].y; + yuy2.b[1] = my_clut[clr].cr; + yuy2.b[2] = my_clut[clr].y; + yuy2.b[3] = my_clut[clr].cb; } if (o >= 15) { while(l--) { - *((uint16_t *)dst)++ = *(((uint16_t *)&yuy2) + 0); - *((uint16_t *)dst)++ = *(((uint16_t *)&yuy2) + 1); + *((uint16_t *)dst)++ = yuy2.h[0]; + *((uint16_t *)dst)++ = yuy2.h[1]; } if(rle_this_bite & 1) - *((uint16_t *)dst)++ = *(((uint16_t *)&yuy2) + 0); + *((uint16_t *)dst)++ = yuy2.h[0]; } else { if( l ) { - mem_blend32(dst, (uint8_t *)&yuy2, o, l); + mem_blend32(dst, &yuy2.b[0], o, l); dst += 4*l; } if(rle_this_bite & 1) { - *dst = BLEND_BYTE(*dst, *(((uint8_t *)&yuy2) + 0), o); + *dst = BLEND_BYTE(*dst, yuy2.b[0], o); dst++; - *dst = BLEND_BYTE(*dst, *(((uint8_t *)&yuy2) + 1), o); + *dst = BLEND_BYTE(*dst, yuy2.b[1], o); dst++; } } |