Avisynth Plus change log
------------------------
Source: https://github.com/pinterf/AviSynthPlus/tree/MT

For a more logical (non-historical) arrangement of changes see readme.txt

20171115 r2544
  - Expr: fix "scalef" for 10-16 bits
  - Expr optimization: eliminate ^1 +0 -0 *1 /1

20171114 r2542
  - New filter: Expr
    Ported from Vapoursynth, with a lot of additional tweaks 
    e.g. AVX2, recognize constant fill, spatial absolute and relative coordinates as input, recognize plane copy, 
         no GetFrame for unused clips, converts ^2, ^3, ^4 into faster multiplication, 
         converts x^0.5 into sqrt(x), borrow specific syntax elements from masktools2 (scaling, operators - but not all of them) to have partial 
         compatibility in widely used existing expression strings (see readme.txt)

    clip Expr(clip c[,clip c2, ...], string expr [, string expr2[, string expr3[, string expr4]]] [, string format]
        [, bool optSSE2][, bool optAVX2][, bool optSingleMode])

  - Add: Levels: 32 bit float format support
  - Fix: RGB (full scale) conversion: 10-16 bits to 8 bits rounding issue; pic got darker in repeated 16<->8 bit conversion chain
  - Fix: ConvertToY: remove unnecessary clamp for Planar RGB 32 bit float
  - Fix: RGB ConvertToY when rec601, rec709 (limited range) matrix. Regression since r2266
  - Optimized: Faster RGB (full scale) 10-16 bits to 8 bits conversion when dithering
  - Other: Default frame alignment is 64 bytes (was: 32 bytes). (independently of AVX512 support)
  - Build: 
    Built with Visual Studio 2017, v141_xp toolset
    Note that DLL will work When you have VS2015 Update 3 redistributable.
  
    Download Visual Studio 2017 Redistributable from here (replaces and compatible with VS2015 redist)

    X64:
    https://go.microsoft.com/fwlink/?LinkId=746572

    x86:
    https://go.microsoft.com/fwlink/?LinkId=746571

  - Experimental x64 builds for test (internal offsets from int to size_t)
  - Source: avisynth_c.h (C interface header file) changed: 
    Optional define SIZETMOD. Experimental. Offsets are size_t instead of int (x64 is different!)
    Fix: avs_get_row_size calls into avs_get_row_size_p, instead of direct field access
    Fix: avs_get_height calls into avs_get_row_size_p, instead of direct field access.

20170629 r2508
  - Fix TemporalSoften: threshold < 255 (probably since r1576)

20170608 r2506
  - Fix CombinePlanes: feeding YV16 or YV411 target with Y8 sources

20170603 r2504
  - fix XP support broken in r2502

20170602 r2502
  - fix: (Important!) MT_SERIALIZED mode did not always protect filters (regression since r2069)
    Such filters sometimes were called in a reentrant way (like being MT_NICE_FILTER), which
    possibly resulted in using their internal buffers parallel.
  - Fix: ImageWriter crash when no '.' in provided filename
  - Fix: Overlay: correct masked blend: keep exact clip1 or clip2 pixel values for mask extremes 255 or 0. 
    Previously 0 became 1 for zero mask, similarly 255 changed into 254 for full transparency (255) mask
  - New: script functions: StrToUtf8, StrFromUtf8: Converting a 8 bit (Ansi) string to UTF8 and back.
  - New: PluginManager always throws error on finding wrong bitness DLL in the autoload directories
  - Modified: increased x64 default MemoryMax from 1GB to 4GB, but physicalRAM/4 is still limiting
  - Modified: allow conversions between RGB24/32/48/64 (8<->16 bits) w/o ConvertBits
  - Added VS2017 and v141_xp to CMakeList.txt

20170529 r2489
  - fix: memory leak in CAVIStreamSynth (e.g. feeding vdub)
  - fix: ConvertToY for RGB64 and RGB48

