enums ¶
Classes:
-
FlowMode–Controls how motion vectors are applied to pixels.
-
MVDirection–Motion vector analyze direction.
-
MaskMode–Defines the type of analysis mask to generate.
-
MotionMode–Controls how motion vectors are searched and selected.
-
PenaltyMode–Controls how motion estimation penalties scale with hierarchical levels.
-
RFilterMode–Hierarchical levels smoothing and reducing (halving) filter.
-
SADMode–Specifies how block differences (SAD) are calculated between frames.
-
SearchMode–Decides the type of search at every level.
-
SharpMode–Subpixel interpolation method for pel = 2 or 4.
FlowMode ¶
Bases: CustomIntEnum
Controls how motion vectors are applied to pixels.
Attributes:
MaskMode ¶
Bases: CustomIntEnum
Defines the type of analysis mask to generate.
Attributes:
-
COLORMAP–Creates a color visualization of motion vectors, mapping x/y components to U/V planes.
-
HORIZONTAL–Visualizes horizontal motion vector components. Values are in pixels + 128.
-
MOTION–Generates a mask based on motion vector magnitudes.
-
OCCLUSION–Generates a mask highlighting areas where motion estimation fails due to occlusion.
-
SAD–Generates a mask based on SAD (Sum of Absolute Differences) values.
-
VERTICAL–Visualizes vertical motion vector components. Values are in pixels + 128.
COLORMAP class-attribute instance-attribute ¶
COLORMAP = 5
Creates a color visualization of motion vectors, mapping x/y components to U/V planes.
HORIZONTAL class-attribute instance-attribute ¶
HORIZONTAL = 3
Visualizes horizontal motion vector components. Values are in pixels + 128.
MOTION class-attribute instance-attribute ¶
MOTION = 0
Generates a mask based on motion vector magnitudes.
OCCLUSION class-attribute instance-attribute ¶
OCCLUSION = 2
Generates a mask highlighting areas where motion estimation fails due to occlusion.
SAD class-attribute instance-attribute ¶
SAD = 1
Generates a mask based on SAD (Sum of Absolute Differences) values.
VERTICAL class-attribute instance-attribute ¶
VERTICAL = 4
Visualizes vertical motion vector components. Values are in pixels + 128.
MotionMode ¶
Bases: CustomIntEnum
Controls how motion vectors are searched and selected.
Provides presets that configure multiple motion estimation parameters like lambda, LSAD threshold, and penalty values to optimize for either raw SAD scores or motion coherence.
Attributes:
PenaltyMode ¶
Bases: CustomIntEnum
Controls how motion estimation penalties scale with hierarchical levels.
Attributes:
-
LINEAR–Penalties scale linearly with hierarchical level size.
-
NONE–Penalties remain constant across all hierarchical levels.
-
QUADRATIC–Penalties scale quadratically with hierarchical level size.
LINEAR class-attribute instance-attribute ¶
LINEAR = 1
Penalties scale linearly with hierarchical level size.
NONE class-attribute instance-attribute ¶
NONE = 0
Penalties remain constant across all hierarchical levels.
QUADRATIC class-attribute instance-attribute ¶
QUADRATIC = 2
Penalties scale quadratically with hierarchical level size.
RFilterMode ¶
Bases: CustomIntEnum
Hierarchical levels smoothing and reducing (halving) filter.
Attributes:
-
AVERAGE–Simple 4 pixels averaging.
-
CUBIC–Cubic filter for even more smoothing.
-
QUADRATIC–Quadratic filter for even more smoothing.
-
TRIANGLE–Triangle filter for even more smoothing.
-
TRIANGLE_SHIFTED–Triangle (shifted) filter for more smoothing (decrease aliasing).
SADMode ¶
Bases: CustomIntEnum
Specifies how block differences (SAD) are calculated between frames. Can use spatial data, DCT coefficients, SATD, or combinations to improve motion estimation.
Attributes:
-
ADAPTIVE_SATD_DCT–Adaptively choose between SATD data or DCT-weighted mixed mode for each block.
-
ADAPTIVE_SATD_LUMA–Adaptively use SATD weighted by SAD, but only when there are significant luma changes.
-
ADAPTIVE_SATD_MIXED–Adaptively choose between SATD data or an equal mix of SATD and DCT data for each block.
-
ADAPTIVE_SPATIAL_DCT–Adaptively choose between spatial data or DCT-weighted mixed mode for each block.
-
ADAPTIVE_SPATIAL_MIXED–Adaptively choose between spatial data or an equal mix of spatial and DCT data for each block.
-
DCT–Calculate differences using DCT coefficients. Slower, especially for block sizes other than 8x8.
-
MIXED_SADEQSATD_DCT–Mix of SAD, SATD and DCT data. Weight varies from SAD-only to equal SAD/SATD mix.
-
MIXED_SATD_DCT–Use both SATD and DCT data, weighted based on the average luma difference between frames.
-
MIXED_SPATIAL_DCT–Use both spatial and DCT data, weighted based on the average luma difference between frames.
-
SATD–Use Sum of Absolute Transformed Differences (SATD) instead of SAD for luma comparison.
-
SPATIAL–Calculate differences using raw pixel values in spatial domain.
ADAPTIVE_SATD_DCT class-attribute instance-attribute ¶
ADAPTIVE_SATD_DCT = 8
Adaptively choose between SATD data or DCT-weighted mixed mode for each block.
ADAPTIVE_SATD_LUMA class-attribute instance-attribute ¶
ADAPTIVE_SATD_LUMA = 10
Adaptively use SATD weighted by SAD, but only when there are significant luma changes.
ADAPTIVE_SATD_MIXED class-attribute instance-attribute ¶
ADAPTIVE_SATD_MIXED = 7
Adaptively choose between SATD data or an equal mix of SATD and DCT data for each block.
ADAPTIVE_SPATIAL_DCT class-attribute instance-attribute ¶
ADAPTIVE_SPATIAL_DCT = 4
Adaptively choose between spatial data or DCT-weighted mixed mode for each block.
ADAPTIVE_SPATIAL_MIXED class-attribute instance-attribute ¶
ADAPTIVE_SPATIAL_MIXED = 3
Adaptively choose between spatial data or an equal mix of spatial and DCT data for each block.
DCT class-attribute instance-attribute ¶
DCT = 1
Calculate differences using DCT coefficients. Slower, especially for block sizes other than 8x8.
MIXED_SADEQSATD_DCT class-attribute instance-attribute ¶
MIXED_SADEQSATD_DCT = 9
Mix of SAD, SATD and DCT data. Weight varies from SAD-only to equal SAD/SATD mix.
MIXED_SATD_DCT class-attribute instance-attribute ¶
MIXED_SATD_DCT = 6
Use both SATD and DCT data, weighted based on the average luma difference between frames.
MIXED_SPATIAL_DCT class-attribute instance-attribute ¶
MIXED_SPATIAL_DCT = 2
Use both spatial and DCT data, weighted based on the average luma difference between frames.
SATD class-attribute instance-attribute ¶
SATD = 5
Use Sum of Absolute Transformed Differences (SATD) instead of SAD for luma comparison.
SPATIAL class-attribute instance-attribute ¶
SPATIAL = 0
Calculate differences using raw pixel values in spatial domain.
SearchMode ¶
Bases: CustomIntEnum
Decides the type of search at every level.
Attributes:
-
DIAMOND–Logarithmic search, also named Diamond Search.
-
EXHAUSTIVE–Exhaustive search, square side is 2 * radius + 1. It's slow, but gives the best results SAD-wise.
-
EXHAUSTIVE_H–Pure horizontal exhaustive search, width is 2 * radius + 1.
-
EXHAUSTIVE_V–Pure vertical exhaustive search, height is 2 * radius + 1.
-
HEXAGON–Hexagon search (similar to x264).
-
NSTEP–N step searches.
-
ONETIME–One time search.
-
UMH–Uneven Multi Hexagon search (similar to x264).
DIAMOND class-attribute instance-attribute ¶
DIAMOND = 2
Logarithmic search, also named Diamond Search.
EXHAUSTIVE class-attribute instance-attribute ¶
EXHAUSTIVE = 3
Exhaustive search, square side is 2 * radius + 1. It's slow, but gives the best results SAD-wise.
EXHAUSTIVE_H class-attribute instance-attribute ¶
EXHAUSTIVE_H = 6
Pure horizontal exhaustive search, width is 2 * radius + 1.
EXHAUSTIVE_V class-attribute instance-attribute ¶
EXHAUSTIVE_V = 7
Pure vertical exhaustive search, height is 2 * radius + 1.
SharpMode ¶
Bases: CustomIntEnum
Subpixel interpolation method for pel = 2 or 4.
This enum controls the calculation of the first level only. If pel=4, bilinear interpolation is always used to compute the second level.
Attributes:
-
BICUBIC–Bicubic interpolation (4-tap Catmull-Rom).
-
BILINEAR–Soft bilinear interpolation.
-
WIENER–Sharper Wiener interpolation (6-tap, similar to Lanczos).
WIENER class-attribute instance-attribute ¶
WIENER = 2
Sharper Wiener interpolation (6-tap, similar to Lanczos).