FillMargins

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(FillMargins)
 
m (Description: add note about FillBorders)
 
(4 intermediate revisions by one user not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Plugins|Borders and Cropping}}
+
{{FilterCat4|External_filters|Plugins|Adjustment_filters|Borders and Cropping}}
 
{{Filter3
 
{{Filter3
 
|{{Author/Tom Barry}}
 
|{{Author/Tom Barry}}
Line 6: Line 6:
 
|4=Borders and Cropping
 
|4=Borders and Cropping
 
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
|6=[http://forum.doom9.org/showthread.php?t=50132 Doom9 Thread]  
+
|6=[http://forum.doom9.org/showthread.php?t=50132 Doom9 Thread] - [http://forum.doom9.org/showthread.php?t=55881 Update]  
[http://forum.doom9.org/showthread.php?t=55881 Doom9 Thread 2]  
+
 
}}
 
}}
  
Line 16: Line 15:
 
<br>
 
<br>
 
<br>
 
<br>
 +
<span style="color:red">'''Note: [[FillBorders]] is recommended as a modern drop-in replacement for FillMargins.'''</span>
 +
<br>
 +
<br>
 +
 
== Requirements ==
 
== Requirements ==
* AviSynth 2.5.8 or later
+
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]
 
* Supported color formats: [[YV12]]
 
* Supported color formats: [[YV12]]
  
Line 32: Line 35:
 
::{{Par2| |int| }}
 
::{{Par2| |int| }}
 
::{{Par2| |int| }}
 
::{{Par2| |int| }}
:::It takes integer 4 parameters specifying the size of the left, top, right, and bottom margins. These may be any value and do not have to be any particular multiple. Since YV12 chroma contains only half the luma data it will fill num/2 chroma pixels.
+
:::<tt>'''left, top, right, bottom'''</tt>: these 4 interger parameters specify the size of the left, top, right, and bottom margins. These may be any value and do not have to be any particular multiple. Since YV12 chroma contains only half the luma data it will fill num/2 chroma pixels.
:::*'''Note:''' all parameters are unnamed and do not have a default so they must be specified.
+
:::'''Note:''' all parameters are unnamed and do not have a default so they must be specified.
 
<br>
 
<br>
 +
 
== Examples ==
 
== Examples ==
 
  [[AviSource]]("Blah.avi")
 
  [[AviSource]]("Blah.avi")
Line 41: Line 45:
 
== Changelog ==
 
== Changelog ==
 
  Version      Date            Changes<br>
 
  Version      Date            Changes<br>
  v1.0.2.0      2003/04/01     - fix right margin OBO error
+
  v1.0.2.0      2003/06/18     - fix right margin OBO error
 
                               - smooth top & bottom margins a bit
 
                               - smooth top & bottom margins a bit
  v1.0.1.0      2003/04/01     - cure dyslexic input parameters
+
  v1.0.1.0      2003/xx/xx     - cure dyslexic input parameters
 
  v1.0.0.0      2003/04/01      - first release
 
  v1.0.0.0      2003/04/01      - first release
 
<br>
 
<br>
Line 64: Line 68:
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
'''Back to [[External_filters#Spatio-Temporal_Denoisers| External Filters]] &larr;'''
+
'''Back to [[External_filters#Borders_and_Cropping| External Filters]] &larr;'''

Latest revision as of 09:28, 26 February 2021

Abstract
Author Tom Barry
Version v1.0.2.0
Download FillMargins.zip
Category Borders and Cropping
License GPLv2
Discussion Doom9 Thread - Update

Contents

[edit] Description

Sometimes a video clip has black borders or garbage at the four edges. This looks ugly and does not compress well but possibly you don't want to crop because you have to keep the diminsions as a multiple of 16 or some other number.

FillMargins is a simple AviSynth filter that fills the four margins of a video clip with the outer pixels of the unfilled portion.

Note: FillBorders is recommended as a modern drop-in replacement for FillMargins.

[edit] Requirements

  • AviSynth 2.5.8 or greater
  • Supported color formats: YV12
  • MMX capable CPU


[edit] Syntax and Parameters

FillMargins (clip, int, int, int, int)


clip   =
Input clip.
int   =
int   =
int   =
int   =
left, top, right, bottom: these 4 interger parameters specify the size of the left, top, right, and bottom margins. These may be any value and do not have to be any particular multiple. Since YV12 chroma contains only half the luma data it will fill num/2 chroma pixels.
Note: all parameters are unnamed and do not have a default so they must be specified.


[edit] Examples

AviSource("Blah.avi")
FillMargins(5,7,2,0)  # (left, top, right, bottom)


[edit] Changelog

Version       Date            Changes
v1.0.2.0 2003/06/18 - fix right margin OBO error - smooth top & bottom margins a bit v1.0.1.0 2003/xx/xx - cure dyslexic input parameters v1.0.0.0 2003/04/01 - first release


[edit] Archived Downloads

Version Download Mirror
v1.0.2.0 FillMargins.zip fillmargins_25_dll_20030618.zip


[edit] External Links




Back to External Filters

Personal tools