pan/mdg: Lower shifts to 32-bit