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 codec/decoder/core/src/decode_slice.cpp (1 of 12 files). Show all

Unified · Split

codec/decoder/core/src/decode_slice.cpp+6−24
@@ -1690,25 +1690,13 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 1689 unmodified lines
16901690 }
16911691
16921692 void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) {
1693− pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_c;
1694−
1695−#ifdef HAVE_NEON
1696− if (iCpu & WELS_CPU_NEON) {
1697− pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_neon;
1698− }
1699−#endif
1700−
1701−#ifdef HAVE_NEON_AARCH64
1702− if (iCpu & WELS_CPU_NEON) {
1703− pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_AArch64_neon;
1704− }
1705−#endif
1706−
1693+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_c;
17071694 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_c;
1708− pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c;
1709− //TO DO add neon and X86
1695+ pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c;
1696+
17101697 #ifdef HAVE_NEON
17111698 if (iCpu & WELS_CPU_NEON) {
1699+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_neon;
17121700 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_neon;
17131701 pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_neon;
17141702 }
@@ -1716,6 +1704,7 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line
17161704
17171705 #ifdef HAVE_NEON_AARCH64
17181706 if (iCpu & WELS_CPU_NEON) {
1707+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_AArch64_neon;
17191708 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_AArch64_neon;
17201709 pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_AArch64_neon;
17211710 }
@@ -1723,6 +1712,7 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line
17231712
17241713 #if defined(X86_ASM)
17251714 if (iCpu & WELS_CPU_SSE2) {
1715+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_sse2;
17261716 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_sse2;
17271717 pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_sse2;
17281718 }
@@ -1730,14 +1720,6 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line
17301720
17311721 }
17321722
1733−void SetNonZeroCount_c (int8_t* pNonZeroCount) {
1734− int32_t i;
1735−
1736− for (i = 0; i < 24; i++) {
1737− pNonZeroCount[i] = !!pNonZeroCount[i];
1738− }
1739−}
1740−
17411723 void WelsBlockInit (int16_t* pBlock, int iW, int iH, int iStride, uint8_t uiVal) {
17421724 int32_t i;
17431725 int16_t* pDst = pBlock;

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