diff --git a/autotest/performanceTest/parsePerfData.sh b/autotest/performanceTest/parsePerfData.sh index 94447945..2da8b60c 100755 --- a/autotest/performanceTest/parsePerfData.sh +++ b/autotest/performanceTest/parsePerfData.sh @@ -4,30 +4,30 @@ runGetPerformanceInfo_openh264() { - if [ ! $# -eq 2 ] - then - echo "not enough parameters!" - echo "usage: ${0} [android/ios] ${PerformanceLogFile}" - return 1 - fi + if [ ! $# -eq 2 ] + then + echo "not enough parameters!" + echo "usage: ${0} [android/ios] ${PerformanceLogFile}" + return 1 + fi - local PerformanceLogFile=$2 + local PerformanceLogFile=$2 local FileName="" - local Width="" - local Height="" - local Frames="" - local FPS="" - local EncodeTime="" + local Width="" + local Height="" + local Frames="" + local FPS="" + local EncodeTime="" if [ $1 = "android" ] then seperatorNum=3 else seperatorNum=2 fi - while read line - do - if [[ $line =~ "enc yuv file" ]] - then + while read line + 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}'` fi @@ -51,9 +51,9 @@ runGetPerformanceInfo_openh264() fi if [[ $line =~ "encode time" ]] - then - EncodeTime=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'` - fi + then + EncodeTime=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'` + fi if [[ $line =~ "height" ]] then Height=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'` @@ -70,7 +70,7 @@ runGetPerformanceInfo_openh264() fi fi - done <${PerformanceLogFile} + done <${PerformanceLogFile} } diff --git a/autotest/unitTest/run_unitTest.sh b/autotest/unitTest/run_unitTest.sh index 91804f0b..a1ee4729 100644 --- a/autotest/unitTest/run_unitTest.sh +++ b/autotest/unitTest/run_unitTest.sh @@ -19,7 +19,7 @@ ANDROID_SDK_PATH=${ANDROID_HOME} ANDROID_NDK_PATH=${ANDROID_NDK_HOME} if [ "#${ANDROID_SDK_PATH}" = "#" ] then -echo Please set ANDROID_HOME with the path of Android SDK +echo Please set ANDROID_HOME with the path of Android SDK exit 1 fi if [ "#${ANDROID_NDK_PATH}" = "#" ] diff --git a/codec/build/generate_codec_ver.sh b/codec/build/generate_codec_ver.sh index 61840f97..93f73792 100755 --- a/codec/build/generate_codec_ver.sh +++ b/codec/build/generate_codec_ver.sh @@ -4,15 +4,15 @@ # if [ "$1"x = ""x ]; then - echo "Please input the version number as: major_ver.minor_ver.patch.reserve" - exit 127 + echo "Please input the version number as: major_ver.minor_ver.patch.reserve" + exit 127 fi codec_ver=`echo "$1" | egrep "^([0-9]+[.]){3}[0-9]+$"` if [ $? -ne 0 ]; then - echo "Please input the version number as: major_ver.minor_ver.patch.reserve" - exit 127 + echo "Please input the version number as: major_ver.minor_ver.patch.reserve" + exit 127 fi revision=`git show | head -n 1` diff --git a/codec/decoder/core/inc/dec_frame.h b/codec/decoder/core/inc/dec_frame.h index 164eb64f..713d9427 100644 --- a/codec/decoder/core/inc/dec_frame.h +++ b/codec/decoder/core/inc/dec_frame.h @@ -105,7 +105,7 @@ struct TagDqLayer { int32_t iInterLayerSliceBetaOffset; //SPosOffset sScaledRefLayer; int32_t iSliceGroupChangeCycle; - + PRefPicListReorderSyn pRefPicListReordering; PPredWeightTabSyn pPredWeightTable; PRefPicMarking pRefPicMarking; // Decoded reference picture marking syntaxs diff --git a/codec/decoder/core/inc/wels_common_basis.h b/codec/decoder/core/inc/wels_common_basis.h index b8b4f8a1..c8b860d2 100644 --- a/codec/decoder/core/inc/wels_common_basis.h +++ b/codec/decoder/core/inc/wels_common_basis.h @@ -231,7 +231,7 @@ static const SI4PredInfo g_ksI4PredInfo[9] = { { I4_PRED_HU, 1, 0, 0}, }; -static const uint8_t g_kuiI16CbpTable[6] = {0, 16, 32, 15, 31, 47}; +static const uint8_t g_kuiI16CbpTable[6] = {0, 16, 32, 15, 31, 47}; typedef struct TagPartMbInfo { diff --git a/codec/encoder/core/inc/rc.h b/codec/encoder/core/inc/rc.h index 6f3f85a7..5bcc8ced 100644 --- a/codec/encoder/core/inc/rc.h +++ b/codec/encoder/core/inc/rc.h @@ -211,7 +211,7 @@ int32_t iFrameCodedInVGop; int32_t iSkipFrameInVGop; int32_t iGopNumberInVGop; int32_t iGopIndexInVGop; - + int32_t iSkipQpValue; int32_t iQpRangeUpperInFrame; int32_t iQpRangeLowerInFrame; diff --git a/test/build/android/src/com/cisco/codec/unittest/MainActivity.java b/test/build/android/src/com/cisco/codec/unittest/MainActivity.java index 4bc8d9c4..a7fb6f20 100644 --- a/test/build/android/src/com/cisco/codec/unittest/MainActivity.java +++ b/test/build/android/src/com/cisco/codec/unittest/MainActivity.java @@ -12,71 +12,68 @@ import android.os.Process; public class MainActivity extends Activity { - private TextView mStatusView; + private TextView mStatusView; - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); + @Override + protected void onCreate (Bundle savedInstanceState) { + super.onCreate (savedInstanceState); + setContentView (R.layout.activity_main); - mStatusView = (TextView)findViewById(R.id.status_view); + mStatusView = (TextView)findViewById (R.id.status_view); - runUnitTest(); + runUnitTest(); - } + } - @Override - public void onDestroy() - { - super.onDestroy(); - Log.i("codec_unittest","OnDestroy"); - Process.killProcess(Process.myPid()); - } + @Override + public void onDestroy() { + super.onDestroy(); + Log.i ("codec_unittest", "OnDestroy"); + Process.killProcess (Process.myPid()); + } - public void runUnitTest() - { - Thread thread = new Thread() { + public void runUnitTest() { + Thread thread = new Thread() { - public void run() - { - Log.i("codec_unittest","codec unittest begin"); - CharSequence text = "Running..."; - if(mStatusView !=null) - { - mStatusView.setText(text); - } + public void run() { + Log.i ("codec_unittest", "codec unittest begin"); + CharSequence text = "Running..."; + if (mStatusView != null) { + mStatusView.setText (text); + } -// String path = getIntent().getStringExtra("path"); -// if (path.length() <=0) -// { -// path = "/sdcard/codec_unittest.xml"; -// } - String path = "/sdcard/codec_unittest.xml"; - Log.i("codec_unittest","codec unittest runing @"+path); - DoUnittest("/sdcard", path); - Log.i("codec_unittest","codec unittest end"); - finish(); - } +// String path = getIntent().getStringExtra("path"); +// if (path.length() <=0) +// { +// path = "/sdcard/codec_unittest.xml"; +// } + String path = "/sdcard/codec_unittest.xml"; + Log.i ("codec_unittest", "codec unittest runing @" + path); + DoUnittest ("/sdcard", path); + Log.i ("codec_unittest", "codec unittest end"); + finish(); + } - }; - thread.start(); - } + }; + thread.start(); + } - static{ - try{ - System.loadLibrary("stlport_shared"); - //System.loadLibrary("openh264"); - System.loadLibrary("ut"); - System.loadLibrary("utDemo"); + static { + try { + System.loadLibrary ("stlport_shared"); + //System.loadLibrary("openh264"); + System.loadLibrary ("ut"); + System.loadLibrary ("utDemo"); - } - catch(Exception e){Log.v("codec_unittest","Load library failed");} + } catch (Exception e) { + Log.v ("codec_unittest", "Load library failed"); + } - } + } - public native void DoUnittest(String directory, String path); + public native void DoUnittest (String directory, String path); } diff --git a/test/encoder_binary_comparison/Scripts/run_BinarySHA1Comparison.sh b/test/encoder_binary_comparison/Scripts/run_BinarySHA1Comparison.sh index 23a178de..d337ef38 100755 --- a/test/encoder_binary_comparison/Scripts/run_BinarySHA1Comparison.sh +++ b/test/encoder_binary_comparison/Scripts/run_BinarySHA1Comparison.sh @@ -56,25 +56,25 @@ runGlobalVariableDef() runEncoderCommandInital() { aEncoderCommandSet=( -utype -frms -numl -numtl \ - -sw -sh "-dw 0" "-dh 0" "-dw 1" "-dh 1" "-dw 2" "-dh 2" "-dw 3" "-dh 3" \ - "-frout 0" "-frout 1" "-frout 2" "-frout 3" \ - "-lqp 0" "-lqp 1" "-lqp 2" "-lqp 3" \ - -rc -tarb "-ltarb 0" "-ltarb 1" "-ltarb 2" "-ltarb 3" \ - "-slcmd 0" "-slcnum 0" "-slcmd 1" "-slcnum 1"\ - "-slcmd 2" "-slcnum 2" "-slcmd 3" "-slcnum 3"\ - -nalsize \ - -iper -thread -ltr \ - -db -denois -scene -bgd -aq ) + -sw -sh "-dw 0" "-dh 0" "-dw 1" "-dh 1" "-dw 2" "-dh 2" "-dw 3" "-dh 3" \ + "-frout 0" "-frout 1" "-frout 2" "-frout 3" \ + "-lqp 0" "-lqp 1" "-lqp 2" "-lqp 3" \ + -rc -tarb "-ltarb 0" "-ltarb 1" "-ltarb 2" "-ltarb 3" \ + "-slcmd 0" "-slcnum 0" "-slcmd 1" "-slcnum 1"\ + "-slcmd 2" "-slcnum 2" "-slcmd 3" "-slcnum 3"\ + -nalsize \ + -iper -thread -ltr \ + -db -denois -scene -bgd -aq ) aEncoderCommandName=(usagetype frms numl numtl \ - sw sh dw0 dh0 dw1 dh1 dw2 dh2 dw3 dh3 \ - frout0 frout1 frout2 frout3 \ - lqp0 lqp1 lqp2 lqp3 \ - rc tarb ltarb0 ltarb1 ltarb2 ltarb3 \ - slcmd0 slcnum0 slcmd1 slcnum1 \ - slcmd2 slcnum2 slcmd3 slcnum3 \ - MaxNalSZ \ - iper thread ltr \ - db denois scene bgd aq ) + sw sh dw0 dh0 dw1 dh1 dw2 dh2 dw3 dh3 \ + frout0 frout1 frout2 frout3 \ + lqp0 lqp1 lqp2 lqp3 \ + rc tarb ltarb0 ltarb1 ltarb2 ltarb3 \ + slcmd0 slcnum0 slcmd1 slcnum1 \ + slcmd2 slcnum2 slcmd3 slcnum3 \ + MaxNalSZ \ + iper thread ltr \ + db denois scene bgd aq ) NumParameter=${#aEncoderCommandSet[@]} for ((i=0;i${AllCasePassStatusFile} echo ${HeadLine1}>${UnpassCaseFile} echo ${HeadLine2}>${UpdateSHA1TableFile} @@ -152,8 +152,8 @@ runParseCaseInfo() { if [ $# -lt 1 ] then - echo "no parameter!" - return 1 + echo "no parameter!" + return 1 fi local TempData="" local CaseData=$@ @@ -169,18 +169,18 @@ runParseCaseInfo() let "TempParamFlag=0" for((i=0; i<$NumParameter; i++)) do - for ParnmIndex in ${aTempParamIndex[@]} - do - if [ $i -eq ${ParnmIndex} ] - then - let "TempParamFlag=1" - fi - done - if [ ${TempParamFlag} -eq 0 ] - then - BitstreamPrefix=${BitstreamPrefix}_${aEncoderCommandName[$i]}_${aEncoderCommandValue[$i]} - fi - let "TempParamFlag=0" + for ParnmIndex in ${aTempParamIndex[@]} + do + if [ $i -eq ${ParnmIndex} ] + then + let "TempParamFlag=1" + fi + done + if [ ${TempParamFlag} -eq 0 ] + then + BitstreamPrefix=${BitstreamPrefix}_${aEncoderCommandName[$i]}_${aEncoderCommandValue[$i]} + fi + let "TempParamFlag=0" done BitstreamTarget=${TempDataPath}/${TestSequenceName}_${BitstreamPrefix}_codec_target.264 @@ -195,44 +195,44 @@ runEncodeOneCase() for ((i=4; i<${NumParameter}; i++)) do - ParamCommand="${ParamCommand} ${aEncoderCommandSet[$i]} ${aEncoderCommandValue[$i]} " + ParamCommand="${ParamCommand} ${aEncoderCommandSet[$i]} ${aEncoderCommandValue[$i]} " done for((i=0;i<4;i++)) do - aRecYUVFileList[$i]="${TempDataPath}/${TestYUVName}_rec${i}.yuv" + aRecYUVFileList[$i]="${TempDataPath}/${TestYUVName}_rec${i}.yuv" done ParamCommand="${aEncoderCommandSet[0]} ${aEncoderCommandValue[0]} ${aEncoderCommandSet[1]} ${aEncoderCommandValue[1]} \ - ${aEncoderCommandSet[2]} ${aEncoderCommandValue[2]} \ - -lconfig 0 layer0.cfg -lconfig 1 layer1.cfg -lconfig 2 layer2.cfg -lconfig 3 layer3.cfg \ - ${aEncoderCommandSet[3]} ${aEncoderCommandValue[3]} \ - ${ParamCommand}" + ${aEncoderCommandSet[2]} ${aEncoderCommandValue[2]} \ + -lconfig 0 layer0.cfg -lconfig 1 layer1.cfg -lconfig 2 layer2.cfg -lconfig 3 layer3.cfg \ + ${aEncoderCommandSet[3]} ${aEncoderCommandValue[3]} \ + ${ParamCommand}" echo "" echo "---------------Encode One Case-------------------------------------------" echo "case line is :" EncoderCommand="./h264enc welsenc.cfg ${ParamCommand} -bf ${BitStreamFile} \ - -drec 0 ${aRecYUVFileList[0]} -drec 1 ${aRecYUVFileList[1]} \ - -drec 2 ${aRecYUVFileList[2]} -drec 3 ${aRecYUVFileList[3]} \ - -org ${TestSequencePath}/${TestSequenceName}" + -drec 0 ${aRecYUVFileList[0]} -drec 1 ${aRecYUVFileList[1]} \ + -drec 2 ${aRecYUVFileList[2]} -drec 3 ${aRecYUVFileList[3]} \ + -org ${TestSequencePath}/${TestSequenceName}" echo ${EncoderCommand} echo -e "\n\n" ./h264enc welsenc.cfg ${ParamCommand} -bf ${BitStreamFile} \ - -drec 0 ${aRecYUVFileList[0]} -drec 1 ${aRecYUVFileList[1]} \ - -drec 2 ${aRecYUVFileList[2]} -drec 3 ${aRecYUVFileList[3]} \ - -org ${TestSequencePath}/${TestSequenceName} 2>${EncoderLogFile} + -drec 0 ${aRecYUVFileList[0]} -drec 1 ${aRecYUVFileList[1]} \ + -drec 2 ${aRecYUVFileList[2]} -drec 3 ${aRecYUVFileList[3]} \ + -org ${TestSequencePath}/${TestSequenceName} 2>${EncoderLogFile} if [ $? -eq 0 ] then - let "EncoderFlag=0" + let "EncoderFlag=0" else - let "EncoderFlag=1" + let "EncoderFlag=1" fi #delete the core down file as core down files for disk space limitation for file in ./core* do - if [ -e ${file} ] - then - ./run_SafeDelete.sh ${file} - fi + if [ -e ${file} ] + then + ./run_SafeDelete.sh ${file} + fi done return 0 }