From 936b6733a06aa7549738322d6f84ecdb6872e5ef Mon Sep 17 00:00:00 2001 From: Zen <46526140+master-of-zen@users.noreply.github.com> Date: Wed, 22 Jul 2020 17:47:22 +0300 Subject: [PATCH] vmaf refactoring --- Av1an/target_vmaf.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Av1an/target_vmaf.py b/Av1an/target_vmaf.py index cd95e90..1b0090c 100644 --- a/Av1an/target_vmaf.py +++ b/Av1an/target_vmaf.py @@ -153,14 +153,7 @@ def target_vmaf_search(probe, source, frames, args): vmaf_cq.append((score, fork[i])) - q, q_vmaf = get_target_q(vmaf_cq, args.vmaf_target ) - - log(f'File: {source.stem}, Fr: {frames}\n' \ - f'Q: {sorted([x[1] for x in vmaf_cq])}\n' \ - f'Vmaf: {sorted([x[0] for x in vmaf_cq], reverse=True)}\n' \ - f'Target Q: {q} Vmaf: {q_vmaf}\n\n') - - return q, vmaf_cq + return vmaf_cq def target_vmaf(source, args): @@ -177,10 +170,17 @@ def target_vmaf(source, args): else: vmaf_cq.extend(scores) - q, scores = target_vmaf_search(probe, source, frames, args) + scores = target_vmaf_search(probe, source, frames, args) vmaf_cq.extend(scores) + q, q_vmaf = get_target_q(vmaf_cq, args.vmaf_target ) + + log(f'File: {source.stem}, Fr: {frames}\n' \ + f'Q: {sorted([x[1] for x in vmaf_cq])}\n' \ + f'Vmaf: {sorted([x[0] for x in vmaf_cq], reverse=True)}\n' \ + f'Target Q: {q} Vmaf: {q_vmaf}\n\n') + if args.vmaf_plots: plot_probes(args, vmaf_cq, args.vmaf_target, probe, frames)