History

Add asm code for NoneZeroCount and refine related code

zhiliang wang committed 11 years ago

Commit 01b74ea1 parent 7d5e88f12 files · +56 −91Browse files

Showing the changes to test/decoder/DecUT_IdctResAddPred.cpp (1 of 12 files). Show all

Unified · Split

test/decoder/DecUT_IdctResAddPred.cpp+11−7
@@ -1,7 +1,7 @@
11 #include <gtest/gtest.h>
22 #include "macros.h"
33 #include "decode_mb_aux.h"
4−#include "../../codec/decoder/core/src/decode_slice.cpp"
4+#include "deblocking.h"
55 using namespace WelsDec;
66 void IdctResAddPred_ref (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) {
77 int16_t iSrc[16];
@@ -98,7 +98,7 @@ TEST(DecoderDecodeMbAux, method) \ · 90 unmodified lines
9898 {\
9999 int8_t iNonZeroCount[2][24];\
100100 for(int32_t i = 0; i < 24; i++) {\
101− iNonZeroCount[0][i] = iNonZeroCount[1][i] = (rand() % 256)-128;\
101+ iNonZeroCount[0][i] = iNonZeroCount[1][i] = (rand() % 25);\
102102 }\
103103 method(iNonZeroCount[0]);\
104104 SetNonZeroCount_ref(iNonZeroCount[1]);\
@@ -106,7 +106,7 @@ TEST(DecoderDecodeMbAux, method) \ · 1 unmodified line
106106 ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\
107107 }\
108108 for(int32_t i =0; i<24; i++) {\
109− iNonZeroCount[0][i] = iNonZeroCount[1][i] = -128;\
109+ iNonZeroCount[0][i] = iNonZeroCount[1][i] = 0;\
110110 }\
111111 method(iNonZeroCount[0]);\
112112 SetNonZeroCount_ref(iNonZeroCount[1]);\
@@ -114,7 +114,7 @@ TEST(DecoderDecodeMbAux, method) \ · 1 unmodified line
114114 ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\
115115 }\
116116 for(int32_t i =0; i<24; i++) {\
117− iNonZeroCount[0][i] = iNonZeroCount[1][i] = 127;\
117+ iNonZeroCount[0][i] = iNonZeroCount[1][i] = 16;\
118118 }\
119119 method(iNonZeroCount[0]);\
120120 SetNonZeroCount_ref(iNonZeroCount[1]);\
@@ -123,12 +123,16 @@ TEST(DecoderDecodeMbAux, method) \ · 2 unmodified lines
123123 }\
124124 }
125125
126−GENERATE_SETNONZEROCOUNT (SetNonZeroCount_c)
126+GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_c)
127+
128+#if defined(X86_ASM)
129+GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_sse2)
130+#endif
127131
128132 #if defined(HAVE_NEON)
129−GENERATE_SETNONZEROCOUNT (SetNonZeroCount_neon)
133+GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_neon)
130134 #endif
131135
132136 #if defined(HAVE_NEON_AARCH64)
133−GENERATE_SETNONZEROCOUNT (SetNonZeroCount_AArch64_neon)
137+GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_AArch64_neon)
134138 #endif

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