-
Notifications
You must be signed in to change notification settings - Fork 5
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
032a9f1
commit 2504281
Showing
2 changed files
with
26 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from unittest import TestCase | ||
|
||
import vapoursynth as vs | ||
from vskernels import Bicubic, Bilinear | ||
|
||
from vsscale import MergeScalers | ||
|
||
|
||
class TestFuncs(TestCase): | ||
def test_merge_scalers_downscale(self) -> None: | ||
input = vs.core.std.BlankClip(width=1920, height=1080, format=vs.YUV420P8) | ||
scaler = MergeScalers((Bicubic, 0.5), (Bilinear, 0.5)) | ||
output = scaler.scale(input, 1280, 720) | ||
self.assertEqual(output.width, 1280) | ||
self.assertEqual(output.height, 720) | ||
self.assertEqual(output.format.color_family, vs.YUV) | ||
self.assertEqual(output.format.bits_per_sample, 8) | ||
|
||
def test_merge_scalers_upscale(self) -> None: | ||
input = vs.core.std.BlankClip(width=1280, height=720, format=vs.YUV420P8) | ||
scaler = MergeScalers((Bicubic, 0.5), (Bilinear, 0.5)) | ||
output = scaler.scale(input, 1920, 1080) | ||
self.assertEqual(output.width, 1920) | ||
self.assertEqual(output.height, 1080) | ||
self.assertEqual(output.format.color_family, vs.YUV) | ||
self.assertEqual(output.format.bits_per_sample, 8) |