Add 9-16 bits support to motion mask related parts

Combed frame detection and interpolation parts are not finished yet