Hi, I'm searching for a fast way to substract a dark image from another image. If the dark image pixel value is greater than the corresponding image pixel, the resulting image pixel should be zero. Otherwise, it should be simply substracted.
Are there special functions for doing this job?
I got an AT91SAM9260 processor and the image data is 10bit depth, laying in a 16-bit array.
Many thank, Stefan
I suppose the answer is hand-crafted assembly code. Get a ARM9 instruction set guide, with instruction timings. And don't forget to maximize memory throughput as well.
I suppose the answer is hand-crafted assembly code.
Possibly, but the compiler should be able to take care of much of the necessary optimization. At least that's my experience - I tried beating the compiler with hand-crafted assembly in a similar scenario (by maximizing register usage and memory throughput by using load/store multiple instructions), and the compiler still ended up ahead.
However, some things (like manually unrolling the loop, at least partially) might still have to be done by hand.