swscale: support gray to 9bit and 10bit formats