20170528 r2487
  - Blur, Sharpen 10-16 bits planar and RGB64: SSE2/SSE4 (2x-4x speed)
  - New script function: int GetProcessInfo([int type = 0])
    Without parameter or type==0 the current bitness of Avisynth DLL is returned (32 or 64)
    With type=1 the function can return a bit more detailed info:
    -1: error, can't establish
    0: 32 bit DLL on 32 bit OS
    1: 32 bit DLL on 64 bit OS (WoW64 process)
    2: 64 bit DLL
  - Fix: Blur width=16 (YV12 width=32)
  - Fix: Overlay Lighten: artifacts when base clip and overlay clip have different widths (regression since r2290)
  - Fix: YUY2 HorizontalReduceBy2 did nothing if target width was not mod4
  - ImageReader: 16 bit support; "pixel_type" parameter new formats "RGB48", "RGB64" and "Y16"
  - ImageWriter: 16 bit support; save RGB48, RGB64, Y16, planar RGB(A) 8 and 16 bit formats
    (note: greyscale through devIL can be corrupt with some formats, use png)
  - ImageWriter: flip greyscale images vertically (except "raw" format)
  - SubTitle: new parameter "font_filename" allows using non-installed fonts
  - (project can be compiled using gcc)
  - Allows opening unicode filenames through VfW interface (virtualdub, MPC-HC)
  - Script function Import: new parameter bool "utf8" to treat the filenames as UTF8 encoded
    (not the script text!)
  - SubTitle: new parameter bool "utf8" for drawing strings encoded in UTF8.
      Title="Cherry blossom "+CHR($E6)+CHR($A1)+CHR($9C)+CHR($E3)+CHR($81)+CHR($AE)+CHR($E8)+CHR($8A)+CHR($B1)
      SubTitle(Title,utf8=true)
  - New script functions: ScriptNameUtf8(), ScriptFileUtf8(), ScriptDirUtf8(), 
    they return variables $ScriptNameUtf8$, $ScriptFileUtf8$ and $ScriptDirUtf8$ respectively

  Knows issues: 
  - Filters with MT_SERIALIZED sometimes can get called in a reentrant way
  - Runtime Script functions under MT
  

20170316 r2455
  - Fix: IsY() script function returned IsY8() (VideoInfo::IsY was not affected)
  - New: ConvertBits, dither=1 (Floyd-Steinberg): allow any dither_bits value between 0 and 8 (0=b/w)

20170310 r2440
  - Fix Merge for float formats
  - Fix error text formatting under wine (_vsnprintf_l issue)
  - Fix Regression: YUY2 UToY copied V instead of U, since August, 2016 (v2150)

  - faster Merge: float to sse2 (both weighted and average)
  - faster ordered dither to 8bit: SSE2 (10x speed)

  - ColorBars allows any 4:2:0, 4:4:4 formats, RGB64 and all planar RGB formats
  - ColorBarsHD accepts any 4:4:4 formats
  - Dithering: Floyd-Steinberg
    Use convertBits parameter dither=1: Floyd-Steinberg (was: dither=0 for ordered dither)
  - Dithering: parameter "dither_bits"
    For dithering to lower bit depths than the target clip format
    Usage: ConvertBits(x, dither=n [, dither_bits=y])
    - ordered dither: dither_bits 2, 4, 6, ... but maximum difference between target bitdepth and dither_bits is 8
    - Floyd-Steinberg: dither_bits 1, 2, 4, 6, ... up to target bitdepth - 2
    (Avisynth+ low bitdepth, Windows 3.1 16 bit feeling I was astonished that dither_bits=6 still resulted in a quite usable image)
  - Dithering is allowed from 10-16 -> 10-16 bits (was: only 8 bit targets)
  - Dithering is allowed while keeping original bit-depth. clip10 = clip10.ConvertBits(10, dither=0, dither_bits=8)
    (you still cannot dither from 8 or 32 bit source)
  - ConditionalFilter syntax extension like Gavino's GConditional: no "=" "true" needed
  - Revert: don't give error for interlaced=true for non 4:2:0 sources (compatibility, YATTA)
  - CombinePlanes: silently autoconvert packed RGB/YUY2 inputs to planar
  - ConvertBits: show error message on YV411 conversion attempt: 8 bit only
  - ConvertBits: Don't give error message if dither=-1 (no dithering) is given for currently non-ditherable target formats
  - Script function: IsVideoFloat. returns True if clip format is 32 bit float. For convenience, same as BitsPerComponent()==32 
  - ConvertToDoubleWidth and ConvertFromDoubleWidth: RGB24<->RGB48, RGB32<->RGB64
  - New MT mode: MT_SPECIAL_MT. Specify it for MP_Pipeline like filters, even if no Prefetch is used (MP_Pipeline issue, 2 fps instead of 20)


