Quote:
Originally Posted by Chikuzen
bool is_uint16 = (vi.pixel_type & VideoInfo::CS_Sample_Bits_16) != 0;
bool is_float = (vi.pixel_type & VideoInfo::CS_Sample_Bits_32) != 0;
|
Or easier, but AvsPlus-specific:
bool is_uint16 = vi.ComponentSize() == 2;
bool is_float = vi.ComponentSize() == 4;
Btw, there is a another new function vi.NumComponents(), which is 1 for greyscale, 3 for yuv/rgb, 4 for rgba etc.
Unlike IScriptEnv2, these can be considered stable.