Thread: Avisynth+
View Single Post
Old 13th February 2017, 20:41   #3026  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by pinterf View Post
Weird means ........ /fill the missing words/
It's hard to find the words but... I think "weird" is the right word.


Code:
ConvertToRGB24()
CombinePlanes(planes="YUV", source_planes="RGB", pixel_type="YUV444P8")


Destination format complains if you specify a non-planar format, so it would be consistent to apply the same restriction for the input format.

Quote:
Originally Posted by pinterf View Post
Converting String to VideoInfo:: pixel_type integer: Invoke this script function:
int ColorSpaceNameToPixelType (string ColorSpaceName)
I still don't know if Avisynth 2.6 supports this but this is not something that should need to be exposed to the script interface. Scripts work purely with format as string and never see the underlying int. Only the c++ interface needs to work with the int value, so the only place that makes sense to do such a conversion is in the header file or custom c++ code.

Quote:
Originally Posted by real.finder View Post
I think PixelType() is what you want, can work in avs26 and avs+ and return string
Yes this has been mentioned already. Converting the other way to get an int, however, is different.

Also, ConvertToYV24() on YUVA444P8 isn't converting it to YUV444P8.

By the way, CombinePlanes is making things a lot easier for me. I wasn't sure about the components order in AvisynthShader... it is RGBA in 8-bit and BGRA in 16-bit. Now that's easy to deal with.

Last edited by MysteryX; 13th February 2017 at 21:21.
MysteryX is offline