20170202 r2420
  - CombinePlanes:
    When there is only one input clip, zero-cost BitBlt-less subframes are used, which is much faster.

    e.g.: casting YUV to RGB, shuffle RGBA to ABGR, U to Y, etc..
    Target planes that are not specified, preserve their content.

    Examples:
    combineplanes(clipRGBP, planes="RGB",source_planes="BGR") # swap R and B
    combineplanes(clipYUV, planes="GBRA",source_planes="YUVA",pixel_type="RGBAP8") # cast YUVA to planar RGBA
    combineplanes(clipYUV, planes="Y",source_planes="U",pixel_type="Y8") # extract U

  - fix: SubframePlanarA (available in IScriptEnvironment2)
  - faster: Difference-type conditional functions: Simd for 10-16 bits
  - Fix: MinMax-type conditional functions (min, max, median): return float value for float clips
  - ConvertToPlanarRGB(A): 
    PlanarRGB <-> PlanarRGBA is now allowed
  - ConvertToPlanarRGB(A):
    YUY2 source is now allowed (through automatic ConvertToRGB proxy)
  - faster: RemoveAlphaPlane (subframe instead of BitBlt copy)
  - Overlay: "Blend" native greyscale mode: process y plane only w/o conversion
  - Overlay: automatic use444=false for "blend"/"luma"/"chroma" 
    for inputs: 420/422/444 and any RGB, lossless Planar RGB intermediate for PackedRGB
    Overlay/mask auto-follows input clip format.
    For compatibility: when greymask=true (default) and mask is RGB then mask source is the B channel
  - faster: RGB48->RGB64 SSSE3 (1,6x), RGB64->RGB48 SSSE3 (1.5x speed)
  - faster: RGB24,RGB48->PlanarRGB: uses RGB32/64 intermediate clip
  - Histogram "levels": allow RGB24/32/48/64 input.
    Display R, G and B channels instead of Y, U and V
    Reminder 1: "levels" for Planar RGB was working already
    Reminder 2: Histogram "levels" and "Classic" allows bits=xx parameter, xx=8..12
                If "bits" is specified then Histogram is drawn with 9..12 bits precision. Get a wide monitor though :)
  - ConvertBits: new parameters, partially for the future.
    bool fulls, bool fulld

    For YUV and greyscale clips the bit-depth conversion uses simple bit-shifts by default.
    YUV default is fulls=false

    RGB is converted as full-stretch (e.g. 0..255->0..65535)
    RGB default is fulls=true

    If fulld is not specified, it takes the value of fulls.
    Use case: override greyscale conversion to fullscale instead of bit-shifts

    Note 1: conversion from and to float is always full-scale
    Note 2: alpha plane is always treated as full scale
    Note 3: At the moment you cannot specify fulld to be different from fulls.
   

20170119 r2397
  - TemporalSoften: Planar RGB support
  - TemporalSoften: much faster average mode (thres=255) 
    radius=1 +70%, radius=2 +45%, 
    16bit: generally 7-8x speed (SSE2/4 instead of C)
  - SeparateColumns: 10-16bit,float,RGB48/64
  - WeaveColumns: 10-16bit,float,RGB48/64,PlanarRGB(A)
  - AddAlphaPlane: fix function parameter type list, clip type did not work
  - Internals: add SubframePlanarA to IScriptEnvirontment2 for frames with alpha plane
  - SwapUV: YUVA support
  - ConvertToRGB32/64: copy alpha from YUVA
  - SeparateRows,SeparateFields: PlanarRGB(A),YUVA support
  - WeaveRows: PlanarRGB(A), YUVA
  - Weave (fields,frames): YUVA,PlanarRGB(A)
  - Crop: Fast crop possible for frames with alpha plane (subframe)
  - AddBorders missing l/r/top/bottom vs. subsampling check for YUVA
  - Fix: YUVA->PlanarRGBA and YUVA42x->444 missing alpha plane copy 
  - YUV444->RGB48/64: fast intermediate PlanarRGB(A) then RGB48/64 (not C path)
  - RGB48/64->YUV4xx target: Planar RGB intermediate (instead of C, 10x faster)

20170111 r2380
  - Overlay: Merge the source of Chroma and Luma modes into Blend mode
             Modes Blend,Luma and Chroma now support all bit depths and 444 conversionless (use444=false) mode
  - Overlay: fix SSE2 Blend for mask+opacity for 10-16 bits
  - VfW: (vdubmod14 VfW test)
    Fix: YUV444P16 or YUVA444P16 to fourcc Y416 
         if alpha channel is present, it will we copied, else filled with FFFF
    Fix: VDubPlanarHack is checked only for 8 bit YUV planar sources
