History

Merge pull request #1694 from zhilwang/asm-SetNoneZero

Add asm code for NoneZeroCount and refine related code

huili2 committed 11 years ago

Commit ac08cc42 parents 9a89ee7 01b74ea12 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
@@ -1695,25 +1695,13 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 1694 unmodified lines
16951695 }
16961696
16971697 void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) {
1698− pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_c;
1699−
1700−#ifdef HAVE_NEON
1701− if (iCpu & WELS_CPU_NEON) {
1702− pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_neon;
1703− }
1704−#endif
1705−
1706−#ifdef HAVE_NEON_AARCH64
1707− if (iCpu & WELS_CPU_NEON) {
1708− pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_AArch64_neon;
1709− }
1710−#endif
1711−
1698+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_c;
17121699 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_c;
1713− pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c;
1714− //TO DO add neon and X86
1700+ pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c;
1701+
17151702 #ifdef HAVE_NEON
17161703 if (iCpu & WELS_CPU_NEON) {
1704+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_neon;
17171705 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_neon;
17181706 pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_neon;
17191707 }
@@ -1721,6 +1709,7 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line
17211709
17221710 #ifdef HAVE_NEON_AARCH64
17231711 if (iCpu & WELS_CPU_NEON) {
1712+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_AArch64_neon;
17241713 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_AArch64_neon;
17251714 pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_AArch64_neon;
17261715 }
@@ -1728,6 +1717,7 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line
17281717
17291718 #if defined(X86_ASM)
17301719 if (iCpu & WELS_CPU_SSE2) {
1720+ pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_sse2;
17311721 pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_sse2;
17321722 pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_sse2;
17331723 }
@@ -1735,14 +1725,6 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line
17351725
17361726 }
17371727
1738−void SetNonZeroCount_c (int8_t* pNonZeroCount) {
1739− int32_t i;
1740−
1741− for (i = 0; i < 24; i++) {
1742− pNonZeroCount[i] = !!pNonZeroCount[i];
1743− }
1744−}
1745−
17461728 void WelsBlockInit (int16_t* pBlock, int iW, int iH, int iStride, uint8_t uiVal) {
17471729 int32_t i;
17481730 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