mask to frame number modulus