x264: support perf ref

This commit is contained in:
2025-03-24 22:29:58 +08:00
parent 572b949af4
commit 133b4dfae4

View File

@@ -82,3 +82,31 @@ def recompile_mc(mc_path: Path, build: Path, spec_env: os._Environ):
# Run "make"
return make(build, spec_env)
def perf_ref(x264_run, perf_output):
"""Run "perf" to profile x264 reference performance."""
x264_cmd = [
x264_run / "x264_s_base.mytest-m64",
"--seek",
"500",
"--dumpyuv",
"200",
"--frames",
"1250",
"-o",
"BuckBunny_New.264",
"BuckBunny.yuv",
"1280x720",
]
run(
[
"perf",
"record",
"-o",
perf_output,
"--",
*x264_cmd,
],
cwd=x264_run,
)