# InterFrame

## Abstract

author: SubJunk
version: 2.3.0
download: http://www.spirton.com/
category: Frame Rate Conversion
requirements:

- DLL files from SVP (svpflow_cpu.dll, svpflow_gpu.dll, svpflow1.dll and svpflow2.dll)
  Note: All dependencies are included in the download.

license: None

## Description

A frame interpolation script that makes accurate estimations about the content of frames

Its main use is to give videos higher framerates like newer TVs do

### Syntax

`InterFrame` (clip Input, bool "GPU", string "Preset", string "Tuning", int "NewNum", int "NewDen", string "InputType", int "OverrideAlgo", int "OverrideArea", int "Cores")

### Parameters

GPU:

Whether or not to use GPU (video card) alongside CPU to accelerate conversion.

- true - Use the GPU. Recommended for those with video cards.
- false - Do not use the GPU.

default - false (bool)

Preset:

Sets the interpolation strength/quality.
It controls the compromising between quality and speed.
Useful for realtime users.

- Medium - Very good quality (Recommended)
- Fast - Faster than Medium but lower quality

default - Medium (string)

Tuning:

Tunes the settings for the type of content.

- Film - This offers a good balance between the accuracy of individual moving things and the cohesiveness of the frame. Useful for content that was filmed or rendered (Recommended)
- Animation - This should be used for cartoons/anime.
- Smooth - This increases the accuracy of individual moving things while decreasing the cohesiveness of the frame. Some people prefer it since it gives the motion an overall "smooth" feeling.
- Weak - This decreases the accuracy of individual moving things while increasing the cohesiveness of the frame.
  Note: This will weaken the interpolation a lot, meaning the motion isn't as smooth.
  Some people will prefer to use the Film tuning even for animated content, so don't automatically assume this is the right tuning for you; use with caution.

default - Film (string)

NewNum:

Sets the new video numerator.

- 0 - Automatic output framerate, which uses the following logic:
  - If the input framerate is 25FPS, output 50FPS
  - If the input framerate is 30FPS, output 60FPS
  - If the input framerate is anything else, output 59.94FPS
- Integers higher than 0 - Output the framerate equal to this value divided by NewDen (see below).
  Note: Any value for this argument other than 0 - or nothing - requires NewDen to also be defined!

default - 0 (int)

NewDen:

Sets the new video denominator.

- Whatever you want NewNum to be divided by.

default - 0 (int)

InputType:

Sets the type of input with regards to 2D or different types of 3D.

- 2D - This is for regular videos
- SBS - This is for 3D Side-By-Side content, usually the resolution will be 3840x1080 (1920x1080 for each eye).
- OU - This is for 3D Over-Under content (AKA Top-to-Bottom), usually the resolution will be 1920x2160 (1920x1080 for each eye).
- HSBS - This is for 3D Side-By-Side content at half the resolution, usually the resolution will be 1920x1080 (960x1080 for each eye).
- HOU - This is for 3D Over-Under content (AKA Top-to-Bottom), usually the resolution will be 1920x1080 (1920x540 for each eye).
  Note: This setting does not create 3D from 2D, it just properly interpolates content that is already 3D.
  The 3D options approximately halve the speed - because they calculate each half separately - so if you are OK with less 3D accuracy you can use the 2D (default) mode for faster performance.

default - 2D (string)

OverrideAlgo:

Sets the algorithm.

- 2 - This makes strong predictions which can be useful for cartoons but can also leave big artifacts. It is not used by any InterFrame tunings.
- 13 - This is the most intelligent algorithm since it masks many artifacts, but it is not as smooth as 23.
- 23 - This is the smoothest algorithm, but it does not have the artifact masking that 13 has. This is the default value when using the "Smooth" tuning
- Others - If you know them you can use them.

default - 13 (int)

OverrideArea:

Sets the strength of the Area mask.

