Showing the changes to codec/decoder/core/src (1 of 12 files). Show all
Unified · Split
| @@ -1690,25 +1690,13 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 1689 unmodified lines | |||
| 1690 | } | 1690 | } |
| 1691 | 1691 | ||
| 1692 | void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { | 1692 | void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { |
| 1693 | pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_c; | 1693 | pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_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 | |||
| 1707 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_c; | 1694 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_c; |
| 1708 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c; | 1695 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c; |
| 1709 | //TO DO add neon and X86 | 1696 | |
| 1710 | #ifdef HAVE_NEON | 1697 | #ifdef HAVE_NEON |
| 1711 | if (iCpu & WELS_CPU_NEON) { | 1698 | if (iCpu & WELS_CPU_NEON) { |
| 1699 | pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_neon; | ||
| 1712 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_neon; | 1700 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_neon; |
| 1713 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_neon; | 1701 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_neon; |
| 1714 | } | 1702 | } |
| @@ -1716,6 +1704,7 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line | |||
| 1716 | 1704 | ||
| 1717 | #ifdef HAVE_NEON_AARCH64 | 1705 | #ifdef HAVE_NEON_AARCH64 |
| 1718 | if (iCpu & WELS_CPU_NEON) { | 1706 | if (iCpu & WELS_CPU_NEON) { |
| 1707 | pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_AArch64_neon; | ||
| 1719 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_AArch64_neon; | 1708 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_AArch64_neon; |
| 1720 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_AArch64_neon; | 1709 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_AArch64_neon; |
| 1721 | } | 1710 | } |
| @@ -1723,6 +1712,7 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line | |||
| 1723 | 1712 | ||
| 1724 | #if defined(X86_ASM) | 1713 | #if defined(X86_ASM) |
| 1725 | if (iCpu & WELS_CPU_SSE2) { | 1714 | if (iCpu & WELS_CPU_SSE2) { |
| 1715 | pFunc->pWelsSetNonZeroCountFunc = WelsNonZeroCount_sse2; | ||
| 1726 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_sse2; | 1716 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_sse2; |
| 1727 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_sse2; | 1717 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_sse2; |
| 1728 | } | 1718 | } |
| @@ -1730,14 +1720,6 @@ void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { · 1 unmodified line | |||
| 1730 | 1720 | ||
| 1731 | } | 1721 | } |
| 1732 | 1722 | ||
| 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 | |||
| 1741 | void WelsBlockInit (int16_t* pBlock, int iW, int iH, int iStride, uint8_t uiVal) { | 1723 | void WelsBlockInit (int16_t* pBlock, int iW, int iH, int iStride, uint8_t uiVal) { |
| 1742 | int32_t i; | 1724 | int32_t i; |
| 1743 | int16_t* pDst = pBlock; | 1725 | int16_t* pDst = pBlock; |