cook: expand dither_tab[], and make sure indexes into it don't overflow.