- Any integer. The lower it is, the stronger the mask is.
  The "Animation" tuning uses a value of 150, while all other tunings use 0 (which means they don't use it)

default - 0 (int)

Cores:

Sets the number of CPU cores to use.

- This must be the same as the second number in the SetMTMode function.
  For example, if you use SetMTMode(3,4) you should use Cores=4

default - Undefined

## Example Scripts

Recommended:

    InterFrame(Cores=x)

48FPS output regardless of input framerate:

    InterFrame(NewNum=48000, NewDen=1001, Cores=x)

Cartoon/anime input:

    InterFrame(Tuning="Animation", Cores=x)

Faster - but lower quality - interpolation:

    InterFrame(Preset="Fast", Cores=x)

3D SBS input:

    InterFrame(InputType="SBS", Cores=x)

## Changelog

24/12/2012 - 2.3.0
- Increased speed
- Decreased blobs/artifacts in high-action scenes
- Updated libraries which optimise memory use and support more video cards, thanks to SVP.

13/11/2012 - 2.2.0
- Fixed a syntax bug that appears to have had little-to-no effect (thanks to HolyWu for reporting it).
- Tweaked scene-change detection again (tightened this time to improve artifacts).

27/06/2012 - 2.1.0
- Improved smoothness in high-action scenes by loosening scene-change detection.

05/06/2012 - 2.0.2
- Better interpolation stability.
- Supports more video cards.
- Better compatibility with AviSynth 2.6.
- Thanks to SVP.

05/05/2012 - 2.0.1
- Updated libraries to support new video cards like GTX 680, thanks to SVP.

03/05/2012 - 2.0
- Updated libraries, thanks to SVP.

17/04/2012 - 2.0 RC1
- Updated libraries, thanks to SVP.

12/04/2012 - 2.0 Beta 4
- Reduced instances of warping by fixing usage of SAD mask, thanks to Bernardd for reporting the bug. - Further reduced instances of warping by lowering area_sharp (sadgamma).

11/04/2012 - 2.0 Beta 3
- Updated libraries, thanks to SVP.
- Changed some fields from string to int (NewNum, NewDen, OverrideAlgo and OverrideArea).

30/03/2012 - 2.0 Beta 2
- Updated libraries, thanks to SVP.
- Fixed 3D modes.
- Fixed "overlap must be even" error.

24/03/2012 - 2.0 Beta 1
- Rewrite which no longer uses MVTools2 and has better quality and is faster.

29/02/2012 - 1.13
- Added the "OverrideAlgo" option for users who wants to override the recommended algo value.
- Added the "OverrideSadML" option for users who wants to override the recommended sadml value.
- Updated FFTW to 3.3.1 from 3.2.2.
- Updated MVTools2 (SVP Build) to 2.5.11.9 from 2.5.11.8, thanks to SVP.
- Updated libflowgpu to 1.2.7 from 1.2.6, thanks to SVP.

31/12/2011 - 1.12.3
- Updated libflowgpu to 1.2.6 from 1.2.5 which improves ATI GPU compatibility, thanks to SVP.
- Code reshuffle (no changes)

03/11/2011 - 1.12.2
- Updated MVTools2 (SVP Build) to 2.5.11.8 from 2.5.11.7 which improves speed by 2-15%, thanks to SVP.

16/09/2011 - 1.12.1
- Updated MVTools2 (SVP Build) to 2.5.11.7 from 2.5.11.6 which synchronises the build with the official 2.5.11.2 beta release.
- Updated libflowgpu to 1.2.5 from 1.2.0 which improves GPU compatibility, thanks to SVP.

12/09/2011 - 1.12
- Improved some warping.
- Added new UltraSmooth tuning and changed the Smooth tuning. Smooth now has more error-correction than before, while UltraSmooth is roughly what Smooth was before.

05/07/2011 - 1.11
- Increased quality of all presets. This change makes fast panning less smooth, but also decreases errors in general.
- Fixed bug with Placebo preset (thanks to Alek93j and Gavino).

18/06/2011 - 1.10
- Increased quality of all presets. Thanks to DeathTheSheep for collaborating.
- Increased speed of "Ultra Fast" and "Super Fast" presets.
- "Animation" tuning is now much better and recommended for cartoon/anime inputs.
- What used to be the "Animation" tuning is now called "Weak".

23/05/2011 - 1.9
- Added support for 2 more types of 3D inputs (Half-SBS and Half-Over-Under).

20/05/2011 - 1.8.1
- Fixed stuttering motion particularly visible in cartoons.

04/05/2011 - 1.8
- Improved support for 2 types of 3D content - SBS (Side-By-Side) and OU (Over-Under), AKA Top-to-Bottom. This new feature is controlled by the new parameter InputType.

30/04/2011 - 1.7.1
- Increased the speed by roughly 40%, thanks to SVP

28/04/2011 - 1.7
- Increased the quality of all presets

20/04/2011 - 1.6
- Updated libflowgpu from 1.1 to 1.2 which improves the quality of GPU=true mode, thanks to SVP
- Added more presets ("Faster" and "Super Fast") based on some realtime user's suggestions, so now there is a smoother step between presets

13/04/2011 - 1.5.2
- Set GPU=false by default instead of true, because of slight quality loss with GPU=true

13/04/2011 - 1.5.1
- Fixed bug with GPU=false mode

11/04/2011 - 1.5
- Improved the quality of the default, Fast and Placebo presets
- It now checks for the existence of the mandatory value for FlowPath and displays an alert if it isn't defined
- Added the GPU parameter (true for GPU-acceleration, false for CPU-only)

10/04/2011 - 1.4
- Added custom mvtools2 and GPU-acceleration thanks to SVP
- Improved the quality of all presets

01/04/2011 - 1.3.1
- Added input validation for Tuning and Preset values with descriptive error messages

30/03/2011 - 1.3
- Added new Tuning value called Smooth
- Improved detection of scene-changes

24/03/2011 - 1.2
- Renamed Fast preset to Ultra Fast
- Added Very Fast and Fast presets
- Increased quality of Placebo and Medium presets
- Added Tuning variable
- Improved detection of scene-changes

22/03/2011 - 1.1
- Renamed Quality preset to Medium (default)
- Renamed Speed preset to Fast
- Increased quality of Medium (default) preset
- Added Placebo preset (little quality gain with big performance hit, not recommended)
- RemoveGrain is now required for Medium (default) preset
- EEDI2 is required for Placebo preset

21/03/2011 - 1.0.2
- Increased speed of both presets

20/03/2011 - 1.0.1
- Slightly faster - Scene-changes no longer fade/blend

18/03/2011 - 1.0
- Initial Release