optimizing filters with bit shifting

previously we used an interger division because it was faster. this
division got much slower recently and bit shifting is pretty fast now -
so we move to bit shifting.