From b9244a620eeb6a2d7e074d9b8bda545dd8eb0926 Mon Sep 17 00:00:00 2001 From: Pauli Oikkonen Date: Thu, 19 Nov 2020 18:39:39 +0200 Subject: [PATCH] fixes --- rdcost-weight-tool/build.sh | 4 ++-- rdcost-weight-tool/extract_rdcosts.py | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/rdcost-weight-tool/build.sh b/rdcost-weight-tool/build.sh index 68fecfee..0c6ff6d5 100755 --- a/rdcost-weight-tool/build.sh +++ b/rdcost-weight-tool/build.sh @@ -1,4 +1,4 @@ #!/bin/sh -gcc -O2 filter_rdcosts.c -o ../src/frcosts_matrix -gcc -O2 ols_2ndpart.c -o ../src/ols_2ndpart +gcc -O2 filter_rdcosts.c -o frcosts_matrix +gcc -O2 ols_2ndpart.c -o ols_2ndpart diff --git a/rdcost-weight-tool/extract_rdcosts.py b/rdcost-weight-tool/extract_rdcosts.py index 33938abf..a7a73fcb 100755 --- a/rdcost-weight-tool/extract_rdcosts.py +++ b/rdcost-weight-tool/extract_rdcosts.py @@ -15,11 +15,17 @@ ofdir = os.path.join("/tmp", "rdcost", "data") smt_threads = 8 # Kinda lazy, but just match this to your cpu n_kvz_threads = 1 # How many threads each kvz instance is running? n_kvazaars = smt_threads // n_kvz_threads -kvz_srcdir = lambda path: os.path.join(os.path.dirname(os.path.realpath(__file__)), path) +kvz_srcdir = lambda path: os.path.join( + os.path.dirname( + os.path.dirname( + os.path.realpath(__file__) + ) + ), "src", path) + dest_qps = tuple(range(51)) -base_qps = tuple(range(22, 28)) -sequences = ("/opt/test_seqs/hevc-D/*.yuv",)# "/opt/test_seqs/custom_seqs/*/*.yuv") +base_qps = tuple(range(12, 43)) +sequences = ("/opt/test_seqs/custom_seqs/*/*.yuv",) kvzargs = [kvz_srcdir("kvazaar"), "--threads", str(n_kvz_threads), "--preset=ultrafast", "--fastrd-sampling", "--fast-residual-cost=0"] kvzenv = {"LD_LIBRARY_PATH": kvz_srcdir(".libs/")} @@ -137,6 +143,7 @@ def threadfunc(joblist): run_job(job) def main(): + assert(isinstance(sequences, tuple)) jobs = combinations(chain(map(glob.glob, sequences)), base_qps) joblist = MTSafeIterable(jobs)