modx
modx(fconst, downx(1 << clk_shift, par->diwstrt_h - 4)));
vshift = modx(16 << maxfmode, par->xoffset);
shift = modx(fconst, fstrt);