Log in

View Full Version : Averaging 2 clips, overlay vs layer


qwerpoi
8th July 2004, 21:03
I want to average two frames from a YV12 source, I was using Overlay since it doesn't require a colorspace conversion. But I recently read in the documentation that Overlay internally converts all clips to a YUV format, and that the overlay conversion was slower and worse quality. If I am understanding this right, is it better to use something like
Layer(a.ConvertToYUY2(),b.ConvertToYUY2(),"fast")
and leave my file in YUY2? Or perhaps there is another way to average two clips in YV12 without conversions, maybe an external filter?

qwerpoi
8th July 2004, 21:10
Wait a second, I'm an idiot - MergeLuma/MergeChroma is all that I need, yes? This should be the best method, no conversions needed. Any mod may feel free to delete this thread.

Leak
8th July 2004, 22:19
Originally posted by qwerpoi
I want to average two frames from a YV12 source, I was using Overlay since it doesn't require a colorspace conversion. But I recently read in the documentation that Overlay internally converts all clips to a YUV format, and that the overlay conversion was slower and worse quality.


Well, YV12 (like YUY2) *is* a YUV format, so no conversion is neccessary and the result will be just fine. It's just when you mix YUY2 and YV12 or throw RGB in the mix that you'll probably get better quality using the normal conversion functions beforehand.

Or perhaps there is another way to average two clips in YV12 without conversions, maybe an external filter?


Interleave(clip1,clip2)
AssumeFieldBased()
Weave()
BilinearResize(last.width,last.height/2)


np: Vladislav Delay - Mania A12 (Huume)