Convert from BGRA to RGBA using MMX
From: Pedro Ferreira (spamtrap_at_crayne.org)
Date: 02/22/05
- Next message: Simon: "Math in asm... and limits..."
- Previous message: Jeff: "Re: Advice Please: Assembly Language Programming Book"
- Next in thread: Michael Brown: "Re: Convert from BGRA to RGBA using MMX"
- Reply: Michael Brown: "Re: Convert from BGRA to RGBA using MMX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 22 Feb 2005 19:41:57 +0000 (UTC)
Is there a simple (optimized) way to convert an image in BGRA to RGBA?
>>From the initial value:
B G R A
exchange only the first byte with the third:
R G B A
My friend Chris sugested this method:
1. exchange first byte with second and third byte with fourth
result -> G B A R
2. right rotation of one byte
result -> R G B A
How can I do this with MMX instructions?
Many thanks in advance,
Pedro
- Next message: Simon: "Math in asm... and limits..."
- Previous message: Jeff: "Re: Advice Please: Assembly Language Programming Book"
- Next in thread: Michael Brown: "Re: Convert from BGRA to RGBA using MMX"
- Reply: Michael Brown: "Re: Convert from BGRA to RGBA using MMX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]