Log in

View Full Version : Despotting in high bit depth?


18fps
8th November 2012, 17:16
Lately I have been using Didée's "possible primitive for spot removal (http://forum.doom9.org/showthread.php?p=1402690#post1402690)":
o=last ox=o.width() oy=o.height()

osup = o.MSuper(pel=2,sharp=2)
bv1 = osup.MAnalyse(isb=true, delta=1,blksize=8,overlap=4,search=4)
fv1 = osup.MAnalyse(isb=false,delta=1,blksize=8,overlap=4,search=4)
bc1 = o.MCompensate(osup,bv1)
fc1 = o.MCompensate(osup,fv1)

Interleave(fc1,o,bc1)
MedianblurT(0,0,0,1) # you can also use "Clense(reduceflicker=false)" instead
SelectEvery(3,1)

StackHorizontal(o,last)

I like it because it keeps most of the grain, (though it should be tweaked to better distinguish between scenes).
However now I'm working with dpx files (HD, 10 bits) and I'd like to keep the high bit depth. I think I can ingest the dpx into Avisynth with ffms2. With the high bit depth tools, and the available modified plugins, it could be possible to despot and export to 10 bits? I think there is a modified mvtools plugin but I don't think there is a High bit MedianblurT. With what it could be substituted?
Thank you!

cretindesalpes
9th November 2012, 00:25
MedianBlurT could be replaced with Dither_median16 but the problem is the MVTools, working only with 8-bit input.

Anyway there is an alternative method, not totally equivalent to pure high bitdepth processing, but close enough. Convert to 8 bits, process, and apply the resulting difference to the 16-bit clip:

FFVideoSource ("blah", enable10bithack=true) # Or any source outputing stack16 data
o16 = last

DitherPost (mode=-1)

# (insert here the previous script without the final StackHorizontal)

dif = mt_makediff (last, o, y=3, u=3, v=3)
dif16 = dif.Dither_convert_8_to_16 ()
o16.Dither_add16 (dif16, dif=true)

Not tested, but should work in principle.

cobo
9th November 2012, 01:35
I've found that Clense is more accurate than MedianblurT in that spot removal script when it comes to fast moving objects.

18fps
9th November 2012, 09:14
@cretindesalpes, Thank you! I'll try it.