Internal filters

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Audio processing filters)
m (tweak appearance)
Line 1: Line 1:
<div style="max-width:76em; min-width:48em">
+
<div style="max-width:82em; min-width:42em;" >
The available (internal) filters are listed here and divided into categories. A short description is added, including the supported [[Color_spaces|color formats]] (and sample types for the audio filters). There are some functions which combine two or more clips in different ways. How the video content is calculated is described for each function, but [[filters_with_multiple_input_clips|here is a summary which explains which properties that the resulting clip will have]].
+
{{AvsPlusHeader}}<div style="max-width:62em" >
 
+
'''''All AVS+ color formats (pixel types)'''''
An alphabetical listing of the internal filters can be found [[:Category:Internal_filters|here]].
+
{|border=1 cellspacing=1 cellpadding=1 class="wikitable sortable"
 
+
! style="width:6em" | Group
=== Source filters ===
+
! style="width:8em" | PixelType
 
+
! style="width:6em" | [[#footnotes|FourCC{{BoldColor|black|140|¹}}]]
These filters can read media files and return an AviSynth clip. See [[#Debug_filters|debug filters]] for non-file source filters.
+
! style="width:6em" | [[#footnotes|Bit depth{{BoldColor|black|140|²}}]]
 
+
! [[#footnotes|Interleaved{{BoldColor|black|140|³}}]]
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
! style="width:4em" | Version
!width=25%| Filter
+
! style="width:12em" class="unsortable" | Remarks
!width=50%| Description
+
!width=15%| Color format
+
|-
+
| [[AviSource]] / [[AviFileSource]] / [[OpenDMLSource]]
+
| Opens an AVI file.
+
| [[#Color_formats|All]]
+
 
|-
 
|-
| [[DirectShowSource]]
+
| RGB
| Opens a filename using [[DirectShow]].
+
| RGB24
| [[#Color_formats|All]]
+
| style="padding-left:1em"  | <code>BGR[24]</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
| style="text-align:center" | x
 +
| style="text-align:center" | {{AvsIcon2}}
 +
 
|-
 
|-
| [[ImageReader]] / [[ImageSource]] / [[ImageSourceAnim]]
+
| RGB 
| Reads in still or animated images. See [[#Export_filters|ImageWriter]].
+
|  RGB48
| [[#Color_formats|All]]
+
| style="padding-left:1em"  | <code>BGR0</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
| style="text-align:center" | x
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[Import]]
+
| RGBA 
| Imports an AviSynth script into the current script.
+
| RGB32
| [[#Color_formats|All]]
+
| style="padding-left:1em"  | <code>BGRA</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
| style="text-align:center" | x
 +
| style="text-align:center" | {{AvsIcon2}}
 +
 
|-
 
|-
| [[SegmentedAviSource]] / [[SegmentedDirectShowSource]]
+
| RGBA
| Loads up to 100 avi files per argument.
+
|  RGB64
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>BRA[64]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
| style="text-align:center" | x
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[WavSource]]
+
| RGB 
| Opens a WAV file or the audio of an AVI file.
+
| RGBP8
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>G3[0][8]</code>
|}
+
| style="text-align:right;padding-right:3em" | 8
 
+
|
=== Color conversion and adjustment filters ===
+
| style="text-align:center" | {{AvsPluscon2}}
 
+
| ''aka RGBP''
These filters can be used to change the color format or adjust the colors of a clip.
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
|-  
+
| [[ColorYUV]]
+
| Adjusts colors and luma independently.
+
| [[#Color_formats|YUV]]
+
 
|-
 
|-
| [[ConvertBackToYUY2]]
+
| RGB 
| Converts a RGB clip back to YUY2.
+
|  RGBP10
| [[#Color_formats|RGB]]
+
| style="padding-left:1em" | <code>G3[0][10]</code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[ConvertToRGB]]
+
| RGB 
| Converts to RGB32 unless clip is RGB24.
+
|  RGBP12
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>G3[0][12]</code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[ConvertToRGB24]] / [[ConvertToRGB32]] / [[ConvertToYUY2]] / [[ConvertToY8]] / [[ConvertToYV411]] / [[ConvertToYV12]] / [[ConvertToYV16]] / [[ConvertToYV24]]
+
| RGB 
| Converts to RGB24 / RGB32 / YUY2 / Y8 / YV411 / YV12 / YV16 (planar version of YUY2) / YV24 (full YUV).
+
|  RGBP14
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>G3[0][14]</code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[FixLuminance]]
+
| RGB 
| Correct shifting vertical luma offset.
+
|  RGBP16
| YUY2
+
| style="padding-left:1em" | <code>G3[0][16]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[Greyscale]]/[[Grayscale]]
+
| RGB 
| Converts a video to greyscale (no color)
+
|  RGBPS
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[Invert]]
+
| RGBA 
| Inverts selected color channels of a video.
+
|  RGBAP8
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>G4[0][8]</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|  ''aka RGBAP''
 
|-
 
|-
| [[Levels]]
+
| RGBA 
| Scales and clamps the black and white levels, and adjusts the gamma.
+
|  RGBAP10
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>G4[0][10]</code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Limiter]]
+
| RGBA 
| Clips levels to within CCIR-601 range, and optionally highlights pixels outside that range.
+
|  RGBAP12
| [[#Color_formats|YUV]]
+
| style="padding-left:1em" | <code>G4[0][12]</code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[MergeARGB]] / [[MergeRGB]]
+
| RGBA 
| Select and combine a color channel from each of the input video clips.
+
|  RGBAP14
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[MergeChroma]] / [[MergeLuma]]
+
| RGBA 
| Merge (blend) chroma or luma from one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified.
+
|  RGBAP16
| [[#Color_formats|YUV]]
+
| style="padding-left:1em" | <code>G4[0][16]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[RGBAdjust]]
+
| RGBA 
| Adjusts each color channel separately.
+
| RGBAPS
| [[#Color_formats|RGB]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[ShowAlpha]] / [[ShowRed]] / [[ShowGreen]] / [[ShowBlue]]
+
| YUV444
| Shows the selected channel of an (A)RGB clip.
+
| YUV444P8
| [[#Color_formats|RGB]]
+
| style="padding-left:1em" | <code>444P</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}} 
 +
| ''aka YUV444, YV24''
 
|-
 
|-
| [[SwapUV]]
+
| YUV444 
| Swaps chroma channels.
+
|  YUV444P10
| [[#Color_formats|YUV]]
+
| style="padding-left:1em" | <code>Y3[0][10]</code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Tweak]]
+
| YUV444 
| Adjusts the hue, saturation, brightness, and contrast.
+
|  YUV444P12
| [[#Color_formats|YUV]]
+
| style="padding-left:1em" | <code>Y3[0][12]</code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[UToY]] / [[UToY8]] / [[VToY]] / [[VToY8]]
+
| YUV444 
| Copies U or V chroma plane to the Y luma plane.
+
|  YUV444P14
| [[#Color_formats|YUV]], except [[Y8]]
+
| style="padding-left:1em" | <code>Y3[0][14]</code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[YToUV]]
+
| YUV444 
| Puts the luma channels of two clips as U and V channels. Luma is now 50% grey.
+
| YUV444P16
| [[#Color_formats|YUV]]
+
| style="padding-left:1em" | <code>Y3[0][16]</code>
|}
+
| style="text-align:right;padding-right:3em" | 16
 
+
|
=== Overlay and Mask filters ===
+
| style="text-align:center" | {{AvsPluscon2}}
 
+
|
These filters can be used to layer clips with or without using masks and to create masks.
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
 
|-
 
|-
| [[ColorKeyMask]]
+
| YUV444 
| Sets the alpha-channel (similar as Mask does) but generates it by comparing the color.
+
| YUV444PS
| RGB32
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[Layer]]
+
| YUVA444 
| Puts one clip on top of another using different layer (blend) modes and variable opacity. Supports alpha-channel transparency.
+
|  YUVA444P8
| RGB32, YUY2
+
| style="padding-left:1em" | <code>Y4[0][8]</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}} 
 +
| ''aka YUVA444''
 
|-
 
|-
| [[Mask]]
+
| YUVA444 
| Applies an alpha-mask to a clip.
+
|  YUVA444P10
| RGB32
+
| style="padding-left:1em" | <code>Y4[0][10]</code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[MaskHS]]
+
| YUVA444 
| This filter returns a mask (as Y8) of clip using a given hue and saturation range.
+
| YUVA444P12
| [[#Color_formats|YUV]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Merge]]
+
| YUVA444 
| Merge (blend) one video clip into another. There is an optional weighting, so a percentage between the two clips can be specified.
+
| YUVA444P14
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Overlay]]
+
| YUVA444 
| Puts one clip on top of another with optional XY displacement of the overlaying image, using different overlay (blend) modes and variable opacity. Uses a separate ''mask'' clip for transparency information.
+
|  YUVA444P16
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y4[0][16]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[ResetMask]]
+
| YUVA444 
| Applies an "all-opaque" alpha-mask to clip.
+
| YUVA444PS
| RGB32
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[Subtract]]
+
| YUV422
| Shows the difference between the corresponding pixels of two clips.
+
| YUY2
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>YUY2</code>
|}
+
| style="text-align:right;padding-right:3em" | 8
 
+
| style="text-align:center" | x
=== Geometric deformation filters ===
+
| style="text-align:center" | {{AvsIcon2}}
 
+
|
These filters can be used to change image size, process borders or make other deformations of a clip.
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
|-  
+
| [[AddBorders]]
+
| Adds black or colored borders around the image.
+
| [[#Color_formats|All]]
+
 
|-
 
|-
| [[Crop]]
+
| YUV422
| Crops excess pixels from each frame.
+
| YUV422P8
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y42B</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}} 
 +
|  ''aka YUV422, YV16''
 
|-
 
|-
| [[CropBottom]]
+
| YUV422 
| Crops excess pixels from the bottom of each frame.
+
|  YUV422P10
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[10][10]</code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
| style="text-align:center" | x
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|  aka [http://wiki.multimedia.cx/index.php/V210 v210]; [[#footnotes|''VfW only'' {{BoldColor|black|100|§}}]]
 
|-
 
|-
| [[FlipHorizontal]] / [[FlipVertical]]
+
| YUV422 
| Flips the video from left to right/upside-down.
+
|  YUV422P12
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[10][12]</code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Letterbox]]
+
| YUV422 
| Blackens out (or colors out) the top and bottom (and optionally left and right) of each frame.
+
|  YUV422P14
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[10][14]</code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[HorizontalReduceBy2]] / [[VerticalReduceBy2]] / [[ReduceBy2]]
+
| YUV422 
| Reduces the size of each frame by half horizontally, vertically or in both directions.
+
|  YUV422P16
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[10][16]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|  ''aka P216'' 
 
|-
 
|-
| [[BicubicResize]] / [[BilinearResize]] / [[BlackmanResize]] / [[GaussResize]] / [[LanczosResize]] / [[Lanczos4Resize]] / [[PointResize]] / [[SincResize]] / [[Spline16Resize]] / [[Spline36Resize]] / [[Spline64Resize]]
+
| YUV422 
| Rescale the input video frames to an arbitrary new resolution, using different sampling algorithms.
+
|  YUV422PS
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[SkewRows]]
+
| YUVA422 
| Skews (or deskews) the rows of a clip.
+
|  YUVA422P8
| RGB24, RGB32, YUY2, Y8
+
| style="padding-left:1em" | <code>Y4[10][8]</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}} 
 +
| ''aka YUVA422''
 
|-
 
|-
| [[TurnLeft]] / [[TurnRight]] / [[Turn180]]
+
| YUVA422
| Rotates the clip 90 degrees counter-clockwise / 90 degrees clockwise.
+
| YUVA422P10
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y4[10][10]</code>
|}
+
| style="text-align:right;padding-right:3em" | 10
 
+
|
=== Pixel restoration filters ===
+
| style="text-align:center" | {{AvsPluscon2}}
 
+
|
These filters can be used for image detail (pixel) restoration (like denoising, sharpening) of a clip.
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
|-  
+
| [[Blur]] / [[Sharpen]]
+
| Simple 3x3-kernel blurring/sharpening filter.
+
| [[#Color_formats|All]]
+
 
|-
 
|-
| [[GeneralConvolution]]
+
| YUVA422 
| General 3x3 or 5x5 convolution matrix.
+
| YUVA422P12
| RGB32
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[SpatialSoften]] / [[TemporalSoften]]
+
| YUVA422 
| Removes noise from a video clip by selectively blending pixels spatially/temporally.
+
| YUVA422P14
| YUY2 (SpatialSoften), [[#Color_formats|YUV Planar]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[FixBrokenChromaUpsampling]]
+
| YUVA422 
| The free Canopus DV Codec v1.00 upsamples the chroma channels incorrectly (although newer non-free versions appear to work fine). This filter compensates for it.
+
| YUVA422P16
| YUY2
+
| style="padding-left:1em" | <code>Y4[10][16]</code>
|}
+
| style="text-align:right;padding-right:3em" | 16
 
+
|
=== Timeline editing filters ===
+
| style="text-align:center" | {{AvsPluscon2}}
 
+
|
These filters can be used to arrange frames in time (clip cutting, splicing and other editing).
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
 
|-
 
|-
| [[AlignedSplice]] / [[UnalignedSplice]]
+
| YUVA422 
| Joins two or more video clips end to end.
+
|  YUVA422PS
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[AssumeFPS]] / [[AssumeScaledFPS]] / [[ChangeFPS]] / [[ConvertFPS]]
+
| YUV420
| Changes framerate and/or video speed in different ways.
+
| YV12
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>I420</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}}
 +
| ''aka YUV420, YV12''
 
|-
 
|-
| [[DeleteFrame]]
+
| YUV420 
| Deletes a single frame, given as an argument.
+
| YUV420P8
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>I420</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}} 
 +
|  ''aka YUV420, YV12''
 
|-
 
|-
| [[Dissolve]]
+
| YUV420
| Like [[AlignedSplice]], except that the clips are combined with some overlap.
+
| YUV420P10
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[11][10]</code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[DuplicateFrame]]
+
| YUV420
| Duplicates a single frame given as an argument.
+
|  YUV420P12
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[11][12]</code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[FadeIn0]] / [[FadeIn]] / [[FadeIn2]] / [[FadeOut0]] / [[FadeOut]] / [[FadeOut2]] / [[FadeIO0]] / [[FadeIO]] / [[FadeIO2]]
+
| YUV420
| Causes the video stream to fade linearly to black at the start or end.
+
|  YUV420P14
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[11][14]</code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[FreezeFrame]]
+
| YUV420 
| Replaces all the frames between ''first-frame'' and ''last-frame'' with a selected frame.
+
|  YUV420P16
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y3[11][16]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Interleave]]
+
| YUV420 
| Interleaves frames from several clips on a frame-by-frame basis.
+
| YUV420PS
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[Loop]]
+
| YUVA420
| Loops the segment from ''start_frame'' to ''end_frame'' a given number of times.
+
|  YUVA420P8
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y4[11][8]</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}} 
 +
