-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
723e680
commit 90bb39c
Showing
8 changed files
with
461 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# flake8: noqa | ||
|
||
from .enum import * | ||
from .func import * | ||
from .types import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from vstools import CustomIntEnum | ||
|
||
from .. import check_installed_plugins | ||
|
||
__all__: list[str] = [ | ||
'DiffMode', | ||
] | ||
|
||
|
||
class DiffMode(CustomIntEnum): | ||
"""Different supported difference finding methods.""" | ||
|
||
PLANESTATS_MINMAX = -2 | ||
"""Get the difference using min/max values of a MakeDiff clip.""" | ||
|
||
PLANESTATS_DIFF = -1 | ||
"""Get the difference using PlaneStats diff prop.""" | ||
|
||
PSNR = 0 | ||
"""""" | ||
|
||
PSNR_HVS = 1 | ||
"""""" | ||
|
||
SSIM = 2 | ||
"""""" | ||
|
||
MS_SSIM = 3 | ||
"""""" | ||
|
||
CIEDE2000 = 4 | ||
"""""" | ||
|
||
def __post_init__(self) -> None: | ||
if self.is_vmaf: | ||
check_installed_plugins('vmaf') | ||
|
||
def __str__(self) -> str: | ||
return str(self.name).replace('DiffMode.', '') | ||
|
||
@property | ||
def is_planestats(self) -> bool: | ||
return self < 0 | ||
|
||
@property | ||
def is_vmaf(self) -> bool: | ||
return 0 <= self <= 4 |
Oops, something went wrong.