mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-25 10:40:51 +00:00
Revert "Make target vmaf and boosting compatible with a single pass 2 command"
This reverts commit fa3e69bc
This commit is contained in:
parent
fd751b3ac2
commit
d06977f6e4
2 changed files with 5 additions and 4 deletions
5
av1an.py
5
av1an.py
|
@ -129,12 +129,13 @@ class Av1an:
|
|||
source, target = Path(commands[-1][0]), Path(commands[-1][1])
|
||||
frame_probe_source = frame_probe(source)
|
||||
|
||||
# TODO(n9Mtq4): reuse of first pass doesn't work with boosting and vmaf_target
|
||||
# Target Vmaf Mode
|
||||
if self.vmaf_target:
|
||||
tg_cq = self.target_vmaf(source)
|
||||
cm1 = man_cq(commands[0], tg_cq)
|
||||
|
||||
if self.passes == 2 and (not self.reuse_first_pass):
|
||||
if self.passes == 2:
|
||||
cm2 = man_cq(commands[1], tg_cq)
|
||||
commands = (cm1, cm2) + commands[2:]
|
||||
else:
|
||||
|
@ -142,7 +143,7 @@ class Av1an:
|
|||
|
||||
# Boost
|
||||
if self.boost:
|
||||
commands = boosting(self.boost_limit, self.boost_range, source, commands, self.passes, self.reuse_first_pass)
|
||||
commands = boosting(self.boost_limit, self.boost_range, source, commands, self.passes)
|
||||
|
||||
log(f'Enc: {source.name}, {frame_probe_source} fr\n')
|
||||
|
||||
|
|
|
@ -26,12 +26,12 @@ def boost(command: str, brightness, b_limit, b_range, new_cq=0):
|
|||
print(f'Error in encoding loop {e}\nAt line {exc_tb.tb_lineno}')
|
||||
|
||||
|
||||
def boosting(bl, br, source, commands, passes, reuse_first_pass):
|
||||
def boosting(bl, br, source, commands, passes):
|
||||
try:
|
||||
brightness = get_brightness(source.absolute().as_posix())
|
||||
com0, cq = boost(commands[0], brightness, bl, br )
|
||||
|
||||
if passes == 2 and (not reuse_first_pass):
|
||||
if passes == 2:
|
||||
com1, _ = boost(commands[1], brightness, bl, br, new_cq=cq)
|
||||
commands = (com0, com1) + commands[2:]
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue