update CTC script

1. add control flag to enable/disable temporal filtering
2. update QPs for still image class for CTC v2.
3. update excel template file name

Change-Id: Ie454c52f5e3a9bd710b9269d4d6cf13aa3e0e0af
diff --git a/tools/convexhull_framework/bin/AOM_CWG_AS_CTC_v9.6.xlsm b/tools/convexhull_framework/bin/AOM_CWG_AS_CTC_v9.6.xlsm
index 1979e7d..c007ff3 100644
--- a/tools/convexhull_framework/bin/AOM_CWG_AS_CTC_v9.6.xlsm
+++ b/tools/convexhull_framework/bin/AOM_CWG_AS_CTC_v9.6.xlsm
Binary files differ
diff --git a/tools/convexhull_framework/bin/AOM_CWG_AS_CTC_v9.7.xlsm b/tools/convexhull_framework/bin/AOM_CWG_AS_CTC_v9.7.xlsm
new file mode 100644
index 0000000..167fadb
--- /dev/null
+++ b/tools/convexhull_framework/bin/AOM_CWG_AS_CTC_v9.7.xlsm
Binary files differ
diff --git a/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v6.1.xlsm b/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v6.1.xlsm
new file mode 100644
index 0000000..d6a3578
--- /dev/null
+++ b/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v6.1.xlsm
Binary files differ
diff --git a/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v6.xlsm b/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v6.xlsm
deleted file mode 100644
index 3969919..0000000
--- a/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v6.xlsm
+++ /dev/null
Binary files differ
diff --git a/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v7.1.xlsm b/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v7.1.xlsm
new file mode 100644
index 0000000..2d84cd1
--- /dev/null
+++ b/tools/convexhull_framework/bin/AOM_CWG_Regular_CTC_v7.1.xlsm
Binary files differ
diff --git a/tools/convexhull_framework/src/AV2CTCProgress.py b/tools/convexhull_framework/src/AV2CTCProgress.py
index 83723cc..d5518e9 100644
--- a/tools/convexhull_framework/src/AV2CTCProgress.py
+++ b/tools/convexhull_framework/src/AV2CTCProgress.py
@@ -327,7 +327,7 @@
         csv.write(',%s'%qty)
     csv.write(",EncTime(s),EncInstr\n")
 
-    wb = xlsxwriter.Workbook(summary + ".xls")
+    wb = xlsxwriter.Workbook(summary + ".xlsx")
     shts = []
 
     for mode in csv_files.keys():
diff --git a/tools/convexhull_framework/src/Config.py b/tools/convexhull_framework/src/Config.py
index c048ff4..93f6fb7 100644
--- a/tools/convexhull_framework/src/Config.py
+++ b/tools/convexhull_framework/src/Config.py
@@ -36,6 +36,7 @@
 UsePerfUtil = False
 EnableMD5 = True
 EnableOpenGOP = False
+EnableTemporalFilter = False
 Platform = platform.system()
 PSNR_Y_WEIGHT = 14.0
 PSNR_U_WEIGHT = 1.0
@@ -43,8 +44,12 @@
 APSNR_Y_WEIGHT = 4.0
 APSNR_U_WEIGHT = 1.0
 APSNR_V_WEIGHT = 1.0
-CTC_RegularXLSTemplate = os.path.join(BinPath, 'AOM_CWG_Regular_CTC_v6.xlsm')
-CTC_ASXLSTemplate = os.path.join(BinPath, 'AOM_CWG_AS_CTC_v9.6.xlsm')
+if CTC_VERSION == '2.0':
+    CTC_RegularXLSTemplate = os.path.join(BinPath, 'AOM_CWG_Regular_CTC_v7.1.xlsm')
+    CTC_ASXLSTemplate = os.path.join(BinPath, 'AOM_CWG_AS_CTC_v9.7.xlsm')
+else:
+    CTC_RegularXLSTemplate = os.path.join(BinPath, 'AOM_CWG_Regular_CTC_v6.1.xlsm')
+    CTC_ASXLSTemplate = os.path.join(BinPath, 'AOM_CWG_AS_CTC_v9.6.xlsm')
 
 ############ test contents #######################################
 ContentPath = "D://YUVs//AV2-CTC"
@@ -83,7 +88,7 @@
         "RA": [110, 135, 160, 185, 210, 235],
         "AI": [85, 110, 135, 160, 185, 210],
         "AS": [110, 135, 160, 185, 210, 235],
