changeset 1496:36926cf7aae9 draft

Merged multicoreware/xhevc into default
author Deepthi Devaki Akkoorath <deepthidevaki@multicorewareinc.com>
date Thu, 16 May 2013 17:57:01 +0530
parents 589879bc8826 (current diff) c1f2c00e777d (diff)
children 1f953c5b0464
files
diffstat 5 files changed, 113 insertions(+-), 0 deletions(-) [+]
line wrap: on
line diff
--- a/source/tools/CMakeLists.txt	Thu May 16 16:24:21 2013 +0530
+++ b/source/tools/CMakeLists.txt	Thu May 16 17:57:01 2013 +0530
@@ -1,1 +1,2 @@
 add_subdirectory(dr_psnr)
+add_subdirectory(performanceProfiler)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/tools/performanceProfiler/Profiler.bat	Thu May 16 17:57:01 2013 +0530
@@ -0,0 +1,55 @@
+echo Starting  %testFile%
+::run the encoder
+cd "%encoderApplicationPath%"
+echo Begin
+if exist x265-cli.exe (
+	x265-cli.exe -c "%fileCfgPath%\%testFile%.cfg" -c "%fileCfgPath%\encoder_I_15P.cfg" -f %frames% -b "%encoderApplicationPath%\str_%testFile%.bin" > "%encoderApplicationPath%"\encodeLog_%testFile%.txt
+)
+
+
+:: run the HM decoder
+if exist "%encoderApplicationPath%\str_%testFile%.bin" (
+
+	cd "%DecoderApplicationPath%"
+	if exist TAppDecoder.exe (
+		TAppDecoder.exe -b "%encoderApplicationPath%\str_%testFile%.bin" -o "%DecoderApplicationPath%\decode_%testFile%.yuv" > "%DecoderApplicationPath%"\decodeLog_%testFile%.txt
+	)
+)
+
+
+
+
+:: run dr_psnr
+cd  "%psnrApplicationPath%"
+if exist "%fileCfgPath%\%testFile%.yuv" (
+if exist "%DecoderApplicationPath%\decode_%testFile%.yuv" (
+if exist dr_psnr.exe (
+dr_psnr.exe -r "%fileCfgPath%\%testFile%.yuv" -c "%DecoderApplicationPath%\decode_%testFile%.yuv" -w 1280 -h 720 -e 10 > "%psnrApplicationPath%"\dr_psnr_output_%testFile%.txt
+)
+)
+)
+
+
+
+echo Test Sequence File : %testFile%.yuv >> "%encoderApplicationPath%"\results.txt
+if exist "%psnrApplicationPath%"\dr_psnr_output_%testFile%.txt (
+findstr /l "Avg " "%psnrApplicationPath%"\dr_psnr_output_%testFile%.txt > temp.txt
+for /f "tokens=2,3,4" %%a in (temp.txt) do (
+echo PSNR Y  : %%a  >> "%encoderApplicationPath%"\results.txt
+echo PSNR U  : %%b  >> "%encoderApplicationPath%"\results.txt
+echo PSNR V  : %%c  >> "%encoderApplicationPath%"\results.txt
+)
+)
+
+
+		
+	
+cd "%encoderApplicationPath%"
+if exist "%encoderApplicationPath%"\encodeLog_%testFile%.txt (
+
+	findstr /b "Bytes written to file: " "%encoderApplicationPath%"\encodeLog_%testFile%.txt >> "%encoderApplicationPath%"\results.txt
+	
+    findstr /l "sec"  "%encoderApplicationPath%"\encodeLog_%testFile%.txt >> "%encoderApplicationPath%"\results.txt
+	
+)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/tools/performanceProfiler/Readme.txt	Thu May 16 17:57:01 2013 +0530
@@ -0,0 +1,15 @@
+1.Set the following in the config file
+
+ScriptPath - path where the batch scripts (Profiler.bat)are saved.
+DecoderApplicationPath - path where the decoder application is present (TAppDecoder.exe)
+encoderApplicationPath - path where encoder application is present (x265-cli.exe)
+fileCfgPath  -  Path where input files and cfg files are present. Both input testsequence file name and cfg filename should be same
+psnrApplicationPath - Path where the ds_psnr application is present (dr_psnr.exe)
+frames -- no:of frames to encode
+testFile1= filename without the extension
+
+
+2. Run performanceProfiler.bat
+
+3. Check the results in Result.txt under the path <encoderApplicationPath >
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/tools/performanceProfiler/config.txt	Thu May 16 17:57:01 2013 +0530
@@ -0,0 +1,13 @@
+workingdir=D:\\
+ScriptPath=D:\\sumalatha\projects\hevc\scripts\decoder
+DecoderApplicationPath=D:\\sumalatha\projects\hevc\HM_original\bin\vc10\Win32\Release
+encoderApplicationPath=D:\\sumalatha\projects\hevc\HM_sumalatha_may_16\build\vc11-x86_64\Release
+fileCfgPath=D:\\sumalatha\projects\hevc\hevc_samples
+psnrApplicationPath=D:\\sumalatha\projects\hevc\HM_original\bin\vc10\Win32\Release
+frames=20
+testFile1=FourPeople_1280x720_60
+testFile2=BasketballDrive_1920x1080_50
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/source/tools/performanceProfiler/performanceProfiler.bat	Thu May 16 17:57:01 2013 +0530
@@ -0,0 +1,29 @@
+@echo off
+@setlocal
+
+
+@for /f "tokens=1* delims==" %%a in (config.txt) do (
+if %%a==DecoderApplicationPath set DecoderApplicationPath=%%b
+if %%a==ScriptPath set ScriptPath=%%b
+if %%a==encoderApplicationPath set encoderApplicationPath=%%b
+if %%a==fileCfgPath set fileCfgPath=%%b
+if %%a==psnrApplicationPath set psnrApplicationPath=%%b
+if %%a==frames set frames=%%b
+if %%a==testFile1 set testFile1=%%b
+if %%a==testFile2 set testFile2=%%b
+if %%a==testFile3 set testFile3=%%b
+)
+
+echo Test Results > "%encoderApplicationPath%"\results.txt
+
+for /L %%G in (1,1,2) do (
+
+if  %%G==1  set testFile=%testFile1%
+if  %%G==2  set testFile=%testFile2%
+if  %%G==3  set testFile=%testFile3%	
+
+ cd %ScriptPath%
+ CALL Profiler.bat
+)
+
+	
\ No newline at end of file