views:

55

answers:

1

I am trying to get it working but still no results. Do you know some kind of tutorial or sample assembler code for blur image filtering?

A: 

You could blur with a convolution matrix.

Depending about the system, you can use the older floating point stuff, integer arithmetic or newer SSE ops.

If you are using a byte to represent color value, here's an overall algorithm:

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
Cheery