vmaf refactoring

This commit is contained in:
Zen 2020-07-22 17:47:22 +03:00
parent 400dca80c6
commit 936b6733a0

View file

@ -153,14 +153,7 @@ def target_vmaf_search(probe, source, frames, args):
vmaf_cq.append((score, fork[i])) vmaf_cq.append((score, fork[i]))
q, q_vmaf = get_target_q(vmaf_cq, args.vmaf_target ) return vmaf_cq
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
def target_vmaf(source, args): def target_vmaf(source, args):
@ -177,10 +170,17 @@ def target_vmaf(source, args):
else: else:
vmaf_cq.extend(scores) 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) 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: if args.vmaf_plots:
plot_probes(args, vmaf_cq, args.vmaf_target, probe, frames) plot_probes(args, vmaf_cq, args.vmaf_target, probe, frames)