AviSynthShader
From Avisynth wiki
Abstract | |
---|---|
Author | mysteryx93 |
Version | v1.6.5 |
Download | AviSynthShader-1.6.5.zip |
Category | Multipurpose |
License | |
Discussion | Doom9 Forum |
Contents |
Description
This plugin allows running HLSL pixel shaders within AviSynth. This gives access to various HLSL filters that haven't been programmed in AviSynth.
Requirements
Syntax and Parameters
ConvertToShader
Converts a clip into a wider frame containing UINT16 or half-float data. Clips must be converted in such a way before running any shader.
16-bit-per-channel half-float data isn't natively supported by AviSynth. It is stored in a RGB32 container with a Width that is twice larger. When using Clip.Width, you must divine by 2 to get the accurate width.
- ConvertToShader (clip, int "Precision", bool "lsb", bool "planar", int "opt")
- clip =
- Input clip.
- clip =
- int Precision = 1
- Precision:
- 0 to convert to Y8
- 1 to convert into BYTE (default)
- 2 to convert into UINT16
- 3 to convert into half-float
- Precision:
- int Precision = 1
- bool lsb = false
- Whether to convert from DitherTools' Stack16 format. Only YV12 and YV24 are supported. Default=false
- bool lsb = false
- bool planar = false
- True to convert into YV24 planar data to reduce memory transfers. If you assign such a clip to Clip1, the shader will receive the 3 planes as Clip1, Clip2 and Clip3. Default=false
- bool planar = false
- int opt = -1
- Optimization path:
- In AviSynth 2.6, 0 for only C++, 1 for SSE2, 2 for AVX(only used with Precision=3), -1 to auto-detect.
- In AviSynth+, -1 to use the AviSynth+ code path, other values to use legacy code paths.
- Default=-1
- Optimization path:
- int opt = -1
ConvertFromShader
Convert a half-float clip into a standard clip.
- ConvertFromShader (clip, int "Precision", string "Format", bool "lsb", int "opt")
- clip =
- Input clip.
- clip =
- int Precision = 1
- Precision:
- 0 to convert to Y8
- 1 to convert into BYTE (default)
- 2 to convert into UINT16
- 3 to convert into half-float
- Precision:
- int Precision = 1
- string Format = "YV12"
- The video format to convert to. Valid formats are YV12, YV24 and RGB32. Default=YV12.
- string Format = "YV12"
- bool lsb = false
- Whether to convert to DitherTools' Stack16 format. Only YV12 and YV24 are supported. Default=false
- bool lsb = false
- int opt = -1
- Optimization path:
- In AviSynth 2.6, 0 for only C++, 1 for SSE2, 2 for AVX(only used with Precision=3), -1 to auto-detect.
- In AviSynth+, -1 to use the AviSynth+ code path, other values to use legacy code paths.
- Default=-1
- Optimization path:
- int opt = -1
Examples
TODO
<>
Changelog
Version Date Changes
v1.6.5 2018/05/13 - Fixed crash on NVidia cards when PlanarOut=true
External Links
- GitHub - Source code repository.
Back to External Filters ←