-        "STILL": [85, 110, 135, 160, 185, 210],
+        "STILL": [60, 85, 110, 135, 160, 185],
     }
 else:
     QPs = {
diff --git a/tools/convexhull_framework/src/Utils.py b/tools/convexhull_framework/src/Utils.py
index 7e2ade0..fe4687d 100755
--- a/tools/convexhull_framework/src/Utils.py
+++ b/tools/convexhull_framework/src/Utils.py
@@ -23,8 +23,8 @@
 import matplotlib.pyplot as plt
 from operator import itemgetter
 from Config import LogLevels, ContentPath, Platform, Path_RDResults, QPs, PSNR_Y_WEIGHT, PSNR_U_WEIGHT, PSNR_V_WEIGHT, \
-APSNR_Y_WEIGHT, APSNR_U_WEIGHT, APSNR_V_WEIGHT, CTC_VERSION, InterpolatePieces, UsePCHIPInterpolation, FFMPEG, CTC_TEST_SET
-from AV2CTCVideo import Y4M_CLIPs
+APSNR_Y_WEIGHT, APSNR_U_WEIGHT, APSNR_V_WEIGHT, CTC_VERSION, InterpolatePieces, UsePCHIPInterpolation, FFMPEG
+from AV2CTCVideo import Y4M_CLIPs, CTC_TEST_SET
 from CalcBDRate import BD_RATE
 
 class Clip:
diff --git a/tools/convexhull_framework/src/VideoEncoder.py b/tools/convexhull_framework/src/VideoEncoder.py
index 6fb6f4f..f379fec 100644
--- a/tools/convexhull_framework/src/VideoEncoder.py
+++ b/tools/convexhull_framework/src/VideoEncoder.py
@@ -14,7 +14,7 @@
 import math
 import Utils
 from Config import AOMENC, AV1ENC, SVTAV1, EnableTimingInfo, Platform, UsePerfUtil, CTC_VERSION, HEVCCfgFile, \
-     HMENC, EnableOpenGOP, GOP_SIZE, SUB_GOP_SIZE
+     HMENC, EnableOpenGOP, GOP_SIZE, SUB_GOP_SIZE, EnableTemporalFilter
 from Utils import ExecuteCmd, ConvertY4MToYUV, DeleteFile, GetShortContentName
 
 def get_qindex_from_QP(QP):
@@ -34,7 +34,7 @@
     args = " --verbose --codec=av1 -v --psnr --obu --frame-parallel=0" \
            " --cpu-used=%s --limit=%d --passes=1 --end-usage=q --i%s " \
            " --use-fixed-qp-offsets=1 --deltaq-mode=0 " \
-           " --enable-tpl-model=0 --enable-keyframe-filtering=0 --fps=%d/%d " \
+           " --enable-tpl-model=0 --fps=%d/%d " \
            " --input-bit-depth=%d --bit-depth=%d -w %d -h %d" \
            % (preset, framenum, clip.fmt, clip.fps_num, clip.fps_denom,
               clip.bit_depth, clip.bit_depth, clip.width, clip.height)
@@ -56,6 +56,11 @@
     else:
         args += " --enable-fwd-kf=0 "
 
+    if EnableTemporalFilter:
+        args += " --enable-keyframe-filtering=1 "
+    else:
+        args += " --enable-keyframe-filtering=0 "
+
     if test_cfg == "AI" or test_cfg == "STILL":
         args += " --kf-min-dist=0 --kf-max-dist=0 "
     elif test_cfg == "RA" or test_cfg == "AS":
@@ -95,7 +100,7 @@
     args = " --verbose --codec=av1 -v --psnr --obu --frame-parallel=0" \
            " --cpu-used=%s --limit=%d --passes=1 --end-usage=q --i%s " \
            " --use-fixed-qp-offsets=1 --deltaq-mode=0 " \
-           " --enable-tpl-model=0 --enable-keyframe-filtering=0 --fps=%d/%d " \
+           " --enable-tpl-model=0 --fps=%d/%d " \
            " --input-bit-depth=%d --bit-depth=%d --cq-level=%d -w %d -h %d" \
            % (preset, framenum, clip.fmt, clip.fps_num, clip.fps_denom,
               clip.bit_depth, clip.bit_depth, QP, clip.width, clip.height)
@@ -112,6 +117,11 @@
     else:
         args += " --enable-fwd-kf=0 "
 
+    if EnableTemporalFilter:
+        args += " --enable-keyframe-filtering=1 "
+    else:
+        args += " --enable-keyframe-filtering=0 "
+
     if test_cfg == "AI" or test_cfg == "STILL":
         args += " --kf-min-dist=0 --kf-max-dist=0 "
     elif test_cfg == "RA" or test_cfg == "AS":
@@ -220,6 +230,11 @@
     else:
         args += " --DecodingRefreshType=2 "
 
+    if EnableTemporalFilter:
+        args += " --TemporalFilter=1 "
+    else:
+        args += " --TemporalFilter=0 "
+
     if test_cfg == "AI" or test_cfg == "STILL":
         args += " --IntraPeriod=1 "
     elif test_cfg == "RA" or test_cfg == "AS":