SalFPS3

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(correct download link)
(reformat and add some things)
Line 1: Line 1:
{{Filter|Mug Funky, Didee|3.0|[[Media:salFPS3.avs|salFPS3.avs]]|Frame Rate Converters|
+
{{FilterCat4|External_filters|Scripts|Adjustment_filters|Frame_Rate_Conversion}}
* YV12
+
{{Filter3
|}}
+
|Mug Funky, Didée
{{Template:FuncDef|salFPS3(clip input, float FPS, int "mode", int "protection", int "protection2", int "iterate", int "reset", int "initialise") }}
+
|3.0
 +
|[[Media:salFPS3.avs|salFPS3.avs]]
 +
|Frame Rate Converters
 +
|
 +
|6=[http://forum.doom9.org/showthread.php?p=987212#post987212 Doom9 Thread]}}
  
== Abstract ==  
+
== Description ==
A modded version of MotionProtectedFPS for super protection. Originally created by Mug Funky, modded by Didee.
+
A modded version of MotionProtectedFPS for extra protection. Originally created by Mug Funky, modded by Didée.
  
== Requires Filters ==
+
<br>
 +
<br>
 +
== Requirements ==
 +
* [http://forum.doom9.org/showthread.php?t=168764 AviSynth 2.6.0 Alpha5] or later
 +
* [[Progressive]] input only
 +
* Supported color formats: [[YV12]]
 +
=== Required Plugins ===
 
* [[MaskTools2]]
 
* [[MaskTools2]]
* [[Motion]] download at [http://www.64k.it/andres/data/avisynth/Motion_12Dec05.zip 64k.it]
+
* [[Motion]] | [http://wilbertdijkhof.com/mg262/Motion_v10.zip Motion_v10.zip]
 
+
<br>
== Description ==
+
== [[Script variables|Syntax and Parameters]] ==
A high quality frame rate convertion filter.
+
:{{Template:FuncDef|salFPS3 (clip input, float FPS, int "mode", int "protection", int "protection2", int "iterate", int "reset", int "initialise") }}
 
+
<br>
{{Par|input|clip|last}}
+
::{{Par2|input|clip| }}
Clip to be converted.
+
:::Input clip to be converted.
 
+
<br>
{{Par|FPS|float|null}}
+
::{{Par2|FPS|float| }}
The FPS to be converted to.
+
:::The FPS to be converted to, this value is not optional so it must be specified.
 
+
<br>
{{Par|mode|int|warp}}
+
:::{{Par2|mode|int|warp}}
See MotionFPS documentation for details.
+
:::Modes:
 
+
:::*<code>move</code> : construct new frame by moving blocks
{{Par|protection|int|80}}
+
:::*<code>warpfast</code> : construct new frame by stretching blocks
Protection value for SumStretchFPSMask.
+
:::*<code>warp</code> : construct new frame by stretching blocks; more accurate than warpfast
 
+
<br>
{{Par|protection2|int|20}}
+
::{{Par2|protection|int|80}}
Protection value for mt_edge.
+
:::<tt>multiplier</tt> value for <tt>SumStretchFPSMask</tt>.
 
+
<br>
{{Par|interate|int|2}}
+
::{{Par2|protection2|int|20}}
Iterate value for FindMotion.
+
:::<tt>thY1</tt> value for <tt>mt_edge</tt>; low threshold, if the pixel value is less than thY1, the pixel is set to 0.
 
+
<br>
{{Par|reset|int|50}}
+
::{{Par2|interate|int|2}}
Reset value for FindMotion.
+
:::<tt>iterate</tt> value for <tt>FindMotion</tt>.
 
+
<br>
{{Par|initialise|int|6}}
+
::{{Par2|reset|int|50}}
Initialise value for FindMotion.
+
:::<tt>reset</tt> value for <tt>FindMotion</tt>.
 
+
:::*<code>reset=0</code> : motion estimation always uses estimated motion vectors for the previous frame, which forces linear access.
== Note ==
+
:::*<code>reset=50</code> : motion vectors are calculated from scratch every 50 frames, allowing seeking. Lower values will allow faster seeking.
 
+
<br>
You may need these functions to make this script work.
+
::{{Par2|initialise|int|6}}
<pre>
+
:::<tt>initialise</tt> value for <tt>FindMotion</tt>; higher values increase the accuracy of vectors calculated from scratch, at the cost of increased calculation time.
function Mod16 (clip c, bool "mirror")
+
<br>
{
+
== Examples ==
mirror = default(mirror,false)
+
Change frame rate to 23.976:
+
[[AviSource]]("blah.avi")<br>
modwidth = ceil(c.width/16 + 0.5)*16
+
fps = 24000.0/1001.0
modheight = ceil(c.height/16 + 0.5)*16
+
salFPS3(fps)
 
+
<br>
out = c.addborders(0,0,modwidth - c.width,modheight - c.height)
+
==External Links ==
out2 = stackvertical(stackhorizontal(c,c.fliphorizontal()),stackhorizontal(c.flipvertical(),c.turn180())).crop(0,0,modwidth,modheight,align=true)
+
*Download [[Media: salFPS3.avs|salFPS3.avs]] : Current Version (recommended). <br>
global gl_diff_width = int(out.width - c.width)
+
*Download [[Media: salFPS.avs|salFPS.avs]] : Original Version.
global gl_diff_height = int(out.height - c.height)
+
<br>
mirror==false? out : out2
+
<br>
}
+
-----------------------------------------------
 
+
'''Back to [[External_filters#Frame_Rate_Conversion|External Filters]] &larr;'''
function unMod16 (clip c)
+
{
+
c.crop(0,0,-gl_diff_width,-gl_diff_height)
+
}
+
</pre>
+
== Links ==
+
Download [[Media: salFPS3.avs|salFPS3.avs]] : Current Version (recommended). <br>
+
Download [[Media: salFPS.avs|salFPS.avs]] : Original Version.
+
 
+
[[Category:External filters]]
+

Revision as of 16:15, 8 March 2015

Abstract
Author Mug Funky, Didée
Version 3.0
Download salFPS3.avs
Category Frame Rate Converters
License
Discussion Doom9 Thread

Contents

Description

A modded version of MotionProtectedFPS for extra protection. Originally created by Mug Funky, modded by Didée.



Requirements

Required Plugins


Syntax and Parameters

salFPS3 (clip input, float FPS, int "mode", int "protection", int "protection2", int "iterate", int "reset", int "initialise")


clip  input =
Input clip to be converted.


float  FPS =
The FPS to be converted to, this value is not optional so it must be specified.


int  mode = warp
Modes:
  • move : construct new frame by moving blocks
  • warpfast : construct new frame by stretching blocks
  • warp : construct new frame by stretching blocks; more accurate than warpfast


int  protection = 80
multiplier value for SumStretchFPSMask.


int  protection2 = 20
thY1 value for mt_edge; low threshold, if the pixel value is less than thY1, the pixel is set to 0.


int  interate = 2
iterate value for FindMotion.


int  reset = 50
reset value for FindMotion.
  • reset=0 : motion estimation always uses estimated motion vectors for the previous frame, which forces linear access.
  • reset=50 : motion vectors are calculated from scratch every 50 frames, allowing seeking. Lower values will allow faster seeking.


int  initialise = 6
initialise value for FindMotion; higher values increase the accuracy of vectors calculated from scratch, at the cost of increased calculation time.


Examples

Change frame rate to 23.976:

AviSource("blah.avi")
fps = 24000.0/1001.0 salFPS3(fps)


External Links




Back to External Filters

Personal tools