20170110 r2372  (vdubmod14 VfW test)
  - New: SSE2/SSE4 for 10-16 bit <-> 10-16 bit Planar RGB (and Alpha plane) full scale conversions
    (needed for automatic planar RGB -> packed RGB VfW conversions)
  - VfW:
    Fixed: Y3[10][10],Y3[10][16] fourcc's byte order
    New: Planar RGB(A) (MagicYUV) 
         10,12,14,16 bits: G3[0][10], G4[0][10], G3[0][12], G4[0][12], G3[0][14], G4[0][14], G3[0][16], G4[0][16]
    New: YUV444P16 to fourcc Y416
    New: Automatic conversion of 12, 14 and float YUV formats to 16 bit for 4:2:0 and 4:2:2
         Note: OPT_Enable_Y3_10_16 is still valid as if format was originally 16 bits
    New: Automatic conversion of 10, 12, 14 and float YUV formats to 16 bit for 4:4:4
    New: Conversion of 10, 12, 14 and float planar RGB formats to RGB64
         when global Avisynth variable Enable_PlanarToPackedRGB is true 
    New: Conversion of 8 bit planar RGB formats to RGB24
         when global Avisynth variable Enable_PlanarToPackedRGB is true 
    New: Conversion of 8 bit planar RGBA formats to RGB32
         when global Avisynth variable Enable_PlanarToPackedRGB is true 

    Note: use OPT_VDubPlanarHack=true for YV16 and YV24 for old VirtualDub
    
    Supported formats:
    BRA[64],b64a,BGR[48],P010,P016,P210,P216,Y3[10][10],Y3[10][16],v210,Y416
    G3[0][10], G4[0][10], G3[0][12], G4[0][12], G3[0][14], G4[0][14], G3[0][16], G4[0][16]
    
    Default format FourCCs:
    RGB64: BRA[64]
    RGB48: BGR[48]
    YUV420P10: P010
    YUV420P16: P016
    YUV422P10: P210
    YUV422P16: P216
    YUV444P16 and YUVA444P16: Y416
    Planar RGB  10-16 bit: G3[0][10], G3[0][12], G3[0][14], G3[0][16]
    Planar RGBA 10-16 bit: G4[0][10], G4[0][12], G4[0][14], G4[0][16]

    Global variables to override default formats:
    OPT_Enable_V210 = true --> v210 for YUV422P10
    OPT_Enable_Y3_10_10 = true --> Y3[10][10] for YUV422P10
    OPT_Enable_Y3_10_16 = true --> Y3[10][16] for YUV422P16
    OPT_Enable_b64a = true --> b64a for RGB64
    Enable_PlanarToPackedRGB = true --> RGBP8->RGB24, RGBAP8->RGB32, all other bit depths to RGB64

20170109 r2367dev
  - VfW: BRA[64],b64a,BGR[48],P010,P016,P210,P216,Y3[10][10],Y3[10][16],v210 
    experimental!
    Default format FourCCs:
    RGB64: BRA[64]
    RGB48: BGR[48]
    YUV420P10: P010
    YUV420P16: P016
    YUV422P10: P210
    YUV422P16: P216
    Global variables to override default formats:
    OPT_Enable_V210 = true --> v210 for YUV422P10
    OPT_Enable_Y3_10_10 = true --> Y3[10][10] for YUV422P10
    OPT_Enable_Y3_10_16 = true --> Y3[10][16] for YUV422P16
    OPT_Enable_b64a = true --> b64a for RGB64
  - Overlay: blend for float format
  - Overlay: blend: SSE4 for 10-16 bit, SSE2 for float
  - AddAlphaPlane: also accepts clip with Y-only or alpha (YUVA/PRGBA/RGB32/64) for alpha source
    (was: optional int/float mask value)

