speccpu/x264: add recompile_mc_src to simplify code
This commit is contained in:
@@ -22,19 +22,9 @@ def x264_disable_mc_mul(
|
||||
assert x264_build.exists()
|
||||
assert "x264_src" in os.listdir(x264_build)
|
||||
|
||||
mc_path = x264.get_mc_path(x264_build)
|
||||
assert mc_path.exists()
|
||||
|
||||
mc_src = x264.MCBuilder().with_disabled_iscale_mul().build()
|
||||
|
||||
# Write mc_src to mc_path, recompile it, and replace resulting exe
|
||||
with open(mc_path, "w") as f:
|
||||
f.write(mc_src)
|
||||
|
||||
# Recompile
|
||||
recompiled_x264_path = x264.recompile_mc(mc_path, x264_build, spec_env)
|
||||
assert recompiled_x264_path.exists()
|
||||
assert recompiled_x264_path.is_file()
|
||||
recompiled_x264_path = x264.recompile_mc_src(mc_src, x264_build, spec_env)
|
||||
|
||||
# Execute that new binary
|
||||
x264.update_exe(recompiled_x264_path, x264_dir / "exe")
|
||||
|
||||
Reference in New Issue
Block a user