optimized ColorMatrixFilter with bit shifting

the recent changes to ~/ made it much slower.