# TTempSmooth

## Abstract

author: tritical
version: 0.9.2
download: http://bengal.missouri.edu/~kes25c/
category: Temporal Smoothers
requirements:

- YV12 & YUY2 Colorspace

license: GPL

## Description

TTempSmooth is a motion adaptive (it only works on stationary parts of the picture), temporal smoothing filter. TTempSmoothF is a faster (50-75%) version of TTempSmooth that doesn't take the mdiff/mdiffC parameters (it is equivalent to running TTempSmooth with mdiff/mdiffC set equal to or greater then LThresh/CThresh).

### Syntax

`TTempSmooth` (clip, int "maxd", int "LThresh", int "CThresh", int "mdiff", int "mdiffC")
`TTempSmoothF` (clip, int "maxd", int "LThresh", int "CThresh")

### PARAMETERS

maxd - (maximum temporal diameter)

This sets the maximum temporal diameter. By the way it works TTempSmooth automatically varies the diameter used. This sets the maximum boundary. Possible values are 5, 7, and 9. At 9 TTempSmooth will be (at max) including pixels from 4 frames away in the average. At 7 it would be including pixels from 3 frames away, etc... With the way it checks motion there isn't really much danger in setting this high, it's basically a quality vs. speed option. Lower settings are faster. Larger values tend to create a more stable image.

default = 7 (int)

LThresh/CThresh - (luma and chroma thesholds)

Your standard luma and chroma thresholds for differences of pixels between frames. Actually TTempSmooth checks 2 frame distance as well so these can usually be set slightly higher then with most other temporalsmoothers and still avoid artifacts. Valid settings are from 0 to 256. Also important is the fact that as long as mdiff is under Thresh then pixels with larger
differences from the original have less weight in the average. Thus even with rather large thresholds pixels just under the threshold wont have much weight in the average, helping to reduce artifacts.

default - LThresh = 4 (int)
CThresh = 5 (int)

mdiff/mdiffC - (maintain diff) - (only used in TTempSmooth not TTempSmoothF)

Any pixels with differences under these will be blurred at maximum. Usually the larger the pixel value difference the smaller the weight in the average. It basically makes TTempSmooth treat pixels that are under this difference as the same pixel value. Avoid setting this too high. Set this to a value equal to or greater then LThresh/CThresh to completely disable inverse pixel difference weighting. Valid settings are from 0 to 256.

default - mdiff = 3 (int)
mdiffC = 4 (int)

## Changelog

07/29/2004 v0.9.2
- Modified buffering code to remove unneeded BitBlts()... small speed up (5-10%).
- Request frames in linear order when completely refilling buffer.
- Added TTempSmoothF(), a faster version of TTempSmooth (50-75%), which is equivalent to using TTempSmooth() with mdiff/mdiffC equal to or greater then LThresh/CThresh. Thus, it only takes maxd, LThresh, and CThresh as parameters.
- Changed defaults to be less aggressive.
- There were no quality changes, the same settings will produce the same output as in v0.9.1.

06/15/2004 v0.9.1
- Fixed a major bug that caused incorrect calculation of the chroma differences, rendering the filter completely useless.
- Got rid of amount/amountC and fixedPoint parameters. They were unneeded in the case of amount and fixedPoint = true always worked better then false...
- Small speed up
- Changed some of the defaults.

06/11/2004 v0.9
- Initial Release

`$Date: 2005/10/03 16:31:31 $`