TMM
From Avisynth wiki
Abstract | |
---|---|
Author | tritical |
Version | v1.0 |
Download | TMMv1.zip |
Category | Masking |
License | GPLv2 |
Discussion | Doom9 Thread |
Contents |
Description
TMM builds a motion-mask for TDeint, which TDeint uses via its 'emask'
parameter. TMM can use fixed or per-pixel adaptive motion thresholds, as well as any length static period greater than or equal to six fields. It checks backwards, across, and forwards when looking for motion.
Requirements
Syntax and Parameters
- TMM (clip, int "mode", int "order", int "field", int "length", int "mtype", int "ttype", int "mtqL", int "mthL", int "mtqC", int "mthC", int "nt", int "minthresh", int "maxthresh", int "cstr")
- clip =
- Input clip.
- clip =
- int mode = 0
- Same as the 'mode' parameter of TDeint. This should be set equal to the value of 'mode' given to TDeint. If using mode=2 in TDeint use mode=1 in TMM.
- 0 - same rate output
- 1 - double rate output
- Same as the 'mode' parameter of TDeint. This should be set equal to the value of 'mode' given to TDeint. If using mode=2 in TDeint use mode=1 in TMM.
- int mode = 0
- int order = -1
- Same as the 'order' parameter of TDeint. This should be set equal to the value of 'order' given to TDeint.
- -1 - use order from AviSynth
- 0 - bff
- 1 - tff
- Same as the 'order' parameter of TDeint. This should be set equal to the value of 'order' given to TDeint.
- int order = -1
- int field = -1
- Same as the 'field' parameter of TDeint. This should be set equal to the value of 'field' given to TDeint. If using mode=1 (double rate output) then this setting does nothing.
- int field = -1
- -1 - set field equal to order
- 0 - keep bottom field
- 1 - keep top field
- int length = 10
- Sets the number of fields required for declaring pixels as stationary. length=6 means six fields (3 top/3 bottom), length=8 means 8 fields (4 top/4 bottom), etc...
- This can be any value greater than or equal to 6 (can be even or odd). A larger value for length will prevent more motion-adaptive related artifacts, but will result in fewer pixels being weaved.
- int length = 10
- int mtype = 1
- Sets whether or not both vertical neighboring lines in the current field of the line in the opposite parity field attempting to be weaved have to agree on both stationarity and direction. Possible values:
- int mtype = 1
- 0 - no
- 1 - no for across, but yes for backwards/forwards
- 2 - yes
- 0 will result in the most pixels being weaved, while 2 will have the least artifacts.
- int ttype = 1
- Sets how to determine the per-pixel adaptive (quarter pel/half pel) motion thresholds. Possible values:
- int ttype = 1
- 0 - 4 neighbors, diff to center pixel, compensated
- 1 - 8 neighbors, diff to center pixel, compensated
- 2 - 4 neighbors, diff to center pixel, uncompensated
- 3 - 8 neighbors, diff to center pixel, uncompensated
- 4 - 4 neighbors, range (max-min) of neighborhood
- 5 - 8 neighbors, range (max-min) of neighborhood
- Compensated means adjusted for distance differences due to field vs frames and chroma downsampling. The compensated versions will always result in thresholds <= to the uncompensated versions.
- int mtqL = -1
- int mthL = -1
- int mtqC = -1
- int mthC = -1
- These parameters allow the specification of hard thresholds instead of using per-pixel adaptive motion thresholds. mtqL sets the quarter pel threshold for luma, mthL sets the half pel threshold for luma, mtqC/mthC are the same but for chroma. If these parameters are set to -1 then an adaptive threshold is used. Otherwise, if they are between 0 and 255 (inclusive) then the value of the parameter is used as the threshold for every pixel.
- int mtqL = -1
- int nt = 2
- int minthresh = 4
- int maxthresh = 75
- nt sets the noise threshold, which will be added to the value of each per-pixel threshold when determining if a pixel is stationary or not. After the addition of 'nt', any threshold less than minthresh will be increased to minthresh and any threshold greater than maxthresh will be decreased to maxthresh.
- int nt = 2
- int cstr = 4
- Sets the number of required neighbor pixels (3x3 neighborhood) in the quarter pel mask, of a pixel marked as moving in the quarter pel mask, but stationary in the half pel mask, marked as stationary for the pixel to be marked as stationary in the combined mask.
- int cstr = 4
Examples
MPEG2Source("source.d2v") // assume tff source that we want to bob TDeint(order=1, mode=1, emask=TMM(order=1, mode=1))
MPEG2Source("source.d2v") // assume bff source, keep top field, same rate TDeint(order=0, field=1 ,emask=TMM(order=0, field=1)
Changelog
Version Date Changes
v1.0 04/06/2007 - Initial release
Archived Downloads
Version | Download | Mirror |
---|---|---|
v1.0 | TMMv1.zip | TMMv1.zip |
External Links
Back to External Filters ←