* edges (x=0, x=width-1, y = 0 y=height-1) were not taken into acount correctly used CLAMP function to limit the filter operation to existing pixels
* edges (x=0, x=width-1, y = 0 y=height-1) were not taken into acount correctly used CLAMP function to limit the filter operation to existing pixels