MMX 잘쓰시는분..
글쓴이: magingax / 작성시간: 월, 2008/09/01 - 1:27오후
이미지 프로세싱 을 하려는데 최적화를 위해 MMX 를 써볼까 하고있습니다.
그런데..생각만큼 잘안되네요.
어설픈 어셈이라 그런지 C 보다도 느립니다..크흑
자려는 거는 pixel A 와 pixel B 를 알파값 alpha 를 가지고 blending 해서 pixel C를 생서하는 겂니다 (pixel B에 덮어써져도 좋고)
각각의 pixel 은 RGBA 의 32 bit 값이고요..
MMX 잘쓰시는분 어드아이스 부탁드립니다.
Forums:
해본적이 오래되서
뭐 MMX자체가 4바이트의 각 바이트를 서로 연산할때 한번의 instruction으로 되는 것으로 알고있습니다.
저 같은 경우에 옛날에 inline assembly 써가지고 800*600 해상도에서 초당 30프레임까지 구현했었구요.
근데 하도 옛날 일이라서 기억이 가물가물..^^
MMX 보단 현대 CPU 면
MMX 보단 현대 CPU 면 SSE 를 추천합니다. ( 되도록 SSE3 가 좋겠지만.. 128 비트 연산까지 array 처럼 쭉 땡길 수 있습니다. )
http://msdn.microsoft.com/en-us/library/t467de55.aspx ( VC 계열의 경우 )
http://ds9a.nl/gcc-simd/ ( gcc 계열의 경우 )
alpha blending 은 종류가 워낙 다양하고 ( src to dest 옵션이 각각 조합하면.. 꽤 많죠 ) 이미지의 포맷이 워낙 제각각이니 조언이나 일반적으로 참고할 URL 드리기가 힘드네요.
Neogeo - Future is Now.
Neogeo - Future is Now.
댓글 달기