Functions Index :: J :: JointPixelType

[<< up one level]

Module:

clip :: arrays

Definition:

JointPixelType(string clips, bool "lowercase")

Description:

Returns the most common (ie with maximum occurence) pixel type of a clip array.

The function first honors total RGB/YUV occurence and then specific occurences of RGB/YUV subtypes.

In addition, when equal number of specific RGB/YUV subtypes is encountered, it favors YV12 over YUY2 and RGB32 over RGB24, as well as YUY2 over RGB32 (when total RGB == total YUV).

Thus:

Arguments:

clips: The clip array.

lowercase (Optional, defaults to false): If true then the returned string is in lowercase.

Examples:

# assuming ar is a clip array with 3 RGB32, 1 RGB24

# and 3YUY2 clips (7 clips in total):

pt = JointPixelType(ar) # pt == "RGB32"

# assuming ar2 is a clip array with 3 RGB32, 1 RGB24

# 2 YV12 and 3 YUY2 clips (9 clips in total):

pt2 = JointPixelType(ar2) # pt2 == "YUY2"

# assuming ar3 is a clip array with 3 RGB32, 1 RGB24

# 3 YV12 and 1 YUY2 clips (8 clips in total):

pt3 = JointPixelType(ar3) # pt3 == "YV12"

# assuming ar4 is a clip array with 3 RGB32, 1 RGB24

# 2 YV12 and 2 YUY2 clips (8 clips in total):

pt4 = JointPixelType(ar4) # pt4 == "RGB32"

 

[<< top]