Making aom+SVT-AV1 target_quality faster and SVT-AV1 fixes

This commit is contained in:
zak 2021-05-14 12:56:56 -04:00
parent 107c205c6b
commit 012a200ec4
2 changed files with 12 additions and 12 deletions

View file

@ -13,7 +13,7 @@ class SvtAv1(Encoder):
super(SvtAv1, self).__init__( super(SvtAv1, self).__init__(
encoder_bin="SvtAv1EncApp", encoder_bin="SvtAv1EncApp",
encoder_help="SvtAv1EncApp --help", encoder_help="SvtAv1EncApp --help",
default_args=["--preset", "4", "--rc", "0", "-q", "25"], default_args=["--preset", "4","--keyint", "240", "--rc", "0", "--crf", "25"],
default_passes=1, default_passes=1,
default_q_range=(15, 50), default_q_range=(15, 50),
output_extension="ivf", output_extension="ivf",
@ -86,7 +86,7 @@ class SvtAv1(Encoder):
:return: command with new cq value""" :return: command with new cq value"""
adjusted_command = command.copy() adjusted_command = command.copy()
i = list_index_of_regex(adjusted_command, r"(--qp|-q)") i = list_index_of_regex(adjusted_command, r"(--qp|-q|--crf)")
qp_file = chunk.make_q_file(chunk.per_frame_target_quality_q_list) qp_file = chunk.make_q_file(chunk.per_frame_target_quality_q_list)
@ -104,7 +104,7 @@ class SvtAv1(Encoder):
adjusted_command = command.copy() adjusted_command = command.copy()
i = list_index_of_regex(adjusted_command, r"(--qp|-q)") i = list_index_of_regex(adjusted_command, r"(--qp|-q|--crf)")
adjusted_command[i + 1] = f"{q}" adjusted_command[i + 1] = f"{q}"
return adjusted_command return adjusted_command

View file

@ -82,7 +82,7 @@ class TargetQuality:
vmaf_cq = [] vmaf_cq = []
frames = chunk.frames frames = chunk.frames
if self.probing_rate not in (1, 2): if self.probing_rate not in (1, 2, 3):
self.probing_rate = self.adapt_probing_rate(self.probing_rate, frames) self.probing_rate = self.adapt_probing_rate(self.probing_rate, frames)
if self.probes < 3: if self.probes < 3:
@ -399,11 +399,15 @@ class TargetQuality:
"--enable-order-hint=0", "--enable-order-hint=0",
"--enable-flip-idtx=0", "--enable-flip-idtx=0",
"--enable-dist-wtd-comp=0", "--enable-dist-wtd-comp=0",
"--enable-rect-tx=0",
"--enable-interintra-wedge=0", "--enable-interintra-wedge=0",
"--enable-onesided-comp=0", "--enable-onesided-comp=0",
"--enable-interintra-comp=0", "--enable-interintra-comp=0",
"--enable-global-motion=0", "--enable-global-motion=0",
"--enable-cdef=0",
"--max-reference-frames=3",
"--cdf-update-mode=2",
"--deltaq-mode=0",
"--sb-size=64",
"--min-partition-size=32", "--min-partition-size=32",
"--max-partition-size=32", "--max-partition-size=32",
] ]
@ -470,14 +474,14 @@ class TargetQuality:
f"{n_threads}", f"{n_threads}",
"--preset", "--preset",
"8", "8",
"-q", "--keyint",
"240",
"--crf",
f"{q}", f"{q}",
"--tile-rows", "--tile-rows",
"1", "1",
"--tile-columns", "--tile-columns",
"2", "2",
"--hme",
"0",
"--pred-struct", "--pred-struct",
"0", "0",
"--sg-filter-mode", "--sg-filter-mode",
@ -490,8 +494,6 @@ class TargetQuality:
"0", "0",
"--mrp-level", "--mrp-level",
"0", "0",
"--enable-tpl-la",
"0",
"--enable-mfmv", "--enable-mfmv",
"0", "0",
"--enable-local-warp", "--enable-local-warp",
@ -516,8 +518,6 @@ class TargetQuality:
"0", "0",
"--compound", "--compound",
"0", "0",
"--use-default-me-hme",
"0",
"--ext-block", "--ext-block",
"0", "0",
"--hbd-md", "--hbd-md",