fix bugs and add tests for dynamic range compressions

This filter is still not very performant, but it *does* work :)