Add filtering functions for different block sizes. Simplify logic a bit to reduce branching. Sorry for the large commit!
Add filtering functions for different block sizes. Simplify logic a bit to reduce branching. Sorry for the large commit!

ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar