2010-05-28 2 views
0

작동 시키려고하지만 여전히 결과가 없습니다. 흐림 이미지 필터링을위한 튜토리얼 또는 샘플 어셈블러 코드를 알고 있습니까?어셈블러의 블러 필터

+3

당신은 아마도 명령어 세트를 지정해야합니다. 하지만 조립할 때 특별한 이유가 있습니까? – Anycorn

+3

코드를 게시하고 문제의 원인, 즉 "작동하지 않는 이유"를 설명해야합니다. –

+1

상위 수준의 문제에 대해 생각하고 있어야합니다. 이미지를 흐릿하게 만드는 데 사용하려는 일반적인 알고리즘에 대해 생각해 본다면, 어셈블리에서 알고리즘을 표현하는 것이 "단지"문제입니다. – Cogwheel

답변

0

convolution matrix으로 흐리게 나타날 수 있습니다.

시스템에 따라 이전 부동 소수점 항목, 정수 산술 또는 최신 SSE 연산을 사용할 수 있습니다. 당신이 색상 값을 나타내는 바이트를 사용하는 경우

, 여기에 전체 알고리즘이다 :

calculate sum of convolution matrix (in blur matrix that would be 9) 
Clear destination register 
load each byte under convolution matrix 
multiply each byte with its corresponding number in the convolution matrix 
place the sum into the destination register 
divide destination register with the sum of convolution matrix 
store the destination register into destination buffer