20170104 r2359dev
  - Overlay:
    new parameter: bool use444 (default true for compatibility)

    Parameter is valid only for "blend" at the moment

    When set to false, and base clip/overlay clip is 420/422/Planar RGB, the overlay core 
    does not convert to and back from YV24 (4:4:4 in general)

    mask can be either greyscale or can be any planar YUV when greymask=true (default)

    Works for Planar RGB, so blending is basically lossless for this format (no YUV conversion)

    todo: support for other modes, convert packed RGB to planar RGB internally instead of YUV
  - Overlay:
    Add fast 4:2:0<->4:4:4 conversion, e.g. YV16<->YV24 (only fast YUY2 and YV12 existed so far)
    instead of invoking generic core conversion
  - Overlay:
    10-16bit SSE2/SSE4 for 420/422<->444 conversions
  - Info() made a bit more compact. 
    Bit depth info moved after color space info
    Does not display pre-SSE2 CPU flags when at least AVX is available
    Display AVX512 flags in separate line (would be too long)
  - new CPU feature constants (see cpuid.h and avisynth_c.h)
    Detect FMA4 and AVX512F,DQ,PF,ER,CD,BW,VL,IFMA,VBMI
  - new script function:
    string ReplaceStr(string s, string pattern, string replacement)
    Function is case sensitive, parameters are unnamed
  - new script function
    int NumComponents(clip)
    returns 1 for grayscale, 3 for YUVxxx, YUY2, planar RGB or RGB24/RGB48, 4 for YUVAxxx, Planar RGBA or RGB32/64
  - new script function: 
    bool HasAlpha(clip)
    returns true when clip is YUVA, Planar RGBA, or packed RGB32 or RGB64

20161222 r2347dev
  - CombinePlanes addition: setting target to default RGBP(A)/YUV(A), when inputs are greyscale and no source planes are given
    Decision is made by the target plane characters, if they are like R,G,B then target video format will be planar RGB
    Same logic applies for YUV.
    Example:
    Y1, Y2 and Y3 are greyscale clips
    Old, still valid: combineplanes(Y1, Y2, Y3, planes="RGB", source_planes="YYY", pixel_type="RGBP8")
    New:              combineplanes(Y1, Y2, Y3, planes="RGB") # result: Planar RGB
  - Fix: ScriptClip would show garbage text when internal exception occurs instead of the error message

20161211 r2343dev
  - Overlay: use y offset when greymask=true (fix)
  - Fix DV chroma positioning (UV swapped), interlaced parameter check for 4:2:0 
    (fix by IanB in classic Avisynth)
  - BitBlt in 32 bit Avisynth: 
    for processors with AVX or better ignore tricky isse memcpy replacement, trust in memcpy (test)
    (x64 is O.K., it always used memcpy)
  - Merge: use stream_load for AVX2
  - VDubFilter.dll:
    convert 'd' double and 'l' long typed parameters to 'f' float and 'i' int for poor AviSynth
    thus allowing the usage of such virtualdub filters
  - remove script array (new AVSValue schema) feature, cannot make it compatible with Invoke from v2.5 plugins
    until I figure out a workaround or such plugins would slowly distinct.

20161208 r2337dev
  - [feature temporarily removed, script arrays are incompatible until 2.5 plugins are supported]
    C interface array compatibility vol#2 (zero size arrays)
    (new AVSValue schema problem)
  - Merge, MergeChroma, MergeLuma: AVX2 (planar)
  - Possibly a bit faster text overlay

20161207 r2333dev
  - Overlay fix

20161206 r2331dev
  - YUY2 PlaneToY finally works
  - C interface compatible array-type AVSValue handling (new AVSValue schema problem)

20161205 r2327dev
  - [feature temporarily removed, script arrays are incompatible until 2.5 plugins are supported]
    BlankClip parameter "colors" accepts exact color values to use
    Color order: Y,U,V,A or R,G,B(,A)
    These color values are used as-is, not scaled or converted in any way.
    Reason: old colors parameter is int (32 bit) cannot hold three or four 16 bit or float values
    Example: BlankClip(width=1920,height=1080,length=1000,pixel_type="RGB64", colors=[64000,32768,1231,65535])
  - ExtractY, PlaneToY("Y") accepts YUY2 clip
  - ExtractR, ExtractG, ExtractB, ExtractA,
    and
    PlaneToY("R"), PlaneToY("G"), PlaneToY("B"), PlaneToY("A") 
    functions are accepting packed RGB input (RGB24/32/48/64)
    They are converted to planar RGB on-the-fly before plane extraction
  - Histogram "levels" works from Planar RGB.
    Color legends show R, G and B.
    bits=8..12 parameter is still available for finer ultra-wide histogram display

