History

rephrase blockzero function complexity and remove useless functions

wayne liu committed 12 years ago

Commit 06c534d1 parent c247c5a7 files · +1 −280Browse files

Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 7 files). Show all

Unified · Split

codec/decoder/core/src/decode_slice.cpp+1−31
@@ -842,9 +842,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 841 unmodified lines
842842 uiCbpL = pCurLayer->pCbp[iMbXy] & 15;
843843 }
844844
845− pCtx->sBlockFunc.pWelsBlockZero16x16Func (pCurLayer->pScaledTCoeff[iMbXy], 16);
846− pCtx->sBlockFunc.pWelsBlockZero8x8Func (pCurLayer->pScaledTCoeff[iMbXy] + 256, 8);
847− pCtx->sBlockFunc.pWelsBlockZero8x8Func (pCurLayer->pScaledTCoeff[iMbXy] + 256 + 64, 8);
845+ memset(pCurLayer->pScaledTCoeff[iMbXy], 0, MB_COEFF_LIST_SIZE * sizeof(int16_t));
848846
849847 ST32 (&pCurLayer->pNzc[iMbXy][0], 0);
850848 ST32 (&pCurLayer->pNzc[iMbXy][4], 0);
@@ -1043,43 +1041,15 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur) { · 192 unmodified lines
10431041 return 0;
10441042 }
10451043
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−
10561044 void WelsBlockFuncInit (SBlockFunc* pFunc, int32_t iCpu) {
1057− pFunc->pWelsBlockZero16x16Func = WelsBlockZero16x16_c;
1058− pFunc->pWelsBlockZero8x8Func = WelsBlockZero8x8_c;
10591045 pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_c;
10601046
1061−#ifdef X86_ASM
1062− if (iCpu & WELS_CPU_SSE2) {
1063− pFunc->pWelsBlockZero16x16Func = WelsResBlockZero16x16_sse2;
1064− pFunc->pWelsBlockZero8x8Func = WelsResBlockZero8x8_sse2;
1065− }
1066−#endif
1067−
10681047 #ifdef HAVE_NEON
10691048 if ( iCpu & WELS_CPU_NEON ) {
1070− pFunc->pWelsBlockZero16x16Func = WelsResBlockZero16x16_neon;
1071− pFunc->pWelsBlockZero8x8Func = WelsResBlockZero8x8_neon;
10721049 pFunc->pWelsSetNonZeroCountFunc = SetNonZeroCount_neon;
10731050 }
10741051 #endif
10751052 }
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−}
10831053
10841054 void SetNonZeroCount_c (int16_t* pBlock, int8_t* pNonZeroCount) {
10851055 int32_t i;

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