fix deinterlace
This commit is contained in:
@@ -161,6 +161,55 @@ class FfxControllerTests(unittest.TestCase):
|
||||
any(token.startswith("ENCODING_PRESET=") for token in commands[1])
|
||||
)
|
||||
|
||||
def test_vp9_run_job_applies_identical_video_filters_to_both_passes(self):
|
||||
context = self.make_context(VideoEncoder.VP9)
|
||||
target_descriptor, source_descriptor = self.make_media_descriptors()
|
||||
controller = FfxController(context, target_descriptor, source_descriptor)
|
||||
commands = []
|
||||
|
||||
with (
|
||||
patch.object(
|
||||
controller,
|
||||
"executeCommandSequence",
|
||||
side_effect=lambda command: commands.append(command) or ("", "", 0),
|
||||
),
|
||||
patch("ffx.ffx_controller.os.path.exists", return_value=False),
|
||||
):
|
||||
controller.runJob(
|
||||
"input.mkv",
|
||||
"output.webm",
|
||||
targetFormat="webm",
|
||||
chainIteration=[
|
||||
{
|
||||
"identifier": "quality",
|
||||
"parameters": {"quality": 27},
|
||||
},
|
||||
{
|
||||
"identifier": "nlmeans",
|
||||
"parameters": {},
|
||||
"tokens": ["nlmeans=s=2.8"],
|
||||
},
|
||||
{
|
||||
"identifier": "bwdif",
|
||||
"parameters": {},
|
||||
"tokens": ["bwdif=mode=1"],
|
||||
},
|
||||
],
|
||||
cropArguments={
|
||||
"output_width": 704,
|
||||
"output_height": 576,
|
||||
"x_offset": 8,
|
||||
"y_offset": 0,
|
||||
},
|
||||
)
|
||||
|
||||
self.assertEqual(2, len(commands))
|
||||
expectedFilterChain = (
|
||||
"crop=704:576:8:0, nlmeans=s=2.8, bwdif=mode=1"
|
||||
)
|
||||
self.assert_token_pair(commands[0], "-vf", expectedFilterChain)
|
||||
self.assert_token_pair(commands[1], "-vf", expectedFilterChain)
|
||||
|
||||
def test_av1_run_job_emits_file_level_quality_and_preset_metadata(self):
|
||||
context = self.make_context(VideoEncoder.AV1)
|
||||
target_descriptor, source_descriptor = self.make_media_descriptors()
|
||||
|
||||
Reference in New Issue
Block a user