I have an image represented by a 2D array of chars, I need to perform some operations on this image and store the result in another 2D array, these operations vary from calculating average value of neighbour cells to reordering rows. what are possible optimisations I can do to get better performance? any possible techniques are welcome (e.g locality of references, inline assembly, ...)
I use c
on a linux x86_64 machine
PS: I have raw color images with each pixel represented by a group of RGB values.