Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 7 files). Show all
Unified · Split
| @@ -842,9 +842,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 841 unmodified lines | |||
| 842 | uiCbpL = pCurLayer->pCbp[iMbXy] & 15; | 842 | uiCbpL = pCurLayer->pCbp[iMbXy] & 15; |
| 843 | } | 843 | } |
| 844 | 844 | ||
| 845 | pCtx->sBlockFunc.pWelsBlockZero16x16Func (pCurLayer->pScaledTCoeff[iMbXy], 16); | 845 | memset(pCurLayer->pScaledTCoeff[iMbXy], 0, MB_COEFF_LIST_SIZE * sizeof(int16_t)); |
| 846 | pCtx->sBlockFunc.pWelsBlockZero8x8Func (pCurLayer->pScaledTCoeff[iMbXy] + 256, 8); | ||
| 847 | pCtx->sBlockFunc.pWelsBlockZero8x8Func (pCurLayer->pScaledTCoeff[iMbXy] + 256 + 64, 8); | ||
| 848 | 846 | ||
| 849 | ST32 (&pCurLayer->pNzc[iMbXy][0], 0); | 847 | ST32 (&pCurLayer->pNzc[iMbXy][0], 0); |
| 850 | ST32 (&pCurLayer->pNzc[iMbXy][4], 0); | 848 | ST32 (&pCurLayer->pNzc[iMbXy][4], 0); |
| @@ -1043,43 +1041,15 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur) { · 192 unmodified lines | |||
| 1043 | return 0; | 1041 | return 0; |
| 1044 | } | 1042 | } |
| 1045 | 1043 | ||
| 1046 | void WelsBlockInit (int16_t* pBlock, int32_t iWidth, int32_t iHeight, int32_t iStride, uint8_t uiVal) { | ||
| 1047 | int32_t i; | ||
| 1048 | int16_t* pDst = pBlock; | ||
| 1049 | |||
| 1050 | for (i = 0; i < iHeight; i++) { | ||
| 1051 | memset (pDst, uiVal, iWidth * sizeof (int16_t)); | ||
| 1052 | pDst += iStride; | ||
| 1053 | } | ||
| 1054 | } | ||
| 1055 | |||
| 1056 | void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { | 1044 | void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) { |
| 1057 | pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_c; | ||
| 1058 | pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c; | ||
| 1059 | pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_c; | 1045 | pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_c; |
| 1060 | 1046 | ||
| 1061 | #ifdef X86_ASM | ||
| 1062 | if (iCpu & WELS_CPU_SSE2) { | ||
| 1063 | pFunc->pWelsBlockZero16x16Func = WelsResBlockZero16x16_sse2; | ||
| 1064 | pFunc->pWelsBlockZero8x8Func = WelsResBlockZero8x8_sse2; | ||
| 1065 | } | ||
| 1066 | #endif | ||
| 1067 | |||
| 1068 | #ifdef HAVE_NEON | 1047 | #ifdef HAVE_NEON |
| 1069 | if ( iCpu & WELS_CPU_NEON ) { | 1048 | if ( iCpu & WELS_CPU_NEON ) { |
| 1070 | pFunc->pWelsBlockZero16x16Func = WelsResBlockZero16x16_neon; | ||
| 1071 | pFunc->pWelsBlockZero8x8Func = WelsResBlockZero8x8_neon; | ||
| 1072 | pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_neon; | 1049 | pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_neon; |
| 1073 | } | 1050 | } |
| 1074 | #endif | 1051 | #endif |
| 1075 | } | 1052 | } |
| 1076 | void WelsBlockZero16x16_c (int16_t* pBlock, int32_t iStride) { | ||
| 1077 | WelsBlockInit (pBlock, 16, 16, iStride, 0); | ||
| 1078 | } | ||
| 1079 | |||
| 1080 | void WelsBlockZero8x8_c (int16_t* pBlock, int32_t iStride) { | ||
| 1081 | WelsBlockInit (pBlock, 8, 8, iStride, 0); | ||
| 1082 | } | ||
| 1083 | 1053 | ||
| 1084 | void SetNonZeroCount_c (int16_t* pBlock, int8_t* pNonZeroCount) { | 1054 | void SetNonZeroCount_c (int16_t* pBlock, int8_t* pNonZeroCount) { |
| 1085 | int32_t i; | 1055 | int32_t i; |