20161201 r2322dev
  - [feature temporarily removed, script arrays are incompatible until 2.5 plugins are supported]
    constant script arrays 
    (note: feature was temporarily removed in r2443)
    array_variable = [[1,2,3],[4,5,8],"hello"]
    dictionary = [["one",1],["two",2]]
    empty = []
    subarray = array_variable[0]
    val = subarray[2]
    val2 = array_variable[1,3]
    str = array_variable[2]
    n = ArraySize(array_variable) #3
    n2 = ArraySize(empty) #0
    val3 = dictionary["two"]
  - arrays as filter parameters (named and unnamed):
    new 'a' type or use '.' (any) and check AVSValue IsArray()
    todo: maybe .+ or *+ syntax?
    (note: feature was temporarily removed in r2443)
  - Planar RGB <-> YUV: SSE2 (SSE4)
  - Planar RGB <-> Packed RGB32/64: SSE2 

20161120:
  make PlanarRGB TurnLeft, TurnRight work again.
  (stricter check in PlaneToY)

20161119
  Fix: PlaneToY("Y")

20161116

  Replaced AToY8, GToY8, BToY8, RToY8
  We have ExtractX, (X = R,G,B,Y,U,V,A) instead.
  That Y8 ending was too confusing.
  See new test build

20161110 Avisynth plus additions
New functions

  AToY8 , same as PlaneToY("A") for planar RGBA or YUVA
  RToY8 , same as PlaneToY("R") for planar RGB
  GToY8 , same as PlaneToY("G") for planar RGB
  BToY8 , same as PlaneToY("B") for planar RGB

  They work the same way as UToY8 and VToY8 and ConvertToY did.
  They convert to greyscale keeping the original bit-depth, not only 8 bit! 
  Y8 naming was kept, because UToY and VToY already existed.

Extended function
  old: YToUV(clip clipU, clip clipV [, clip clipY ] ) 
  new: YToUV(clip clipU, clip clipV [, clip clipY [, clip clipA] ] ) 

  YToUV accepts optional alpha clip after Y clip

  Example
    U = source.UToY8()
    V = source.VToY8()
    Y = source.ConvertToY()
    A = source.AddAlphaPlane(128).AToY8()
    # swaps V, U and A, Y
    YToUV(V,U,A,Y).Histogram("levels").Info().RemoveAlphaPlane()
  
New function
  CombinePlanes(clip1 [,clip2, clip3, clip4], string planes [, string source_planes, string pixel_type, string sample_clip])

  Combines planes of source clip(s) into a target clip

  If sample_clip is given, target clip properties are copied from that clip
  If no sample_clip is provided, then clip1 provides the template for target clip
  An optional pixel_type string (e.g."YV24", "YUV420PS", "RGBP8") can override the base video format.

  If the source clip count is less than the given planes defined, then the last available clip is 
  used as a source.

  string planes
    the target plane order (e.g. "YVU", "YYY", "RGB")
    missing target planes will be undefined in the target
  
  string source_planes (optional)
    the source plane order, defaulting to "YUVA" or "RGBA" depending on the video format

  Examples#1
    #combine greyscale clips into YUVA clip
    U8 = source.UToY8()
    V8 = source.VToY8()
    Y8 = source.ConvertToY()
    A8 = source.AddAlphaPlane(128).AToY8()
    CombinePlanes(Y8, U8, V8, A8, planes="YUVA", source_planes="YYYY", sample_clip=source) #pixel_type="YUV444P8"
  
  Examples#2
    # Copy planes between planar RGB(A) and YUV(A) without any conversion
    # yuv 4:4:4 <-> planar rgb
    source = last.ConvertBits(32) # 4:4:4
    cast_to_planarrgb = CombinePlanes(source, planes="RGB", source_planes="YUV", pixel_type="RGBPS")
    # get back a clip identical with "source"
    cast_to_yuv = CombinePlanes(cast_to_planarrgb, planes="YUV", source_planes="RGB", pixel_type="YUV444PS")

  Examples#3
    #create a black and white planar RGB clip using Y channel
    #source is a YUV clip
    grey = CombinePlanes(source, planes="RGB", source_planes="YYY", pixel_type="RGBP8")

  Examples#4
    #copy luma from one clip, U and V from another
    #source is the template
    #sourceY is a Y or YUV clip
    #sourceUV is a YUV clip
    grey = CombinePlanes(sourceY, sourceUV, planes="YUV", source_planes="YUV", sample_clip = source)
  
