FillBorders
From Avisynth wiki
(Difference between revisions)
m (add x64 category) |
(FillBorders 1.4.1) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Borders and Cropping|Deep_color_tools}} |
{{Filter3 | {{Filter3 | ||
− | |[http://github.com/dubhater dubhater] / Asd | + | |1=[http://github.com/dubhater dubhater] / {{Author/Asd-g}} |
− | | | + | |2=v1.4.1 |
− | |3=[ | + | |3=[https://github.com/Asd-g/AviSynth-FillBorders/releases FillBorders-1.4.1.7z] |
|4=Borders and Cropping | |4=Borders and Cropping | ||
|5=[http://www.wtfpl.net/ WTFPL] | |5=[http://www.wtfpl.net/ WTFPL] | ||
Line 10: | Line 10: | ||
== Description == | == Description == | ||
− | This is a simple filter that fills the borders of a clip, without changing the clip's dimensions. | + | This is a simple filter that fills the borders of a clip, without changing the clip's dimensions. It has 6 border filling modes. |
<br> | <br> | ||
<br> | <br> | ||
== Requirements == | == Requirements == | ||
− | * [[AviSynth+]] | + | * [[AviSynth+]] 3.6 or later |
− | * Supported color formats: 8 | + | * Supported color formats: all [[planar]] formats (8/10/12/14/16/32-bit, Y, YUV(A), and RGB(A) with or without alpha) are supported. |
− | + | ||
<br> | <br> | ||
+ | * [https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads Microsoft Visual C++ 2019 Redistributable Package (x86 / x64)] | ||
+ | :<span style="color:red">***</span> <tt>vcredist_x86.exe</tt> required for <tt>FillBorders-x86</tt> | ||
+ | :<span style="color:red">***</span> <tt>vcredist_x64.exe</tt> required for <tt>FillBorders-x64</tt> | ||
+ | <br> | ||
+ | |||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
− | :{{Template:FuncDef|FillBorders (clip, int "left", int "top", int "right", int "bottom", int "mode")}} | + | :{{Template:FuncDef|FillBorders (clip, int[] "left", int[] "top", int[] "right", int[] "bottom", int "mode", int "y", int "u", int "v")}} |
+ | :{{Template:FuncDef|FillMargins (clip, int "left", int "top", int "right", int "bottom", int "y", int "u", int "v")}} | ||
<br> | <br> | ||
::{{Par2| |clip| }} | ::{{Par2| |clip| }} | ||
− | ::: | + | :::A clip to process. All [[planar]] formats are supported. |
− | + | <br> | |
− | ::{{Par2|left|int|0}} | + | ::{{Par2|left|int[]|0}} |
− | ::{{Par2|top|int|0}} | + | ::{{Par2|top|int[]|0}} |
− | ::{{Par2|right|int|0}} | + | ::{{Par2|right|int[]|0}} |
− | ::{{Par2|bottom|int|0}} | + | ::{{Par2|bottom|int[]|0}} |
:::Number of pixels to fill on each side. These can be any non-negative numbers, within reason. If they are all 0, the input clip is simply passed through. | :::Number of pixels to fill on each side. These can be any non-negative numbers, within reason. If they are all 0, the input clip is simply passed through. | ||
− | + | :::For FillBorders: | |
+ | These must be used as named parameters. For example, `FillBorders(left=1, top=1, right=1, bottom=1)`. | ||
+ | If a single value for `left`/`top`/`right`/`bottom` is specified, it will be used for alpha plane and it will be right shifted by subsampling factor for chroma planes. | ||
+ | If two values are given then the second value will be used for the third plane and the first value will be used for alpha plane. | ||
+ | If three values are given then the first value will be used for alpha plane. | ||
+ | <br> | ||
::{{Par2|mode|int|0}} | ::{{Par2|mode|int|0}} | ||
− | :::*0 : Fills the borders exactly like the AviSynth filter [[FillMargins]], version 1.0.2.0. This mode is similar to mode 1, except that each pixel at the top and bottom borders is filled with a weighted average of its three neighbours from the previous line. | + | :::Mode (FillBorders only): |
− | :::*1 : Fills the borders using the outermost line or column (aka "repeat"). | + | :::*0 : "fillmargins" <br> Fills the borders exactly like the AviSynth filter [[FillMargins]], version 1.0.2.0. This mode is similar to mode 1, except that each pixel at the top and bottom borders is filled with a weighted average of its three neighbours from the previous line. |
− | :::*2 : Fills the borders by mirroring. | + | :::*1 : "repeat" <br> Fills the borders using the outermost line or column (aka "repeat"). |
− | + | :::*2 : "mirror" <br> Fills the borders by mirroring. | |
+ | :::*3 : "reflect" <br> Fills the borders by reflecting (whole sample symmetric). | ||
+ | :::*4 : "wrap" <br> Fills the borders by wrapping. | ||
+ | :::*5 : "fade" <br> Fill the borders to constant value. | ||
+ | :::*6 : "fixborders" <br> A direction "aware" modification of FillMargins. It also works on all four sides. | ||
+ | <br> | ||
+ | ::{{Par2|y|int|3}} | ||
+ | ::{{Par2|u|int|3}} | ||
+ | ::{{Par2|v|int|3}} | ||
+ | :::Planes to process. | ||
+ | :::*1 : Return garbage. | ||
+ | :::*2 : Copy plane. | ||
+ | :::*3 : Process plane. Always process planes when the clip is RGB. | ||
+ | <br> | ||
+ | :'''Note:''' <code>FillMargins()</code> is an alias for <code>FillBorders(mode=0)</code> | ||
<br> | <br> | ||
== Examples == | == Examples == | ||
[[AviSource]]("Blah.avi") | [[AviSource]]("Blah.avi") | ||
− | FillBorders(left=5,top=7, right=2, bottom=0) | + | FillBorders(left=5, top=7, right=2, bottom=0, mode=0)<br> |
+ | #identical to: FillMargins(left=5, top=7, right=2, bottom=0) | ||
<br> | <br> | ||
== Changelog == | == Changelog == | ||
Version Date Changes<br> | Version Date Changes<br> | ||
− | + | v1.4.1 2023/04/26 - Fixed set of memory for high bit depth video. | |
− | + | v1.4.0 2023/04/25 - Dropped support for AviSynt 2.6. | |
− | + | - Changed type of parameters left, top, right, bottom to arrays. (FillBorders only) | |
− | + | - Added support for alpha plane. | |
− | + | v1.3.0 2021/06/25 - Added mode 6 (fixborders) (from vs FillBorders). | |
− | + | v1.2.1 2021/02/18 - Not allowed clips with _FieldBased > 0. | |
− | + | v1.2.0 2021/02/17 - Added additional modes (from ffmpeg): 3 (reflect); 4 (wrap); 5 (fade). | |
− | + | v1.1.0 2020/08/11 - Added support for float. | |
− | + | - Added y, u, v, parameters. | |
− | + | - AviSynth+: self-registers as [[MT_NICE_FILTER]]. | |
− | + | - Removed parameter mode from FillMargins.<br> | |
− | + | v1.0.0 2020/05/17 - Move project to GitHub | |
− | + | - Add FillMargins function<br> | |
+ | 20190410 2019/04/10 - First release | ||
+ | - Port from VapourSynth plugin by Dubhater | ||
+ | - Author: Asd<br> | ||
<br> | <br> | ||
+ | |||
== External Links == | == External Links == | ||
− | *[https://github.com/dubhater/vapoursynth-fillborders GitHub] - VapourSynth version | + | *[https://github.com/Asd-g/AviSynth-FillBorders GitHub] - Source code repository |
+ | *[https://github.com/dubhater/vapoursynth-fillborders GitHub] - Source code repository (VapourSynth version) | ||
<br> | <br> | ||
<br> | <br> | ||
----------------------------------------------- | ----------------------------------------------- | ||
'''Back to [[External_filters#Borders_and_Cropping| External Filters]] ←''' | '''Back to [[External_filters#Borders_and_Cropping| External Filters]] ←''' |
Latest revision as of 11:36, 18 May 2023
Abstract | |
---|---|
Author | dubhater / Asd-g |
Version | v1.4.1 |
Download | FillBorders-1.4.1.7z |
Category | Borders and Cropping |
License | WTFPL |
Discussion |
Contents |
[edit] Description
This is a simple filter that fills the borders of a clip, without changing the clip's dimensions. It has 6 border filling modes.
[edit] Requirements
- AviSynth+ 3.6 or later
- Supported color formats: all planar formats (8/10/12/14/16/32-bit, Y, YUV(A), and RGB(A) with or without alpha) are supported.
- *** vcredist_x86.exe required for FillBorders-x86
- *** vcredist_x64.exe required for FillBorders-x64
[edit] Syntax and Parameters
- FillBorders (clip, int[] "left", int[] "top", int[] "right", int[] "bottom", int "mode", int "y", int "u", int "v")
- FillMargins (clip, int "left", int "top", int "right", int "bottom", int "y", int "u", int "v")
- clip =
- A clip to process. All planar formats are supported.
- clip =
- int[] left = 0
- int[] top = 0
- int[] right = 0
- int[] bottom = 0
- Number of pixels to fill on each side. These can be any non-negative numbers, within reason. If they are all 0, the input clip is simply passed through.
- For FillBorders:
- int[] left = 0
These must be used as named parameters. For example, `FillBorders(left=1, top=1, right=1, bottom=1)`. If a single value for `left`/`top`/`right`/`bottom` is specified, it will be used for alpha plane and it will be right shifted by subsampling factor for chroma planes. If two values are given then the second value will be used for the third plane and the first value will be used for alpha plane. If three values are given then the first value will be used for alpha plane.
- int mode = 0
- Mode (FillBorders only):
- 0 : "fillmargins"
Fills the borders exactly like the AviSynth filter FillMargins, version 1.0.2.0. This mode is similar to mode 1, except that each pixel at the top and bottom borders is filled with a weighted average of its three neighbours from the previous line. - 1 : "repeat"
Fills the borders using the outermost line or column (aka "repeat"). - 2 : "mirror"
Fills the borders by mirroring. - 3 : "reflect"
Fills the borders by reflecting (whole sample symmetric). - 4 : "wrap"
Fills the borders by wrapping. - 5 : "fade"
Fill the borders to constant value. - 6 : "fixborders"
A direction "aware" modification of FillMargins. It also works on all four sides.
- 0 : "fillmargins"
- Mode (FillBorders only):
- int mode = 0
- int y = 3
- int u = 3
- int v = 3
- Planes to process.
- 1 : Return garbage.
- 2 : Copy plane.
- 3 : Process plane. Always process planes when the clip is RGB.
- Planes to process.
- int y = 3
- Note:
FillMargins()
is an alias forFillBorders(mode=0)
[edit] Examples
AviSource("Blah.avi") FillBorders(left=5, top=7, right=2, bottom=0, mode=0)
#identical to: FillMargins(left=5, top=7, right=2, bottom=0)
[edit] Changelog
Version Date Changes
v1.4.1 2023/04/26 - Fixed set of memory for high bit depth video. v1.4.0 2023/04/25 - Dropped support for AviSynt 2.6. - Changed type of parameters left, top, right, bottom to arrays. (FillBorders only) - Added support for alpha plane. v1.3.0 2021/06/25 - Added mode 6 (fixborders) (from vs FillBorders). v1.2.1 2021/02/18 - Not allowed clips with _FieldBased > 0. v1.2.0 2021/02/17 - Added additional modes (from ffmpeg): 3 (reflect); 4 (wrap); 5 (fade). v1.1.0 2020/08/11 - Added support for float. - Added y, u, v, parameters. - AviSynth+: self-registers as MT_NICE_FILTER. - Removed parameter mode from FillMargins.
v1.0.0 2020/05/17 - Move project to GitHub - Add FillMargins function
20190410 2019/04/10 - First release - Port from VapourSynth plugin by Dubhater - Author: Asd
[edit] External Links
Back to External Filters ←