[autotest] add autorepeats
:Release Notes: - :Detailed Notes: - :Testing Performed: - :QA Notes: - :Issues Addressed: -
This commit is contained in:
parent
b799d39427
commit
dd6da41b0d
@ -52,6 +52,8 @@ psnr_check = {
|
||||
|
||||
with_docker = [ "nvv4l2h264enc" ]
|
||||
|
||||
repeats = 3
|
||||
|
||||
formats = {
|
||||
"x264enc": "I420",
|
||||
"nvh264enc": "NV12",
|
||||
@ -239,43 +241,44 @@ def run_autotest():
|
||||
for params in combinations:
|
||||
for profile in profiles:
|
||||
for videoName, videoPath in videos.items():
|
||||
filename = "autotest-" + encoder + "-" + profile + "-test-" + videoName + ".mp4"
|
||||
pipeline = Pipeline()
|
||||
pipeline = (
|
||||
pipeline.add_tracing()
|
||||
.add_source(makeVideoSrc(videoName))
|
||||
.add_encoder(encoder, params.split(" "))
|
||||
.add_profile(profile)
|
||||
.to_file(filename)
|
||||
)
|
||||
print(pipeline.pipeline)
|
||||
try:
|
||||
run_pipeline(pipeline.pipeline)
|
||||
except Exception as e:
|
||||
print(f"Error occurred: {e}")
|
||||
continue
|
||||
psnr_metrics, ssim_metrics = qa.run_quality_check(
|
||||
videoPath,
|
||||
filename,
|
||||
video_info[videoName] + " " + psnr_check[encoder]
|
||||
)
|
||||
dfPsnr = qa.parse_quality_report(psnr_metrics, ssim_metrics)
|
||||
print("-----")
|
||||
dfLatency = getLatencyTable(latency_filename)
|
||||
columnsQ = pd.MultiIndex.from_tuples(
|
||||
[(encoder, profile, videoName, params, col) for col in dfPsnr.columns]
|
||||
)
|
||||
columnsLatency = pd.MultiIndex.from_tuples(
|
||||
[(encoder, profile, videoName, params, col) for col in dfLatency.columns]
|
||||
)
|
||||
dfPsnr.columns = columnsQ
|
||||
dfLatency.columns = columnsLatency
|
||||
qualityDataframe = pd.concat([qualityDataframe, dfPsnr], axis=1)
|
||||
latencyDataframe = pd.concat([latencyDataframe, dfLatency], axis=1)
|
||||
print("=====")
|
||||
print("Current results:")
|
||||
print(dfPsnr)
|
||||
print(dfLatency)
|
||||
for _ in range(repeats):
|
||||
filename = "autotest-" + encoder + "-" + profile + "-test-" + videoName + ".mp4"
|
||||
pipeline = Pipeline()
|
||||
pipeline = (
|
||||
pipeline.add_tracing()
|
||||
.add_source(makeVideoSrc(videoName))
|
||||
.add_encoder(encoder, params.split(" "))
|
||||
.add_profile(profile)
|
||||
.to_file(filename)
|
||||
)
|
||||
print(pipeline.pipeline)
|
||||
try:
|
||||
run_pipeline(pipeline.pipeline)
|
||||
except Exception as e:
|
||||
print(f"Error occurred: {e}")
|
||||
continue
|
||||
psnr_metrics, ssim_metrics = qa.run_quality_check(
|
||||
videoPath,
|
||||
filename,
|
||||
video_info[videoName] + " " + psnr_check[encoder]
|
||||
)
|
||||
dfPsnr = qa.parse_quality_report(psnr_metrics, ssim_metrics)
|
||||
print("-----")
|
||||
dfLatency = getLatencyTable(latency_filename)
|
||||
columnsQ = pd.MultiIndex.from_tuples(
|
||||
[(encoder, profile, videoName, params, col) for col in dfPsnr.columns]
|
||||
)
|
||||
columnsLatency = pd.MultiIndex.from_tuples(
|
||||
[(encoder, profile, videoName, params, col) for col in dfLatency.columns]
|
||||
)
|
||||
dfPsnr.columns = columnsQ
|
||||
dfLatency.columns = columnsLatency
|
||||
qualityDataframe = pd.concat([qualityDataframe, dfPsnr], axis=1)
|
||||
latencyDataframe = pd.concat([latencyDataframe, dfLatency], axis=1)
|
||||
print("=====")
|
||||
print("Current results:")
|
||||
print(dfPsnr)
|
||||
print(dfLatency)
|
||||
qualityDataframe.to_csv(f"qualityResults{encoder}.csv")
|
||||
latencyDataframe.to_csv(f"latencyDataframe{encoder}.csv")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user