History

fix typedef re-define issue

lyao2 committed 12 years ago

Commit 4248cc91 parent 1c908371 file · +22 −22Browse files

Showing the changes to test/processing/ProcessUT_ScrollDetection.cpp (1 of 1 file). Show all

Unified · Split

test/processing/ProcessUT_ScrollDetection.cpp+22−22
@@ -18,33 +18,33 @@ using namespace nsWelsVP; · 17 unmodified lines
1818
1919 TEST(ScrollDetectionTest,TestScroll)
2020 {
21− uint8_t* pSrc, *pRef;
22− int32_t iWidthSets[4] = {640,1024,1280,1980};
23− int32_t iHeightSets[4] = {360,768,720,1080};
24− int32_t iStride = 0;
25− int32_t iIdx = 0;
21+ unsigned char* pSrc, *pRef;
22+ int iWidthSets[4] = {640,1024,1280,1980};
23+ int iHeightSets[4] = {360,768,720,1080};
24+ int iStride = 0;
25+ int iIdx = 0;
2626
27− for(int32_t i=0; i<4; i++){
28− int32_t iWidth = iWidthSets[i];
29− int32_t iHeight = iHeightSets[i];
27+ for(int i=0; i<4; i++){
28+ int iWidth = iWidthSets[i];
29+ int iHeight = iHeightSets[i];
3030 iStride = iWidth + 16;
31− pSrc = new uint8_t[iHeight*iStride];
31+ pSrc = new unsigned char[iHeight*iStride];
3232 ASSERT_TRUE(NULL != pSrc);
33− pRef = new uint8_t[iHeight*iStride];
33+ pRef = new unsigned char[iHeight*iStride];
3434 ASSERT_MEMORY_FAIL2X(pSrc, pRef)
3535 RandomPixelDataGenerator(pRef, iWidth, iHeight, iStride, iIdx );
3636
37− int32_t iMvRange = iHeight/3;
38− int32_t iScrollMv = rand()%(iMvRange<<1) - iMvRange;
39− uint8_t* pSrcTmp = pSrc;
40− uint8_t* pRefTmp = pRef;
37+ int iMvRange = iHeight/3;
38+ int iScrollMv = rand()%(iMvRange<<1) - iMvRange;
39+ unsigned char* pSrcTmp = pSrc;
40+ unsigned char* pRefTmp = pRef;
4141
42− for (int32_t j=0;j<iHeight;j++) {
42+ for (int j=0;j<iHeight;j++) {
4343 if ((j+iScrollMv)>=0 && (j+iScrollMv)<iHeight)
44− for (int32_t i=0;i<iWidth;i++) {
45− memcpy(pSrcTmp , &pRefTmp[(j+iScrollMv)*iStride], iWidth*sizeof(uint8_t));
44+ for (int i=0;i<iWidth;i++) {
45+ memcpy(pSrcTmp , &pRefTmp[(j+iScrollMv)*iStride], iWidth*sizeof(unsigned char));
4646 } else {
47− for (int32_t i=0;i<iWidth;i++)
47+ for (int i=0;i<iWidth;i++)
4848 pSrcTmp[i] = rand()%256;
4949 }
5050 pSrcTmp += iStride;
@@ -62,14 +62,14 @@ TEST(ScrollDetectionTest,TestScroll) · 11 unmodified lines
6262
6363 SScrollDetectionParam sScrollDetectionResult;
6464 WelsMemset (&sScrollDetectionResult, 0, sizeof (sScrollDetectionResult));
65− int32_t iCoreNum = 1;
66− uint32_t uiCPUFlag = WelsCPUFeatureDetect (&iCoreNum);
65+ int iCoreNum = 1;
66+ unsigned int uiCPUFlag = WelsCPUFeatureDetect (&iCoreNum);
6767
6868 CScrollDetection *pTest =new CScrollDetection(uiCPUFlag);
69− int32_t iMethodIdx = METHOD_SCROLL_DETECTION;
69+ int iMethodIdx = METHOD_SCROLL_DETECTION;
7070
7171 pTest->Set(iMethodIdx, (&sScrollDetectionResult));
72− int32_t ret = pTest->Process(iMethodIdx,&sSrcMap, &sRefMap);
72+ int ret = pTest->Process(iMethodIdx,&sSrcMap, &sRefMap);
7373 EXPECT_EQ(ret,0);
7474 pTest->Get(iMethodIdx, (&sScrollDetectionResult));
7575

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t