use more precise RGB to gray conversion

we use this:
gray8 = rshift(4897*red + 9617*green + 1868*blue, 14)