dubhater / vapoursynth-mvtools

Motion compensation and stuff
184 stars 28 forks source link

Add MDegrain4-6 support. #57

Closed adworacz closed 1 year ago

adworacz commented 1 year ago

(Happy new year!)

There's a few code cleanups left, particularly now because we support a radius of 6, so all of the "if radius > X" logic is a bit of an eye sore and bug prone. I'll be posting a follow up CR for switching to using loops where appropriate, but I wanted to provide this PR as is, as it follows the existing implementation patterns and is thus easier to review.

I've tested this on everything from SD to HD to UHD footage and it all seems to work as expected.

In the future I'd like to add MDegrainN support, but starting with just a radius of 1-6 support and forwarding it along to MDegrain1-6 under the hood, which is what the Avisynth version currently does. This would provide a simpler API for working with variable radiuses and should be doable rather cheapely. Additional work would be required for proper MDegrainN (>6) support.

I'll take a look at adding blocksize 24 (12, 48, etc) support as well, although that will likely be a C-only change for now.

dubhater commented 1 year ago

Happy new year! And thank you for volunteering to take over MVTools! 😈