# InterFrame

## Abstract

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

- FFTW3
- RemoveGrain
- EEDI2
- DLL files (mvtools2.dll, libflowgpu.dll and libflowsse.dll) from SVP
  Note: All dependencies are included in the download.

license: None

## Description

A frame interpolation script that primarily uses MVTools2 for making accurate estimations about the content of frames

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

### Syntax

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

### Parameters

FlowPath:

Sets the location of the libflow DLL files.

- The full path of libflowgpu.dll and libflowsse.dll, for example "C:\Program Files\AviSynth 2.5\plugins\".
  Note: This is the only mandatory value; the script will not work without this.

default - Undefined (string)

GPU:

Whether or not to use GPU (video card) alongside CPU to accelerate conversion.
Note: Setting this to true will produce slightly more blurry results.

- true - Use the GPU. Not recommended because of slight blur, but it is hardly noticeable.
- false - Do not use the GPU (Recommended)

default - false (bool)

Preset:

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

- Placebo - Best quality but much slower
- Medium - Very good quality (Recommended)
- Fast - Faster than Medium but lower quality
- Faster - Faster than Fast but lower quality
- Very Fast - Faster than Fast but lower quality
- Super Fast - Faster than Very Fast but lower quality
- Ultra Fast - Fastest and worst 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)

OverrideSadML:

Sets the strength of the SadML mask.

- Any integer. The lower it is, the stronger the mask is.
  The "Animation" and "Smooth" tunings use a value of 150, otherwise 0 is used by default (which means disabled)

default - 0 (int)

## Example Scripts

Recommended:

    InterFrame(FlowPath="C:\Program Files\AviSynth 2.5\plugins\")

48FPS (47.952FPS) output:

    InterFrame(NewNum=48000, NewDen=1001, FlowPath="C:\Program Files\AviSynth 2.5\plugins\")

Cartoon/anime input:

    InterFrame(Tuning="Animation", FlowPath="C:\Program Files\AviSynth 2.5\plugins\")

Faster - but lower quality - interpolation:

    InterFrame(Preset="Fast", FlowPath="C:\Program Files\AviSynth 2.5\plugins\")

3D SBS input:

    InterFrame(InputType="SBS", FlowPath="C:\Program Files\AviSynth 2.5\plugins\")

## Changelog

23/03/2012 - 1.14
- Allow any value for OverrideAlgo.
- Lots of documentation updates.

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