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.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
ABSOLUTE–Motion vectors point directly to destination pixels.
-
RELATIVE–Motion vectors describe how source pixels should be shifted.
ABSOLUTE class-attribute instance-attribute ¶
ABSOLUTE = 0
Motion vectors point directly to destination pixels.
RELATIVE class-attribute instance-attribute ¶
RELATIVE = 1
Motion vectors describe how source pixels should be shifted.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
MaskMode ¶
Bases: CustomIntEnum
Defines the type of analysis mask to generate.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
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.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
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.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
Attributes:
-
COHERENCE–Optimize for motion vector coherence, preferring vectors that align with surrounding blocks.
-
SAD–Optimize purely for lowest SAD scores when searching motion vectors.
COHERENCE class-attribute instance-attribute ¶
COHERENCE = 1
Optimize for motion vector coherence, preferring vectors that align with surrounding blocks.
SAD class-attribute instance-attribute ¶
SAD = 0
Optimize purely for lowest SAD scores when searching motion vectors.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
PenaltyMode ¶
Bases: CustomIntEnum
Controls how motion estimation penalties scale with hierarchical levels.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
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.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
RFilterMode ¶
Bases: CustomIntEnum
Hierarchical levels smoothing and reducing (halving) filter.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
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).
QUADRATIC class-attribute instance-attribute ¶
QUADRATIC = 3
Quadratic filter for even more smoothing.
TRIANGLE_SHIFTED class-attribute instance-attribute ¶
TRIANGLE_SHIFTED = 1
Triangle (shifted) filter for more smoothing (decrease aliasing).
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
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.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
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.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
SearchMode ¶
Bases: CustomIntEnum
Decides the type of search at every level.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
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.
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
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.
Methods:
-
from_param–Return the enum value from a parameter.
-
value–
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).
from_param classmethod ¶
from_param(value: Any, func_except: FuncExcept | None = None) -> Self
Return the enum value from a parameter.
Parameters:
-
(value¶Any) –Value to instantiate the enum class.
-
(func_except¶FuncExcept | None, default:None) –Exception function.
Returns:
-
Self–Enum value.
Raises:
-
NotFoundEnumValue–Variable not found in the given enum.
Source code in jetpytools/enums/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |