shithub: openh264

Download patch

ref: f3a5655754104eb29df4e67fca2062d47bfbcf21
parent: 69be28bd1b80d99857074a4b0074ac667fe2488e
author: syureyi <lingzhu2@cisco.com>
date: Mon Jul 21 12:15:03 EDT 2014

also delete spaces

--- a/autotest/performaceTest/ios/run_AutoTest_ios.sh
+++ b/autotest/performaceTest/ios/run_AutoTest_ios.sh
@@ -13,13 +13,13 @@
 buildXcodeProject()
 {
  xcodebuild ARCHS="${CODEC_TEST_IOS_ARCH}" VALID_ARCHS="${CODEC_TEST_IOS_ARCH}" ONLY_ACTIVE_ARCH=YES -project $1 -target $2 -configuration $3 -sdk ${CODEC_TEST_IOS_PLATFORM} clean build
- 
-if [ $? -eq 0 ]; then                                                                              
- echo "build $1 $3 successfully"                                                                                                                                                         
- else                                                                                              
- echo "build $1 $3  fail"                                                                        
- exit 1                                                                                         
- fi            
+
+if [ $? -eq 0 ]; then
+ echo "build $1 $3 successfully"
+ else
+ echo "build $1 $3  fail"
+ exit 1
+ fi
 }
 
 
@@ -50,23 +50,23 @@
      CODEC_TEST_RES=${AUTO_TEST_IOS_PATH}/../DecoderPerfTestRes
      CODEC_TEST_LOG="decPerf"
  elif [ "release" = "${PARAM}" ]; then
-     CODEC_TEST_IOS_DEBUG_RELEASE="Release"                                                      
-     CODEC_TEST_IOS_REPORT_SUBFOLDER="release"                                                   
- elif [ "debug" = "${PARAM}" ]; then                                                             
-     CODEC_TEST_IOS_DEBUG_RELEASE="Debug"                                                        
-     CODEC_TEST_IOS_REPORT_SUBFOLDER="debug"                                                     
- else                                                                                          
-    echo parameters are illegal!!!, please have a check.                                        
-    exit 1                                                                                      
- fi                                                                                            
- done     
+     CODEC_TEST_IOS_DEBUG_RELEASE="Release"
+     CODEC_TEST_IOS_REPORT_SUBFOLDER="release"
+ elif [ "debug" = "${PARAM}" ]; then
+     CODEC_TEST_IOS_DEBUG_RELEASE="Debug"
+     CODEC_TEST_IOS_REPORT_SUBFOLDER="debug"
+ else
+    echo parameters are illegal!!!, please have a check.
+    exit 1
+ fi
+ done
 
 echo "Codec test will run on ${CODEC_TEST_IOS_PLATFORM} with ${CODEC_TEST_IOS_DEBUG_RELEASE}"
 buildXcodeProject ${CODEC_TEST_XCODE_PROJECT_NAME} ${CODEC_TEST_IOS_PROJECT_NAME} ${CODEC_TEST_IOS_DEBUG_RELEASE} ${CODEC_TEST_IOS_PLATFORM}
 
 
- 
 
+
 ##############run on ios devices#########################
 # for real device
 if [ ! -d ${CODEC_TEST_IOS_APP} ] ; then
@@ -81,15 +81,15 @@
 pids_str=`ps x -o pid,command | grep -v grep | grep "instruments" | awk '{printf "%s,", $1}'`
 instruments_pids="${pids_str//,/ }"
 for pid in ${instruments_pids}; do
-echo "Found instruments ${pid}. Killing..."                                                      
-kill -9 ${pid} && wait ${pid} &> /dev/null                                                       
-done                                                                                             
+echo "Found instruments ${pid}. Killing..."
+kill -9 ${pid} && wait ${pid} &> /dev/null
+done
 
 
 
 DEVICES=`system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'`
 if [ "${DEVICES}#" == "#" ]
-then  
+then
 echo "Can not find any connected device! please check device is connected to MAC!"
 exit 1
 else
@@ -135,13 +135,13 @@
 #start to get encoder/decoder performance data,default run the xcode with release
 iosPerformanceTest $ENCDEC release
 
-if [ $? -ne 0 ]; then                                                                                              
-echo "Running $ENCDEC demo to get encoder performance is failed!"                          
+if [ $? -ne 0 ]; then
+echo "Running $ENCDEC demo to get encoder performance is failed!"
 exit 1
-else 
+else
 echo Finished $ENCDEC performance test on ios devices
 echo the test result is generated at ./ios/report/xx.loGbash parsePerfData.sh
 echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxIOS $ENCDEC  Endxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 fi
-#TODO:according to the trace of instruments to do some analysis                            
+#TODO:according to the trace of instruments to do some analysis
 find .\ -name *.trace -exec rm -rf {} \;
--- a/autotest/performaceTest/ios/uiascript.js
+++ b/autotest/performaceTest/ios/uiascript.js
@@ -11,7 +11,7 @@
 			var acceptButton = buttons[buttonCount - 1];
 			acceptButton.tap(); // last button is accept
 		}
-       	return true; //forbid the default cancel processing
+	return true; //forbid the default cancel processing
     }
     return false; //using the default cancel processing
 }
--- a/autotest/performaceTest/parsePerfData.sh
+++ b/autotest/performaceTest/parsePerfData.sh
@@ -22,32 +22,32 @@
     then seperatorNum=3
     else
         seperatorNum=2
-    fi 
+    fi
 
 	while read line
-	do 
+	do
 		if [[ $line =~ "enc yuv file"  ]]
 		then
             FileName=`echo $line | awk 'BEGIN {FS="enc yuv file"} {print $2}'`
-            FileName=`echo $FileName | awk 'BEGIN {FS=":"} {print $2}'` 
+            FileName=`echo $FileName | awk 'BEGIN {FS=":"} {print $2}'`
         fi
         if [[ $line =~ "Width" ]]
-        then        
+        then
             Width=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
         fi
         if [[ $line =~ "Height" ]]
-        then    
+        then
             Height=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
         fi
-        if [[ $line =~ "Frames" ]]         
-        then    
+        if [[ $line =~ "Frames" ]]
+        then
             Frames=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
         fi
-        if [[ $line =~ "FPS" ]]         
-        then    
+        if [[ $line =~ "FPS" ]]
+        then
             FPS=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
             FPS=`echo $FPS | awk 'BEGIN {FS="fps"} {print $1}'`
-        echo "${FileName},"${Width}x${Height}",${Frames},${FPS}" 
+        echo "${FileName},"${Width}x${Height}",${Frames},${FPS}"
         fi
 
         if [[  $line =~ "encode time"  ]]
@@ -62,11 +62,11 @@
         then
             FileName=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
        if [ $1 = "ios" ]
-       then 
+       then
             FileName=`echo $FileName | awk -F"DecoderPerfTestRes" '{print $2}'`
             FileName=`echo $FileName | awk -F"/" '{print $2}'`
        else
-            FileName=`echo $FileName | awk -F"/" '{print $4}'`  
+            FileName=`echo $FileName | awk -F"/" '{print $4}'`
        fi
       fi
 
@@ -83,7 +83,7 @@
 then echo "Please input $0 [android/ios]"
 fi
 if [ $* = "android" ]
-then 
+then
      Result_log_path="./android/report/"
      suffix=android
      dos2unix ${Result_log_path}*.*
@@ -99,7 +99,7 @@
   PerformFile=${PerformFile}_${suffix}.csv
  #inital perfermance file
  echo "$log,,,">>${AUTO_TEST_RESULT_PATH}${PerformFile}
- echo "YUV,Resolution,Encodedframes,FPS">>${AUTO_TEST_RESULT_PATH}${PerformFile} 
+ echo "YUV,Resolution,Encodedframes,FPS">>${AUTO_TEST_RESULT_PATH}${PerformFile}
   runGetPerformanceInfo_openh264 ${suffix} ${Result_log_path}${log}>>${AUTO_TEST_RESULT_PATH}${PerformFile}
 done
 }
--- a/autotest/performaceTest/run_perfTest.sh
+++ b/autotest/performaceTest/run_perfTest.sh
@@ -23,7 +23,7 @@
   echo Running the decoder performance test
   ENC=0
 else
-  echo parameters are illegal!!!, ${0} [ios/android] [enc/dec] 
+  echo parameters are illegal!!!, ${0} [ios/android] [enc/dec]
   exit 1
 fi
 done