Log in

View Full Version : 16bit Dissolve/Fade


Pier
6th August 2013, 15:50
How do i make a 16bit "dissolve/fade" with avisynth so that i don't get banding?

zero9999
6th August 2013, 22:38
something like this should do the trick


fadeMask = c1.Dither_Get_Msb().Animate(0,100, "mt_lut", "", "", "", "", 0, "", "", "", "", -255)
Dither_merge16_8(c1,c2,fadeMask, luma=true)


you could also use a 16 bit mask if you wanted a really long fade:

fadeMask = c1.Animate(0,6000, "Dither_lut16", "", "", "", "", 0, "", "", "", "", -65535)
a=Dither_merge16(c1,c2,fadeMask, luma=true)

Pier
7th August 2013, 13:56
something like this should do the trick


fadeMask = c1.Dither_Get_Msb().Animate(0,100, "mt_lut", "", "", "", "", 0, "", "", "", "", -255)
Dither_merge16_8(c1,c2,fadeMask, luma=true)


you could also use a 16 bit mask if you wanted a really long fade

It works! But i'm randomly getting an access violation when i play the filtered clip, but i got the trick, i will have to play with it to avoid that, thanks :)

zero9999
7th August 2013, 15:30
It works! But i'm randomly getting an access violation when i play the filtered clip, but i got the trick, i will have to play with it to avoid that, thanks :)

wait for tp7's upcoming masktools releases, or use this (if you don't need the accuracy of a 16 bit mask - which you probably don't):


fadeMask= c1.Dither_Get_Msb().BlankClip(color=$FFFFFF).fadein(100).coloryuv(levels="TV->PC").Trim(0,c1.FrameCount-1)

Pier
7th August 2013, 17:35
That fixed the problem, thanks :)

TurboPascal7
8th August 2013, 23:27
It is because Dither_merge16_8 is a mt_masktool-based. It uses a large table of values per all Animate call steps.

Function Dither_merge16_8 (clip src1, clip src2, clip mask, bool "luma", int "y", int "u", int "v")
{
mask16 = StackVertical (mask, mask)
Dither_merge16 (src1, src2, mask16, luma=luma, y=y, u=u, v=v)
}
No it's not. And even in masktools merge doesn't use any kind of lookup table.