optimizations for bayer2rgb