''aka YUVA420''
 
|-
 
|-
| [[Reverse]]
+
| YUVA420
| Makes a clip play in reverse.
+
|  YUVA420P10
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y4[11][10]</code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[SelectEven]] / [[SelectOdd]]
+
| YUVA420
| Makes an output video stream using only the even- or odd-numbered frames.
+
|  YUVA420P12
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[SelectEvery]]
+
| YUVA420
| Selects frames with a fixed period; a generalization of [[SelectEven]] and [[SelectOdd]].
+
| YUVA420P14
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[SelectRangeEvery]]
+
| YUVA420
| Selects a range of frames with a fixed period.
+
|  YUVA420P16
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y4[11][16]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
|
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Trim]]
+
| YUV420 
| Trims a video clip so that it includes only the frames ''first_frame'' through ''last_frame''.
+
| YUVA420PS
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
|}
+
| style="text-align:right;padding-right:3em" | 32
 
+
|
=== Interlace filters ===
+
| style="text-align:center" | {{AvsPluscon2}}
 
+
|
These filters can be used for creating and processing field-based material (which is frame-based material separated into fields). AviSynth is capable of dealing with both progressive and interlaced material. The main problem is, that it often doesn't know what it receives from source filters. This is the reason that the field-based flag exists and can be used when dealing with interlaced material. More information about field-based video can be found [[Interlaced_fieldbased|here]].
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
|-
+
| [[AssumeFrameBased]] / [[AssumeFieldBased]]
+
| Forces frame-based or field-based material.
+
| [[#Color_formats|All]]
+
|-
+
| [[AssumeBFF]] / [[AssumeTFF]]
+
| Forces field order.
+
| [[#Color_formats|All]]
+
|-
+
| [[Bob]]
+
| Takes a clip and [[Wikipedia:Deinterlacing#Field_extension_deinterlacing|bob-deinterlaces]] it.
+
| [[#Color_formats|All]]
+
|-
+
| [[ComplementParity]]
+
| Changes top fields to bottom fields and vice-versa.
+
| [[#Color_formats|All]]
+
 
|-
 
|-
| [[DoubleWeave]]
+
| YUV411
| Operates like [[Weave]], except that it produces double the number of frames by combining both the odd and even pairs of fields.
+
| YUV411P8
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y41B</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
|
 +
| style="text-align:center" | {{AvsIcon2}} 
 +
|  ''aka YUV411, YV411''
 
|-
 
|-
| [[PeculiarBlend]]
+
| YUV410
| Blends each frame with the following frame in a peculiar way.
+
| YUV9
| YUY2
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|  ''read only?''
 
|-
 
|-
| [[Pulldown]]
+
| Y only
| Selects two out of every five frames of the source video.
+
| Y8
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y800</code>
 +
| style="text-align:right;padding-right:3em" | 8
 +
| style="text-align:center" | (both)
 +
| style="text-align:center" | {{AvsIcon2}}
 +
 
|-
 
|-
| [[SeparateColumns]] / [[SeparateRows]]
+
| Y only 
| Separates the columns or rows of each frame into new frames.
+
|  Y10
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 10
 +
| style="text-align:center" | (both) 
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|-
 
|-
| [[SeparateFields]]
+
| Y only 
| Splits each frame into its component top and bottom fields.
+
| Y12
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 12
 +
| style="text-align:center" | (both) 
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[SwapFields]]
+
| Y only 
| Swaps the two fields in an interlaced frame.
+
| Y14
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 14
 +
| style="text-align:center" | (both) 
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[Weave]]
+
| Y only 
| Combines fields together to produce interlaced frames.
+
|  Y16
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code>Y1[0][16]</code>
 +
| style="text-align:right;padding-right:3em" | 16
 +
| style="text-align:center" | (both) 
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
 
|-
 
|-
| [[WeaveColumns]] / [[WeaveRows]]
+
| Y only 
| Takes a clip and weaves sets of columns or rows together to produce composite frames.
+
|  Y32
| [[#Color_formats|All]]
+
| style="padding-left:1em" | <code></code>
 +
| style="text-align:right;padding-right:3em" | 32
 +
| style="text-align:center" | (both)
 +
| style="text-align:center" | {{AvsPluscon2}}
 +
|
 
|}
 
|}
 +
{{HiddenAnchor|footnotes}}
  
=== Audio processing filters ===
+
{| border="0"
 
+
These filters process audio. Audio samples will be automatically converted if any filters requires a special type of sample. This means that if a filter doesn't support the type of sample it is given, it will automatically convert the samples to something it supports. The internal formats supported in each filter is listed in the sample type column. A specific sample type can be forced by using the [[ConvertAudio]] functions.
+
 
+
{{AvsPluscon}} automatic conversion is ''not'' performed. The new behavior is to raise an error when a sample type is not compatible. It is your responsibility to use [[ConvertAudio]] where needed.
+
 
+
[[Float]] audio is converted to 16 bit when [[Frameserver|frameserving]] through [[ACM]], unless [[Internal_functions#OPT_AllowFloatAudio|OPT_AllowFloatAudio]] is set to true. In that case the audio is kept as it is. When accessing AviSynth directly (like MeGUI, BeHappy or ffmpeg do for example), there is no automatic conversion.
+
 
+
The automatic conversion is done for clients that cannot handle [[Float]] audio (in the old days most of them couldn't). Note conversion takes place ''after'' the script processing is finished. [[Float]] audio is always allowed within the script.
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Sample type
+
 
|-
 
|-
| [[Amplify]] / [[AmplifydB]]
+
|align="center" style="width:3em"|{{AvsIcon2}}
| Amplify multiply audio samples by amount.
+
| Supported in AviSynth 2.6.x
| 16 bit, Float
+
 
|-
 
|-
| [[AssumeSampleRate]]
+
|align="center"|{{AvsPluscon2}}
| Adjusts the playback speed of the audio.
+
| Supported in both AviSynth &amp; AviSynth+
| All
+
 
|-
 
|-
| [[AudioDub]] / [[AudioDubEx]]
+
|align="center"|{{BoldColor|black|140|¹}}
| ''AudioDub'' takes the video stream from the first argument and the audio stream from the second argument and combines them. ''AudioDubEx'' is similar, but it doesn't throw an exception if both clips don't have a video or audio stream.
+
|''[[FourCC]]: 4 characters used to identify media data formats. Data from [https://www.ffmpeg.org/ ffmpeg]. Unknown if blank.''
| All
+
 
|-
 
|-
| [[AudioTrim]]
+
|align="center"|{{BoldColor|black|140|²}}
| Trims an audio clip so that it includes only the ''start_time'' through ''end_time''.
+
|''32bit is floating-point; all others are integer.''
| All
+
 
|-
 
|-
| [[ConvertAudioTo8bit]] / [[ConvertAudioTo16bit]] / [[ConvertAudioTo24bit]] / [[ConvertAudioTo32bit]] / [[ConvertAudioToFloat]]
+
|align="center"|{{BoldColor|black|140|³}}
| Converts audio samples to 8/16/24/32/Float bits.
+
|''[[Interleaved]] if marked; else [[Planar]].''
| All
+
 
|-
 
|-
| [[ConvertToMono]]
+
|align="center"|{{BoldColor|black|100|§}}
| Merges all audio channels.
+
|''VfW only: this format is served to [[wikipedia:Video_for_Windows|Video for Windows]] clients but not used within AviSynth''
| 16 bit, Float
+
 
|-
 
|-
| [[DelayAudio]]
+
|align="center"|{{BoldColor|black|100|§}}
| Delays the audio track by second seconds.
+
|''v210 output requires [[Internal_functions#OPT_Enable_V210|OPT_Enable_V210]]''
| All
+
|-
+
| [[EnsureVBRMP3Sync]]
+
| Corrects out-of-sync MP3-AVI's, when seeking or trimming.
+
| All
+
|-
+
| [[GetChannel]] / [[GetLeftChannel]] / [[GetRightChannel]]
+
| Returns an audio channel from a clip.
+
| All
+
|-
+
| [[KillAudio]] / [[KillVideo]]
+
| Removes the audio or video from a clip completely.
+
| All
+
|-
+
| [[MergeChannels]]
+
| Merges channels of two audio clips.
+
| All
+
|-
+
| [[MixAudio]]
+
| Mixes audio from two clips.
+
| 16 bit, Float
+
|-
+
| [[MonoToStereo]]
+
| Converts two mono signals to one stereo signal.
+
| 16 bit, Float
+
|-
+
| [[Normalize]]
+
| Amplifies the entire waveform as much as possible, without clipping.
+
| 16 bit, Float
+
|-
+
| [[ResampleAudio]]
+
| Performs a high-quality change of audio sample rate.
+
| 16 bit, Float
+
|-
+
| [[SuperEQ]]
+
| High quality 18 band sound equalizer.
+
| Float
+
|-
+
| [[SSRC]]
+
| Very high quality sample rate conversion.
+
| Float
+
|-
+
| [[TimeStretch]]
+
| Change speed of a sound without changing the pitch, and change pitch without changing duration.
+
| Float
+
 
|}
 
|}
  
=== Conditional and other meta filters  ===
+
===== See also: =====
 +
* [[Convert]]
 +
* [[ConvertBits]]
  
''Meta'' filters can be used to control other filters' execution. The basic characteristic of conditional filters is that their scripts are evaluated (executed) at every frame instead of when the clip is loaded. This allows for complex video processing that would be difficult or impossible to be performed by a normal AviSynth script.  
+
===== External Links: =====
 +
* [http://msdn.microsoft.com/en-us/library/windows/desktop/bb970578(v=vs.85).aspx ''10-bit and 16-bit YUV Video Formats''] (microsoft.com)
 +
* [http://wiki.multimedia.cx/index.php/V210 ''V210''] (multimedia.cx)
 +
* [http://www.fourcc.org/yuv.php ''YUV pixel formats''] (fourcc.org)
 +
* [http://www.fourcc.org/rgb.php ''RGB pixel formats''] (fourcc.org)
 +
</div>
 +
</div>
  
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
[[Category:Avisynthplus]]
!width=25%| Filter
+
<!--
!width=50%| Description
+
!width=15%| Color format
+
|-
+
| [[ConditionalFilter]] / [[FrameEvaluate]] / [[ScriptClip]] / [[ConditionalSelect]]
+
| ''ConditionalFilter'' returns source1 if some condition is met, otherwise it returns source2. ''ScriptClip/FrameEvaluate'' returns the clip which is returned by the function evaluated on every frame. ''ConditionalSelect'' returns one frame from several sources based on an integer evaluator.
+
| [[#Color_formats|All]]
+
|-
+
| [[ConditionalReader]]
+
| Import information from a text file, with different values for each frame - or a range of frames.
+
| [[#Color_formats|All]]
+
|-
+
| [[WriteFile]] / [[WriteFileIf]] / [[WriteFileStart]] / [[WriteFileEnd]]
+
| These filters evaluate expressions and output the results to a text-file.
+
| [[#Color_formats|All]]
+
|-
+
| [[Animate]] / [[ApplyRange]]
+
| ''Animate'' is a meta-filter which evaluates another filter with continuously varying arguments.
+
''ApplyRange'' 'is a special case of ''Animate'' where ''start_args'' = ''end_args''.
+
| [[#Color_formats|All]]
+
|-
+
| [[TCPServer]] / [[TCPSource]]
+
| Send clips over your network. You can connect several clients to the same machine.
+
| [[#Color_formats|All]]
+
|}
+
 
+
=== Export filters ===
+
 
+
These filters can write directly to media files.
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
|-
+
| [[ImageWriter]]
+
| Writes frames as images to your hard disk. See [[#Source_filters|ImageReader]].
+
| [[#Color_formats|All]]
+
|}
+
 
+
=== Debug filters ===
+
 
+
{| style="height:100px; width:95%" border="1" cellpadding="4" class="wikitable"
+
!width=25%| Filter
+
!width=50%| Description
+
!width=15%| Color format
+
|-
+
| [[BlankClip]] / [[Blackness]]
+
| Produces a solid color, silent video clip of the specified length (in frames).
+
| [[#Color_formats|All]]
+
|-
+
| [[ColorBars]] / [[ColorBarsHD]]
+
| Produce a video clip containing SMPTE colorbars scaled to any image size.
+
| RGB32, YUY2, YV12, YV24
+
|-
+
| [[Compare]]
+
| Compares two clips and prints out information about the differences.
+
| [[#Color_formats|All]]
+
|-
+
| [[Echo]]
+
| Forces internal <tt>GetFrame</tt> calls to all input clips. Returns only first clip result.
+
| [[#Color_formats|All]]
+
|-
+
| [[Histogram]]
+
| A multipurpose audio/video analysis tool.
+
| [[#Color_formats|All]]
+
|-
+
| [[Info]]
+
| Prints out image and sound information.
+
| [[#Color_formats|All]]
+
|-
+
| [[MessageClip]]
+
| Produces a clip containing a text message.
+
| RGB32
+
|-
+
| [[Preroll]]
+
| Preroll the audio or video on non-linear access.
+
| [[#Color_formats|All]]
+
|-
+
| [[ShowFiveVersions]]
+
| Takes five video clips and combines them in a staggered arrangement from left to right.
+
| [[#Color_formats|All]]
+
|-
+
| [[ShowFrameNumber]] / [[ShowSMPTE]] / [[ShowTime]]
+
| Draws text on every frame indicating what number AviSynth thinks it is.
+
| [[#Color_formats|All]]
+
|-
+
| [[StackHorizontal]] / [[StackVertical]]
+
| Takes two or more video clips and displays them together in left-to-right/up-to-down order.
+
| [[#Color_formats|All]]
+
|-
+
| [[Subtitle]]
+
| Adds anti-aliased text to a range of frames.
+
| [[#Color_formats|All]]
+
|-
+
| [[Tone]]
+
| Generates a sound.
+
| Float
+
|-
+
| [[Version]]
+
| Generates a video clip with a short AviSynth version and copyright statement.
+
| RGB24
+
|}
+
 
+
 
+
{{HiddenAnchor|Color_formats}}
+
=== Footnote: Color Formats ===
+
  
''The above filters work with the following named color formats.''
+
{| style="height:100px; border="1" cellpadding="4" class="wikitable"
{| style="height:100px" border="1" cellpadding="4" class="wikitable"
+
 
|-
 
|-
 
!Name
 
!Name
Line 573: Line 565:
 
| [[YV24]]&diams;, [[YV16]]&diams;, [[YV12]], [[YV411]]&diams;, [[Y8]]&diams;&nbsp;
 
| [[YV24]]&diams;, [[YV16]]&diams;, [[YV12]], [[YV411]]&diams;, [[Y8]]&diams;&nbsp;
 
|}
 
|}
(&diams; = not supported in AviSynth version 2.58 or below)
 
 
</div>
 
  
 +
{| border="0"
 +
|-
 +
| colspan="2"|''Notes and exceptions.''
 +
|-
 +
| style="width:1.5em" |&diams;
 +
| Not supported in AviSynth version 2.58 or below
 +
|-
 +
| §
 +
| 8-bit only; no [[Deep_Color|Deep color]]
 +
|-
 +
| &hearts;
 +
| 32-bit Float not supported (8, 10, 12, 14, 16 bit)
 +
|-
 +
| ¦
 +
| [[Planar]] color not supported
 +
|-
 +
| ?
 +
| [[Interleaved]] color not supported
 +
|}
  
[[Category:AviSynth_Usage]]
+
-->
[[Category:AviSynth_Syntax]]
+

Revision as of 04:22, 16 October 2017

AviSynth+

All AVS+ color formats (pixel types)

Group PixelType FourCC¹ Bit depth² Interleaved³ Version Remarks
RGB RGB24 BGR[24] 8 x [A]
RGB RGB48 BGR0 16 x [+]
RGBA RGB32 BGRA 8 x [A]
RGBA RGB64 BRA[64] 16 x [+]
RGB RGBP8 G3[0][8] 8 [+] aka RGBP
RGB RGBP10 G3[0][10] 10 [+]
RGB RGBP12 G3[0][12] 12 [+]
RGB RGBP14 G3[0][14] 14 [+]
RGB RGBP16 G3[0][16] 16 [+]
RGB RGBPS 32 [+]
RGBA RGBAP8 G4[0][8] 8 [+] aka RGBAP
RGBA RGBAP10 G4[0][10] 10 [+]
RGBA RGBAP12 G4[0][12] 12 [+]
RGBA RGBAP14 14 [+]
RGBA RGBAP16 G4[0][16] 16 [+]
RGBA RGBAPS 32 [+]
YUV444 YUV444P8 444P 8 [A] aka YUV444, YV24
YUV444 YUV444P10 Y3[0][10] 10 [+]
YUV444 YUV444P12 Y3[0][12] 12 [+]
YUV444 YUV444P14 Y3[0][14] 14 [+]
YUV444 YUV444P16 Y3[0][16] 16 [+]
YUV444 YUV444PS 32 [+]
YUVA444 YUVA444P8 Y4[0][8] 8 [A] aka YUVA444
YUVA444 YUVA444P10 Y4[0][10] 10 [+]
YUVA444 YUVA444P12 12 [+]
YUVA444 YUVA444P14 14 [+]
YUVA444 YUVA444P16 Y4[0][16] 16 [+]
YUVA444 YUVA444PS 32 [+]
YUV422 YUY2 YUY2 8 x [A]
YUV422 YUV422P8 Y42B 8 [A] aka YUV422, YV16
YUV422 YUV422P10 Y3[10][10] 10 x [+] aka v210; VfW only §
YUV422 YUV422P12 Y3[10][12] 12 [+]
YUV422 YUV422P14 Y3[10][14] 14 [+]
YUV422 YUV422P16 Y3[10][16] 16 [+] aka P216
YUV422 YUV422PS 32 [+]
YUVA422 YUVA422P8 Y4[10][8] 8 [A] aka YUVA422
YUVA422 YUVA422P10 Y4[10][10] 10 [+]
YUVA422 YUVA422P12 12 [+]
YUVA422 YUVA422P14 14 [+]
YUVA422 YUVA422P16 Y4[10][16] 16 [+]
YUVA422 YUVA422PS 32 [+]
YUV420 YV12 I420 8 [A] aka YUV420, YV12
YUV420 YUV420P8 I420 8 [A] aka YUV420, YV12
YUV420 YUV420P10 Y3[11][10] 10 [+]
YUV420 YUV420P12 Y3[11][12] 12 [+]
YUV420 YUV420P14 Y3[11][14] 14 [+]
YUV420 YUV420P16 Y3[11][16] 16 [+]
YUV420 YUV420PS 32 [+]
YUVA420 YUVA420P8 Y4[11][8] 8 [A] aka YUVA420
YUVA420 YUVA420P10 Y4[11][10] 10 [+]
YUVA420 YUVA420P12 12 [+]
YUVA420 YUVA420P14 14 [+]
YUVA420 YUVA420P16 Y4[11][16] 16 [+]
YUV420 YUVA420PS 32 [+]
YUV411 YUV411P8 Y41B 8 [A] aka YUV411, YV411
YUV410 YUV9 8 [+] read only?
Y only Y8 Y800 8 (both) [A]
Y only Y10 10 (both) [+]
Y only Y12 12 (both) [+]
Y only Y14 14 (both) [+]
Y only Y16 Y1[0][16] 16 (both) [+]
Y only Y32 32 (both) [+]
[A] Supported in AviSynth 2.6.x
[+] Supported in both AviSynth & AviSynth+
¹ FourCC: 4 characters used to identify media data formats. Data from ffmpeg. Unknown if blank.
² 32bit is floating-point; all others are integer.
³ Interleaved if marked; else Planar.
§ VfW only: this format is served to Video for Windows clients but not used within AviSynth
§ v210 output requires OPT_Enable_V210
See also:
External Links:
Personal tools