PlanarTools: Difference between revisions
From Avisynth wiki
Jump to navigationJump to search
Raffriff42 (talk | contribs) redirect for convenient searching |
Added an example |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{FilterCat5|External_filters|Plugins|Plugins_x64|Adjustment_filters|Colourspace_Conversion}} | |||
{{ | {{Filter3 | ||
|{{Author/Chikuzen}} | |||
|v0.3.1 | |||
|[https://github.com/FranceBB/PlanarTools/releases/download/0.3.2/PlanarTools-0.3.2.zip PlanarTools-0.3.2.zip] | |||
|Colourspace Conversion | |||
|[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | |||
|6=}} | |||
== Description == | |||
This plugin is a set of filters that offers converting packed(interleaved) formats to planar formats and vice versa. | |||
AviSynth has these already as internal filters, but those are a little difficult to use, and optimization is insufficient. | |||
<br> | |||
<br> | |||
== Requirements == | |||
* [x86]: [[AviSynth+]] or [http://sourceforge.net/projects/avisynth2/ AviSynth 2.6] | |||
* [x64]: [[AviSynth+]] | |||
* Supported color formats: [[RGB24]], [[RGB32]], [[YUY2]], [[Y8]], [[YV12]], [[YV16]], [[YV24]] | |||
* SSE2 Capable CPU | |||
<br> | |||
* [https://www.microsoft.com/en-us/download/details.aspx?id=53587 Microsoft Visual C++ 2015 Redistributable Package (x86 / x64)] | |||
:<span style="color:red">***</span> <tt>vcredist_x86.exe</tt> is required for <tt>PlanarTools-x86</tt> | |||
:<span style="color:red">***</span> <tt>vcredist_x64.exe</tt> is required for <tt>PlanarTools-x64</tt> | |||
<br> | |||
== [[Script variables|Syntax and Parameters]] == | |||
===PackedToPlanar=== | |||
Convert packed format to planar format without changing the pixel values. | |||
:{{Template:FuncDef|PackedToPlanar (clip clip)}} | |||
<br> | |||
::{{Par2| |clip| }} | |||
:::Input clip must be RGB24, RGB32, or YUY2. Output format is YV24(RGB24, RGB32) or YV16(YUY2). | |||
<br> | |||
===ExtractPlane=== | |||
Extract a color channel from packed format, and output as a Y8 clip. | |||
<br> | |||
:{{Template:FuncDef|PackedToPlanar (clip clip, int "plane")}} | |||
<br> | |||
::{{Par2| |clip| }} | |||
:::Input clip must be RGB24, RGB32, or YUY2. | |||
<br> | |||
::{{Par2|plane|int| }} | |||
:::Color channel to extract. Default is 0 for (RGB24/YUY2) or 3 for (RGB32). | |||
:::*0 : Blue(RGB24/RGB32) or Y(YUY2) | |||
:::*1 : Green(RGB24/RGB32) or U(YUY2) | |||
:::*2 : Red(RGB24/RGB32) or V(YUY2). 3: Alpha(RGB32) | |||
:::This is same as ShowGreen/ShowBlue/ShowRed/ShowAlpha(on RGB) or ConvertToY8/UToY8/VToY8(on YUY2), but faster. | |||
<br> | |||
===PlanarToRGB32=== | |||
Make a RGB32 clip from multiple planar format clips without changing the pixel values. | |||
:{{Template:FuncDef|PlanarToRGB32(clip base, clip alpha)}} | |||
:{{Template:FuncDef|PlanarToRGB32(clip green, clip blue, clip red, clip alpha)}} | |||
<br> | |||
::{{Par2| |clip| }} | |||
:::Base clip: YV24 only. Each planes are mapped as follows: <code>Y : Green | U : Blue | V : Red</code> | |||
<br> | |||
::{{Par2| |clip| }} | |||
::{{Par2| |clip| }} | |||
::{{Par2| |clip| }} | |||
:::Green, blue, red - planar formats clips. Only Y-planes are used. | |||
<br> | |||
::{{Par2| |clip| }} | |||
:::Alpha - planar format. Only Y-plane is used. must be the same resolution of others. | |||
<br> | |||
===RGBToRGB=== | |||
Convert RGB24 clip to RGB32, and vice versa. | |||
:{{Template:FuncDef|RGBToRGB (clip clip)}} | |||
<br> | |||
::{{Par2| |clip| }} | |||
:::Input clip must be RGB24 or RGB32. | |||
<br> | |||
== Examples == | |||
<pre> | |||
ColorBars(848, 480, pixel_type="YUY2") | |||
#Convert from YUY2 to YV16 | |||
PackedToPlanar() | |||
</pre> | |||
<br> | |||
<br> | |||
==Notes== | |||
* All filters are SSE2 optimized. Thus these will cause crash on No SSE2 machine. | |||
* RGBToRGB requires SSSE3. If SSSE3 is not available on your machine, it invoke internal ConvertToRGB24/ConvertToRGB32 filter instead. | |||
<br> | |||
==External Links == | |||
*[https://github.com/chikuzen/PlanarTools GitHub] - Chikuzen Official Source code repository. | |||
*[https://github.com/FranceBB/PlanarTools/releases GitHub] - FranceBB builds | |||
<br> | |||
<br> | |||
----------------------------------------------- | |||
'''Back to [[External_filters#Colourspace_Conversion|External Filters]] ←''' | |||
Latest revision as of 17:05, 28 April 2025
| Abstract | |
|---|---|
| Author | Chikuzen |
| Version | v0.3.1 |
| Download | PlanarTools-0.3.2.zip |
| Category | Colourspace Conversion |
| License | GPLv2 |
| Discussion | |
Description
This plugin is a set of filters that offers converting packed(interleaved) formats to planar formats and vice versa.
AviSynth has these already as internal filters, but those are a little difficult to use, and optimization is insufficient.
Requirements
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- Supported color formats: RGB24, RGB32, YUY2, Y8, YV12, YV16, YV24
- SSE2 Capable CPU
- *** vcredist_x86.exe is required for PlanarTools-x86
- *** vcredist_x64.exe is required for PlanarTools-x64
PackedToPlanar
Convert packed format to planar format without changing the pixel values.
- PackedToPlanar (clip clip)
- clip =
- Input clip must be RGB24, RGB32, or YUY2. Output format is YV24(RGB24, RGB32) or YV16(YUY2).
- clip =
ExtractPlane
Extract a color channel from packed format, and output as a Y8 clip.
- PackedToPlanar (clip clip, int "plane")
- clip =
- Input clip must be RGB24, RGB32, or YUY2.
- clip =
- int plane =
- Color channel to extract. Default is 0 for (RGB24/YUY2) or 3 for (RGB32).
- 0 : Blue(RGB24/RGB32) or Y(YUY2)
- 1 : Green(RGB24/RGB32) or U(YUY2)
- 2 : Red(RGB24/RGB32) or V(YUY2). 3: Alpha(RGB32)
- This is same as ShowGreen/ShowBlue/ShowRed/ShowAlpha(on RGB) or ConvertToY8/UToY8/VToY8(on YUY2), but faster.
- Color channel to extract. Default is 0 for (RGB24/YUY2) or 3 for (RGB32).
- int plane =
PlanarToRGB32
Make a RGB32 clip from multiple planar format clips without changing the pixel values.
- PlanarToRGB32(clip base, clip alpha)
- PlanarToRGB32(clip green, clip blue, clip red, clip alpha)
- clip =
- Base clip: YV24 only. Each planes are mapped as follows:
Y : Green | U : Blue | V : Red
- Base clip: YV24 only. Each planes are mapped as follows:
- clip =
- clip =
- clip =
- clip =
- Green, blue, red - planar formats clips. Only Y-planes are used.
- clip =
- clip =
- Alpha - planar format. Only Y-plane is used. must be the same resolution of others.
- clip =
RGBToRGB
Convert RGB24 clip to RGB32, and vice versa.
- RGBToRGB (clip clip)
- clip =
- Input clip must be RGB24 or RGB32.
- clip =
Examples
ColorBars(848, 480, pixel_type="YUY2") #Convert from YUY2 to YV16 PackedToPlanar()
Notes
- All filters are SSE2 optimized. Thus these will cause crash on No SSE2 machine.
- RGBToRGB requires SSSE3. If SSSE3 is not available on your machine, it invoke internal ConvertToRGB24/ConvertToRGB32 filter instead.
External Links
Back to External Filters ←