From 7e5a3f69396c69dca46a207c9788cae2a3123e92 Mon Sep 17 00:00:00 2001 From: jeffqjiangNew <142832361+jeffqjiangNew@users.noreply.github.com> Date: Mon, 28 Apr 2025 21:25:12 -0400 Subject: [PATCH] * CI: Added AV1 stability test to CI. (#576) --- .jenkins/common.groovy | 19 ++++++++++++++++++- test/testScripts/run_rocDecodeSamples.py | 10 +++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.jenkins/common.groovy b/.jenkins/common.groovy index 1facacdbca..3ad3535514 100644 --- a/.jenkins/common.groovy +++ b/.jenkins/common.groovy @@ -108,6 +108,17 @@ def runTestCommand (platform, project) { wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/AvcStability.zip unzip AvcStability.zip fi + if ${runAv1Test}; then + FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/Av1Stability -type f | wc -l) + # Check if there are 24 files + if [ "\$FILE_COUNT" -ne 24 ]; then + echo "wrong file count" + ls + cd \${JENKINS_HOME_DIR}/rocDecode + wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/Av1Stability.zip + unzip Av1Stability.zip + fi + fi if ${runHevcStability}; then FILE_COUNT=\$(find \${JENKINS_HOME_DIR}/rocDecode/HevcStability -type f | wc -l) # Check if there are 44 files @@ -140,6 +151,8 @@ def runTestCommand (platform, project) { if ${runAv1Test}; then wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeConformance/Av1Conformance_v1.0.zip unzip Av1Conformance_v1.0.zip + wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/Av1Stability.zip + unzip Av1Stability.zip fi if ${runHevcStability}; then wget http://math-ci.amd.com/userContent/computer-vision/rocDecodeStability/HevcStability.zip @@ -188,7 +201,11 @@ def runTestCommand (platform, project) { python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/AvcStability --results_directory . --check_decode_status 1 if ${runHevcStability}; then cd ../ && mkdir hevc-stability && cd hevc-stability - python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode//HevcStability --results_directory . --check_decode_status 1 + python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/HevcStability --results_directory . --check_decode_status 1 + fi + if ${runAv1Test}; then + cd ../ && mkdir av1-stability && cd av1-stability + python3 /opt/rocm/share/rocdecode/test/testScripts/run_rocDecodeSamples.py --videodecode_exe ./../../rocdecode-sample/videodecode --files_directory \${JENKINS_HOME_DIR}/rocDecode/Av1Stability --results_directory . --check_decode_status 1 --use_ffmpeg_demuxer 0 fi cd ../../ echo rocdecode-sample - videoDecode with data1 video test diff --git a/test/testScripts/run_rocDecodeSamples.py b/test/testScripts/run_rocDecodeSamples.py index 56080d62b5..b4790bb3b2 100644 --- a/test/testScripts/run_rocDecodeSamples.py +++ b/test/testScripts/run_rocDecodeSamples.py @@ -92,6 +92,8 @@ parser.add_argument('--results_directory', type=str, default='', help='The path to a dirctory to store results - optional') parser.add_argument('--check_decode_status', type=int, default=0, help='Report the number of streams that have completed decoding without abortion. For decoder stability check. - optional (default:0, meaning normal performance report)') +parser.add_argument('--use_ffmpeg_demuxer', type=int, default=1, + help='Indicator to use FFMPEG demuxer - optional (default:1). If set to 0, built-in bitstream reader is used.') args = parser.parse_args() @@ -105,9 +107,15 @@ sampleMode = args.sample_mode numThreads = args.num_threads maxNumFrames = args.max_num_decoded_frames checkDecStatus = args.check_decode_status +useFFDemuxer = args.use_ffmpeg_demuxer if checkDecStatus == 1: sampleMode = 0 +if useFFDemuxer == 1: + bsReaderOption = '' +else: + bsReaderOption = '-no_ffmpeg_demux' + print("\nrunrocDecodeTests V"+__version__+"\n") # rocDecode Application @@ -156,7 +164,7 @@ if sampleMode == 0: for current_file in iter_files(filesDirPath): print_bitrate(current_file) - os.system(run_rocDecode_app+' -i '+str(current_file)+' -d '+str(gpuDeviceID)+' -f '+str(maxNumFrames)+' | tee -a '+resultsPath+'/rocDecode_output.log') + os.system(run_rocDecode_app + ' -i ' + str(current_file) + ' -d ' + str(gpuDeviceID) + ' -f ' + str(maxNumFrames) + ' ' + str(bsReaderOption) + ' | tee -a '+resultsPath+'/rocDecode_output.log') print("\n\n") if checkDecStatus == 0: