Deriche filter optimisation

- Solved an issue with transtyping (Uint16 to Uint8)
- Several improvements