Use a simple ROM lookup table to decode mask source.