Add diagonal combing detection - #64
Conversation
|
Thanks. Firstly: I'm just curious, how you noticed that this may help. |
|
I would ask that we retain backwards compatibility by adding this as a new setting eg. metric=2 which is currently an unused value: 0 = Tritical's method (default) |
|
@pinterf I saw a lot of residual combing when sharp diagonal lines were moving, or the frame itself was scrolling vertically and horizontally at the same time. And yes, this method always increases MI value because it only detects additional pixels as combed. @flossy83 Fair point, I'll get to it right away. Frankly, there are so many projects on github that are no longer maintained that I didn't want to invest too much time in the PR before I get some feedback. I'm not sure I will be able to deliver well-behaved SIMD-optimized versions but I'll definitely try. |
This PR modifies the combing detection algorithm
metric=1to better detect combing along diagonal lines. Since the algorithm detects extra pixels as combed (in addition to those detected by the base algorithm), the MI value must be increased to compensate.Currently there's only the C implementation. If the changes are deemed worthy, we can discuss the SSE2 implementation.
Here are some screenshots for comparison, produced by:
This PR, clean frame correctly detected

This PR, combed frame correctly detected

This PR, combed frame correctly detected

Base algorithm, clean frame detected as combed

Base algorithm, combed frame not detected

Base algorithm, combed frame not detected
