vampiredom
28th October 2008, 17:57
Hi all --
I know it's probably old-hat to most, but I am a big fan of the GrapeSmoother plugin: It's very fast, minimally destructive and seems to be ideal for already "mostly clean" material, like HDV or AVCHD footage.
Unfortunately, it only works in YUY2. I think I've found a way to convert YV12->YUY2->YV12 without the goofy sort of resampling that takes place with the conventional method, which seems to be especially troublesome for interlaced sources:
function GrapeSmootherYV12(clip c, int "strength") {
strength=Default(Strength, 0)
c
wasYV12 = isYV12(c)
SeparateFields()
y = ConvertToYUY2()
uv = PointResize(width, height*2)
u = uv.UtoY().ConvertToYUY2()
v = uv.VtoY().ConvertToYUY2()
(wasYV12) ? YToUV(u,v,y).Weave().ConvertToYUY2(interlaced=true) : c
(strength > 0) ? GrapeSmoother(strength) : last
(wasYV12) ? ConvertToYV12(interlaced=true) : last
}
Is there a better or faster way to do this? It is a bit slower than simply ConvertToYUY2().GrapeSmoother().ConvertToYV12() ... but the chroma integrity seems much better when done my way.
Or perhaps I'm totally wrong about my enitre approach? Advice would be appreciated :)
I know it's probably old-hat to most, but I am a big fan of the GrapeSmoother plugin: It's very fast, minimally destructive and seems to be ideal for already "mostly clean" material, like HDV or AVCHD footage.
Unfortunately, it only works in YUY2. I think I've found a way to convert YV12->YUY2->YV12 without the goofy sort of resampling that takes place with the conventional method, which seems to be especially troublesome for interlaced sources:
function GrapeSmootherYV12(clip c, int "strength") {
strength=Default(Strength, 0)
c
wasYV12 = isYV12(c)
SeparateFields()
y = ConvertToYUY2()
uv = PointResize(width, height*2)
u = uv.UtoY().ConvertToYUY2()
v = uv.VtoY().ConvertToYUY2()
(wasYV12) ? YToUV(u,v,y).Weave().ConvertToYUY2(interlaced=true) : c
(strength > 0) ? GrapeSmoother(strength) : last
(wasYV12) ? ConvertToYV12(interlaced=true) : last
}
Is there a better or faster way to do this? It is a bit slower than simply ConvertToYUY2().GrapeSmoother().ConvertToYV12() ... but the chroma integrity seems much better when done my way.
Or perhaps I'm totally wrong about my enitre approach? Advice would be appreciated :)