I wrote an algorithm to convert a RGB image to a YUV420. I spend a long time trying to make it faster but I haven\'t find any other way to boost its efficiency, so now I turn to
You can use SSE or 3dNow assembly codes to further boost the performance.
As for c++ code, I think it is hard to improve based on your current code.