Remove an extra space.
Allocate 'rgbhit' and 'rgb2pal' on heap instead of stack.
Remove unnecessary variables 'src' and 'orig_src'.