added gray<->RGB functions - fixed rgb<->yuv functions for non RGB24 case