End-of-Eternity / EoEfunc

8 stars 2 forks source link

Expose mvtools dict in CMDegrain #1

Open NSQY opened 2 years ago

NSQY commented 2 years ago

I would for instance prefer to use DCT=5, which uses SATD instead of SAD.

End-of-Eternity commented 2 years ago

Sorry for the delay in response. I've had a think about this, and while I do like the idea, I'm not sure how to best implement it.

The problem is that there are four different mvtools functions called within cmdegrain, super, analy[sz]e, recalculate and degrain. The main ones that we care about would probably just be super and analysze, which share many parameters, but that's still two sets of kwargs, and passing two dicts is kind of ugly. Not only that, but recalculate is called multiple times with different arguments for block size - I'm not sure how to handle this nicely. If you (or anyone) can come up with a nice way to make this into function signature without it looking horrible and without the logic being overly complex then feel free, otherwise my suggestion would just be the (somewhat annoying, sorry) method of copy pasting my function and hardcoding the arguments yourself.

I do however quite like the ability to set DCT (across all relevant functions), so will implement that seperately now.