Didée
25th February 2004, 23:08
Hello.
After wondering why a certain script produced output with misaligned color planes, I finally found "Overlay()" to be the culprit. (It was the very last item I suspected...)
Play around with the following script, it's very easy to see.
AnySource(MySource)
# ConvertToYV12() # if needed, to show the bug
# converttoyuy2() # for comparison. this will work correctly.
before = last
quirky = Overlay( last, last, opacity=0.5) # opacity's value doesn't matter at all
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
test_simple = Overlay( before.UtoY(), quirky.UtoY(),mode="difference")
test_8fold = Overlay( before.VtoY(), last.VtoY(), mode="difference")
return test_simple #.coloryuv(autogain=true) # You probably won't
return test_8fold #.coloryuv(autogain=true) # even need the enhancement
# Masked operations behave similar
Made a report on SourceForge's AviSynth bug tracker, too.
BTW, it's not the "difference" mode. You can also try MaskTools's "YV12subtract()" to show the shift.
- Didée
After wondering why a certain script produced output with misaligned color planes, I finally found "Overlay()" to be the culprit. (It was the very last item I suspected...)
Play around with the following script, it's very easy to see.
AnySource(MySource)
# ConvertToYV12() # if needed, to show the bug
# converttoyuy2() # for comparison. this will work correctly.
before = last
quirky = Overlay( last, last, opacity=0.5) # opacity's value doesn't matter at all
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
Overlay( last, last, opacity=0.5)
test_simple = Overlay( before.UtoY(), quirky.UtoY(),mode="difference")
test_8fold = Overlay( before.VtoY(), last.VtoY(), mode="difference")
return test_simple #.coloryuv(autogain=true) # You probably won't
return test_8fold #.coloryuv(autogain=true) # even need the enhancement
# Masked operations behave similar
Made a report on SourceForge's AviSynth bug tracker, too.
BTW, it's not the "difference" mode. You can also try MaskTools's "YV12subtract()" to show the shift.
- Didée