diff options
author | Cédric Schieli <cschieli@gmail.com> | 2009-02-28 08:01:52 +0000 |
---|---|---|
committer | Cédric Schieli <cschieli@gmail.com> | 2009-02-28 08:01:52 +0000 |
commit | f8a138be5257f751ef7d3c6b7ab534c0434e90e7 (patch) | |
tree | db7a168078a2473e859da7d43a0d964af5f0e323 /libswscale/rgb2rgb.c | |
parent | 5f59207d94115e61d5c401f5f03a3d2644fcb5c7 (diff) | |
download | ffmpeg-f8a138be5257f751ef7d3c6b7ab534c0434e90e7.tar.gz |
When converting from a non alpha format to an alpha format, defaults
Originally committed as revision 28756 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/rgb2rgb.c')
-rw-r--r-- | libswscale/rgb2rgb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index 99be2a4f27..ad69265c37 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -94,6 +94,7 @@ DECLARE_ASM_CONST(8, uint64_t, mmx_one) = 0xFFFFFFFFFFFFFFFFULL; DECLARE_ASM_CONST(8, uint64_t, mask32b) = 0x000000FF000000FFULL; DECLARE_ASM_CONST(8, uint64_t, mask32g) = 0x0000FF000000FF00ULL; DECLARE_ASM_CONST(8, uint64_t, mask32r) = 0x00FF000000FF0000ULL; +DECLARE_ASM_CONST(8, uint64_t, mask32a) = 0xFF000000FF000000ULL; DECLARE_ASM_CONST(8, uint64_t, mask32) = 0x00FFFFFF00FFFFFFULL; DECLARE_ASM_CONST(8, uint64_t, mask3216br) = 0x00F800F800F800F8ULL; DECLARE_ASM_CONST(8, uint64_t, mask3216g) = 0x0000FC000000FC00ULL; @@ -281,7 +282,7 @@ void rgb24to32(const uint8_t *src, uint8_t *dst, long src_size) { #ifdef WORDS_BIGENDIAN /* RGB24 (= R,G,B) -> BGR32 (= A,R,G,B) */ - dst[4*i + 0] = 0; + dst[4*i + 0] = 255; dst[4*i + 1] = src[3*i + 0]; dst[4*i + 2] = src[3*i + 1]; dst[4*i + 3] = src[3*i + 2]; @@ -289,7 +290,7 @@ void rgb24to32(const uint8_t *src, uint8_t *dst, long src_size) dst[4*i + 0] = src[3*i + 2]; dst[4*i + 1] = src[3*i + 1]; dst[4*i + 2] = src[3*i + 0]; - dst[4*i + 3] = 0; + dst[4*i + 3] = 255; #endif } } @@ -305,7 +306,7 @@ void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size) register uint16_t bgr; bgr = *s++; #ifdef WORDS_BIGENDIAN - *d++ = 0; + *d++ = 255; *d++ = (bgr&0x1F)<<3; *d++ = (bgr&0x7E0)>>3; *d++ = (bgr&0xF800)>>8; @@ -313,7 +314,7 @@ void rgb16tobgr32(const uint8_t *src, uint8_t *dst, long src_size) *d++ = (bgr&0xF800)>>8; *d++ = (bgr&0x7E0)>>3; *d++ = (bgr&0x1F)<<3; - *d++ = 0; + *d++ = 255; #endif } } @@ -369,7 +370,7 @@ void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size) register uint16_t bgr; bgr = *s++; #ifdef WORDS_BIGENDIAN - *d++ = 0; + *d++ = 255; *d++ = (bgr&0x1F)<<3; *d++ = (bgr&0x3E0)>>2; *d++ = (bgr&0x7C00)>>7; @@ -377,7 +378,7 @@ void rgb15tobgr32(const uint8_t *src, uint8_t *dst, long src_size) *d++ = (bgr&0x7C00)>>7; *d++ = (bgr&0x3E0)>>2; *d++ = (bgr&0x1F)<<3; - *d++ = 0; + *d++ = 255; #endif } } |