@ Bloax:
In my opinion, the masking procedure is not correct.
> c = Mt_MakeDiff(a,b).Mt_Expand().Mt_Inflate()
And that's the mask, with the "measure" created by basically removegrain(4).removegrain(19).
Now, the mask is 128 where the RemoveGrain's did "nothing", more "blackish" where the RemoveGrains made pixels darker, and more "whiteish" where they made pixels brighter.
So you get 50% denoising where RemoveGrain did nothing, a tendency to "no denoising" where RG made pixels darker, and a tendency to "full strength" where RG made pixels brighter.
Of course, you can always excuse with
"That's exactly how I want it to be!".
Still, the "theoretically-correct" way without any mysterious bias would be this:
> c = Mt_lutxy(a,b,"x y - abs 2 *").Mt_Expand().Mt_Inflate()
Oh, and 1.66*0.66 is not "1", but ~1.096. Another mysterious bias.