Add asm code for NoneZeroCount and refine related code

This commit is contained in:
zhiliang wang
2015-01-04 16:39:17 +08:00
parent 7d5e88ffda
commit 01b74ea7c1
12 changed files with 56 additions and 91 deletions

View File

@@ -774,13 +774,6 @@ void PerformDeblockingFilter (sWelsEncCtx* pEnc) {
}
}
void WelsNonZeroCount_c (int8_t* pNonZeroCount) {
int32_t i;
for (i = 0; i < 24; i++) {
pNonZeroCount[i] = !!pNonZeroCount[i];
}
}
void WelsBlockFuncInit (PSetNoneZeroCountZeroFunc* pfSetNZCZero, int32_t iCpu) {
*pfSetNZCZero = WelsNonZeroCount_c;
#ifdef HAVE_NEON
@@ -793,6 +786,11 @@ void WelsBlockFuncInit (PSetNoneZeroCountZeroFunc* pfSetNZCZero, int32_t iCpu)
*pfSetNZCZero = WelsNonZeroCount_AArch64_neon;
}
#endif
#if defined(X86_ASM)
if (iCpu & WELS_CPU_SSE2) {
*pfSetNZCZero = WelsNonZeroCount_sse2;
}
#endif
}
void DeblockingInit (DeblockingFunc* pFunc, int32_t iCpu) {