InvestorsHub Logo
Followers 0
Posts 297
Boards Moderated 0
Alias Born 04/26/2004

Re: mmoy post# 51586

Tuesday, 02/01/2005 4:46:32 PM

Tuesday, February 01, 2005 4:46:32 PM

Post# of 97871
rgb -> bgr

Here's my first attempt, x32

;assume esi points to source
;output bgr's in ebx,edi,eax,edx
;x=don't care
;**********************************************

mov ebx,[esi+0] ;r0,g0,b0,r1
mov eax,[esi+4] ;g1,b1,r2,g2
mov edx,[esi+8] ;b2,r3,g3,b3
mov edi,eax

shld eax,edx,8 ;b1,r2,g2,b2
shrd edi,ebx,16 ;b0,r1,g1,b1
shr ebx,8 ;x,r0,g0,b0

bswap eax ;b2,g2,r2,x
bswap edi ;b1,g1,r1,x
bswap edx ;b3,g3,r3,x
bswap ebx ;b0,g0,r0,x

I'll leave the boundary conditions to you!
Volume:
Day Range:
Bid:
Ask:
Last Trade Time:
Total Trades:
  • 1D
  • 1M
  • 3M
  • 6M
  • 1Y
  • 5Y
Recent AMD News