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 @@
1#include <gtest/gtest.h>1#include <gtest/gtest.h>
2#include "macros.h"2#include "macros.h"
3#include "decode_mb_aux.h"3#include "decode_mb_aux.h"
4#include "../../codec/decoder/core/src/decode_slice.cpp"4#include "deblocking.h"
5using namespace WelsDec;5using namespace WelsDec;
6void IdctResAddPred_ref (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) {6void IdctResAddPred_ref (uint8_t* pPred, const int32_t kiStride, int16_t* pRs) {
7 int16_t iSrc[16];7 int16_t iSrc[16];
@@ -98,7 +98,7 @@ TEST(DecoderDecodeMbAux, method) \ · 90 unmodified lines
98{\98{\
99 int8_t iNonZeroCount[2][24];\99 int8_t iNonZeroCount[2][24];\
100 for(int32_t i = 0; i < 24; i++) {\100 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);\
102 }\102 }\
103 method(iNonZeroCount[0]);\103 method(iNonZeroCount[0]);\
104 SetNonZeroCount_ref(iNonZeroCount[1]);\104 SetNonZeroCount_ref(iNonZeroCount[1]);\
@@ -106,7 +106,7 @@ TEST(DecoderDecodeMbAux, method) \ · 1 unmodified line
106 ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\106 ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\
107 }\107 }\
108 for(int32_t i =0; i<24; i++) {\108 for(int32_t i =0; i<24; i++) {\
109 iNonZeroCount[0][i] = iNonZeroCount[1][i] = -128;\109 iNonZeroCount[0][i] = iNonZeroCount[1][i] = 0;\
110 }\110 }\
111 method(iNonZeroCount[0]);\111 method(iNonZeroCount[0]);\
112 SetNonZeroCount_ref(iNonZeroCount[1]);\112 SetNonZeroCount_ref(iNonZeroCount[1]);\
@@ -114,7 +114,7 @@ TEST(DecoderDecodeMbAux, method) \ · 1 unmodified line
114 ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\114 ASSERT_EQ (iNonZeroCount[0][i], iNonZeroCount[1][i]);\
115 }\115 }\
116 for(int32_t i =0; i<24; i++) {\116 for(int32_t i =0; i<24; i++) {\
117 iNonZeroCount[0][i] = iNonZeroCount[1][i] = 127;\117 iNonZeroCount[0][i] = iNonZeroCount[1][i] = 16;\
118 }\118 }\
119 method(iNonZeroCount[0]);\119 method(iNonZeroCount[0]);\
120 SetNonZeroCount_ref(iNonZeroCount[1]);\120 SetNonZeroCount_ref(iNonZeroCount[1]);\
@@ -123,12 +123,16 @@ TEST(DecoderDecodeMbAux, method) \ · 2 unmodified lines
123 }\123 }\
124}124}
125 125
126GENERATE_SETNONZEROCOUNT (SetNonZeroCount_c)126GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_c)
127
128#if defined(X86_ASM)
129GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_sse2)
130#endif
127 131
128#if defined(HAVE_NEON)132#if defined(HAVE_NEON)
129GENERATE_SETNONZEROCOUNT (SetNonZeroCount_neon)133GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_neon)
130#endif134#endif
131 135
132#if defined(HAVE_NEON_AARCH64)136#if defined(HAVE_NEON_AARCH64)
133GENERATE_SETNONZEROCOUNT (SetNonZeroCount_AArch64_neon)137GENERATE_SETNONZEROCOUNT (WelsNonZeroCount_AArch64_neon)
134#endif138#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