ref: 70165d684306d1ad55c7b98f917a12a6fb364141
parent: 0dbdbfb53bccb9a35fe7276254dc622adcd34409
author: huili2 <huili2@cisco.com>
date: Tue Jul 8 16:05:52 EDT 2014
astyle UT cpp files
--- a/test/encoder/EncUT_DecodeMbAux.cpp
+++ b/test/encoder/EncUT_DecodeMbAux.cpp
@@ -156,10 +156,10 @@
const int16_t iDelU = pDct[0] - pDct[2];
const int16_t iSumD = pDct[1] + pDct[3];
const int16_t iDelD = pDct[1] - pDct[3];
- pDct[0] = ((iSumU + iSumD) * iMF)>>1;
- pDct[1] = ((iSumU - iSumD) * iMF)>>1;
- pDct[2] = ((iDelU + iDelD) * iMF)>>1;
- pDct[3] = ((iDelU - iDelD) * iMF)>>1;
+ pDct[0] = ((iSumU + iSumD) * iMF) >> 1;
+ pDct[1] = ((iSumU - iSumD) * iMF) >> 1;
+ pDct[2] = ((iDelU + iDelD) * iMF) >> 1;
+ pDct[3] = ((iDelU - iDelD) * iMF) >> 1;
}
TEST (DecodeMbAuxTest, WelsDequantIHadamard2x2Dc) {
int16_t iDct[4], iRefDct[4];
--- a/test/encoder/EncUT_MemoryZero.cpp
+++ b/test/encoder/EncUT_MemoryZero.cpp
@@ -13,7 +13,7 @@
#define MEMORYZEROTEST_NUM 1000
TEST (SetMemZeroFunTest, WelsSetMemZero) {
- int32_t iLen =64;
+ int32_t iLen = 64;
int32_t iCpuCores = 0;
SWelsFuncPtrList sFuncPtrList;
uint32_t uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);
@@ -31,7 +31,7 @@
sFuncPtrList.pfSetMemZeroSize64Aligned16 = WelsSetMemZeroAligned64_sse2; // confirmed_safe_unsafe_usage
}
#endif//X86_ASM
-
+
#if defined(HAVE_NEON)
if (uiCpuFlag & WELS_CPU_NEON) {
sFuncPtrList.pfSetMemZeroSize8 = WelsSetMemZero_neon;
@@ -39,7 +39,7 @@
sFuncPtrList.pfSetMemZeroSize64 = WelsSetMemZero_neon;
}
#endif
-
+
#if defined(HAVE_NEON_AARCH64)
if (uiCpuFlag & WELS_CPU_NEON) {
sFuncPtrList.pfSetMemZeroSize8 = WelsSetMemZero_AArch64_neon;
@@ -47,46 +47,46 @@
sFuncPtrList.pfSetMemZeroSize64 = WelsSetMemZero_AArch64_neon;
}
#endif
-
- ENFORCE_STACK_ALIGN_2D (uint8_t, pInputAlign, 2, 64*101, 16)
-
+
+ ENFORCE_STACK_ALIGN_2D (uint8_t, pInputAlign, 2, 64 * 101, 16)
+
for (int32_t k = 0; k < MEMORYZEROTEST_NUM; k++) {
- memset(pInputAlign[0], 255, 64*101);
- memset(pInputAlign[1], 255, 64*101);
- iLen = 64*(1+(rand()%100));
- WelsSetMemZero_c(pInputAlign[0],iLen);
- sFuncPtrList.pfSetMemZeroSize64Aligned16(pInputAlign[1],iLen);
- for (int32_t i = 0 ; i < 64*101; i++) {
- ASSERT_EQ (pInputAlign[0][i], pInputAlign[1][i]);
+ memset (pInputAlign[0], 255, 64 * 101);
+ memset (pInputAlign[1], 255, 64 * 101);
+ iLen = 64 * (1 + (rand() % 100));
+ WelsSetMemZero_c (pInputAlign[0], iLen);
+ sFuncPtrList.pfSetMemZeroSize64Aligned16 (pInputAlign[1], iLen);
+ for (int32_t i = 0 ; i < 64 * 101; i++) {
+ ASSERT_EQ (pInputAlign[0][i], pInputAlign[1][i]);
}
}
for (int32_t k = 0; k < MEMORYZEROTEST_NUM; k++) {
- memset(pInputAlign[0], 255, 64*101);
- memset(pInputAlign[1], 255, 64*101);
- iLen = 64*(1+(rand()%100));
- WelsSetMemZero_c(pInputAlign[0]+1,iLen);
- sFuncPtrList.pfSetMemZeroSize64(pInputAlign[1]+1,iLen);
- for (int32_t i = 0 ; i < 64*101; i++) {
+ memset (pInputAlign[0], 255, 64 * 101);
+ memset (pInputAlign[1], 255, 64 * 101);
+ iLen = 64 * (1 + (rand() % 100));
+ WelsSetMemZero_c (pInputAlign[0] + 1, iLen);
+ sFuncPtrList.pfSetMemZeroSize64 (pInputAlign[1] + 1, iLen);
+ for (int32_t i = 0 ; i < 64 * 101; i++) {
ASSERT_EQ (pInputAlign[0][i], pInputAlign[1][i]);
}
}
- memset(pInputAlign[0], 255, 64*101);
- memset(pInputAlign[1], 255, 64*101);
+ memset (pInputAlign[0], 255, 64 * 101);
+ memset (pInputAlign[1], 255, 64 * 101);
iLen = 32;
- WelsSetMemZero_c(pInputAlign[0]+1,iLen);
- sFuncPtrList.pfSetMemZeroSize8(pInputAlign[1]+1,iLen);
- for (int32_t i = 0 ; i < 64*101; i++) {
+ WelsSetMemZero_c (pInputAlign[0] + 1, iLen);
+ sFuncPtrList.pfSetMemZeroSize8 (pInputAlign[1] + 1, iLen);
+ for (int32_t i = 0 ; i < 64 * 101; i++) {
ASSERT_EQ (pInputAlign[0][i], pInputAlign[1][i]);
}
- memset(pInputAlign[0], 255, 64*101);
- memset(pInputAlign[1], 255, 64*101);
+ memset (pInputAlign[0], 255, 64 * 101);
+ memset (pInputAlign[1], 255, 64 * 101);
iLen = 24;
- WelsSetMemZero_c(pInputAlign[0]+1,iLen);
- sFuncPtrList.pfSetMemZeroSize8(pInputAlign[1]+1,iLen);
- for (int32_t i = 0 ; i < 64*101; i++) {
+ WelsSetMemZero_c (pInputAlign[0] + 1, iLen);
+ sFuncPtrList.pfSetMemZeroSize8 (pInputAlign[1] + 1, iLen);
+ for (int32_t i = 0 ; i < 64 * 101; i++) {
ASSERT_EQ (pInputAlign[0][i], pInputAlign[1][i]);
}
}