ref: faf1bdde0f9ef9f5c86058521ac84c04ac406c54
parent: 81df4c69728c8ada96ab1cdb4a73d29b384f1ded
parent: b1570b17be3f6bf3cde8276af155f4a1988f9fb9
author: huili2 <huili2@cisco.com>
date: Tue Apr 28 04:47:04 EDT 2015
Merge pull request #1913 from mstorsjo/style-cleanup Clean up trailing whitespace, astyle a new file, clean up mixed spaces/tabs indentation
--- a/autotest/performanceTest/parsePerfData.sh
+++ b/autotest/performanceTest/parsePerfData.sh
@@ -4,20 +4,20 @@
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
@@ -24,10 +24,10 @@
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 @@
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 @@
fi
fi
- done <${PerformanceLogFile}
+ done <${PerformanceLogFile}
}
--- a/autotest/unitTest/run_unitTest.sh
+++ b/autotest/unitTest/run_unitTest.sh
@@ -19,7 +19,7 @@
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}" = "#" ]
--- 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`
--- a/codec/decoder/core/inc/dec_frame.h
+++ b/codec/decoder/core/inc/dec_frame.h
@@ -105,7 +105,7 @@
int32_t iInterLayerSliceBetaOffset;
//SPosOffset sScaledRefLayer;
int32_t iSliceGroupChangeCycle;
-
+
PRefPicListReorderSyn pRefPicListReordering;
PPredWeightTabSyn pPredWeightTable;
PRefPicMarking pRefPicMarking; // Decoded reference picture marking syntaxs
--- a/codec/decoder/core/inc/wels_common_basis.h
+++ b/codec/decoder/core/inc/wels_common_basis.h
@@ -231,7 +231,7 @@
{ 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 {
--- a/codec/encoder/core/inc/rc.h
+++ b/codec/encoder/core/inc/rc.h
@@ -211,7 +211,7 @@
int32_t iSkipFrameInVGop;
int32_t iGopNumberInVGop;
int32_t iGopIndexInVGop;
-
+
int32_t iSkipQpValue;
int32_t iQpRangeUpperInFrame;
int32_t iQpRangeLowerInFrame;
--- 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 @@
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);
}
--- a/test/encoder_binary_comparison/Scripts/run_BinarySHA1Comparison.sh
+++ b/test/encoder_binary_comparison/Scripts/run_BinarySHA1Comparison.sh
@@ -56,25 +56,25 @@
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<NumParameter; i++))
do
@@ -103,27 +103,27 @@
UpdateSHA1TableFile="${FinalResultPath}/${TestSequenceName}_UpdateSHA1Table.csv"
HeadLine1="BitMatched Status, SHA-1-Target, SHA-1-Benchmark, MD5-Target, MD5-Benchmark,\
Bitstream-Target,Bitstream-Benchmark,YUV-Target,YUV-Benchmark,\
- -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, "
+ -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, "
HeadLine2="SHA-1 Value, MD5String, BitStreamSize, YUVSize, \
- -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 "
+ -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 "
echo ${HeadLine1}>${AllCasePassStatusFile}
echo ${HeadLine1}>${UnpassCaseFile}
echo ${HeadLine2}>${UpdateSHA1TableFile}
@@ -152,8 +152,8 @@
{
if [ $# -lt 1 ]
then
- echo "no parameter!"
- return 1
+ echo "no parameter!"
+ return 1
fi
local TempData=""
local CaseData=$@
@@ -169,18 +169,18 @@
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 @@
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
}