History

Fix compiler warnings and remove dead code

Fix several -Werror=unused-variable and -Werror=unused-but-set-variable and removed dead code found with this warnings

Andoni Morales Alastruey committed 12 years ago

Commit ae60f1b1 parent 703c69d10 files · +1 −79Browse files

Showing the changes to codec/processing/src/complexityanalysis (1 of 10 files). Show all

Unified · Split

codec/processing/src/complexityanalysis/ComplexityAnalysis.cpp+0−32
@@ -178,7 +178,6 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 177 unmodified lines
178178
179179 int32_t iGomMbStartIndex = 0, iGomMbEndIndex = 0, iGomMbRowNum = 0;
180180 int32_t iMbStartIndex = 0, iMbEndIndex = 0;
181− int32_t iStartSampleIndex = 0;
182181
183182 uint8_t* pBackgroundMbFlag = (uint8_t*)m_sComplexityAnalysisParam.pBackgroundMbFlag;
184183 uint32_t* uiRefMbType = (uint32_t*)m_sComplexityAnalysisParam.uiRefMbType;
@@ -186,18 +185,9 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 1 unmodified line
186185 int32_t* pGomForegroundBlockNum = (int32_t*)m_sComplexityAnalysisParam.pGomForegroundBlockNum;
187186 int32_t* pGomComplexity = (int32_t*)m_sComplexityAnalysisParam.pGomComplexity;
188187
189− uint8_t* pRefY = NULL, *pSrcY = NULL;
190− int32_t iRefStride = 0, iCurStride = 0;
191188
192− uint8_t* pRefTmp = NULL, *pCurTmp = NULL;
193189 uint32_t uiGomSad = 0, uiFrameSad = 0;
194190
195− pRefY = (uint8_t*)pRefPixMap->pPixel[0];
196− pSrcY = (uint8_t*)pSrcPixMap->pPixel[0];
197−
198− iRefStride = pRefPixMap->iStride[0];
199− iCurStride = pSrcPixMap->iStride[0];
200−
201191 InitGomSadFunc (m_pfGomSad, m_sComplexityAnalysisParam.iCalcBgd);
202192
203193 for (int32_t j = 0; j < iGomMbNum; j ++) {
@@ -210,13 +200,7 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 6 unmodified lines
210200 iMbStartIndex = iGomMbStartIndex;
211201 iMbEndIndex = WELS_MIN ((iMbStartIndex / iMbWidth + 1) * iMbWidth, iGomMbEndIndex);
212202
213− iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iRefStride + (iMbStartIndex % iMbWidth) *
214− MB_WIDTH_LUMA;
215−
216203 do {
217− pRefTmp = pRefY + iStartSampleIndex;
218− pCurTmp = pSrcY + iStartSampleIndex;
219−
220204 for (int32_t i = iMbStartIndex; i < iMbEndIndex; i ++) {
221205 m_pfGomSad (&uiGomSad, pGomForegroundBlockNum + j, pVaaCalcResults->pSad8x8[i], pBackgroundMbFlag[i]
222206 && !IS_INTRA (uiRefMbType[i]));
@@ -225,9 +209,6 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 2 unmodified lines
225209 iMbStartIndex = iMbEndIndex;
226210 iMbEndIndex = WELS_MIN (iMbEndIndex + iMbWidth , iGomMbEndIndex);
227211
228− iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iRefStride + (iMbStartIndex % iMbWidth) *
229− MB_WIDTH_LUMA;
230−
231212 } while (--iGomMbRowNum);
232213
233214 pGomComplexity[j] = uiGomSad;
@@ -251,20 +232,13 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 17 unmodified lines
251232
252233 int32_t iGomMbStartIndex = 0, iGomMbEndIndex = 0, iGomMbRowNum = 0;
253234 int32_t iMbStartIndex = 0, iMbEndIndex = 0;
254− int32_t iStartSampleIndex = 0;
255235
256236 SVAACalcResult* pVaaCalcResults = m_sComplexityAnalysisParam.pCalcResult;
257237 int32_t* pGomComplexity = (int32_t*)m_sComplexityAnalysisParam.pGomComplexity;
258238
259− uint8_t* pSrcY = NULL;
260− int32_t iCurStride = 0;
261239
262− uint8_t* pCurTmp = NULL;
263240 uint32_t uiSampleSum = 0, uiSquareSum = 0;
264241
265− pSrcY = (uint8_t*)pSrcPixMap->pPixel[0];
266− iCurStride = pSrcPixMap->iStride[0];
267−
268242 for (int32_t j = 0; j < iGomMbNum; j ++) {
269243 uiSampleSum = 0;
270244 uiSquareSum = 0;
@@ -276,13 +250,9 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 5 unmodified lines
276250 iMbStartIndex = iGomMbStartIndex;
277251 iMbEndIndex = WELS_MIN ((iMbStartIndex / iMbWidth + 1) * iMbWidth, iGomMbEndIndex);
278252
279− iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iCurStride + (iMbStartIndex % iMbWidth) *
280− MB_WIDTH_LUMA;
281253 iGomSampleNum = (iMbEndIndex - iMbStartIndex) * MB_WIDTH_LUMA * MB_WIDTH_LUMA;
282254
283255 do {
284− pCurTmp = pSrcY + iStartSampleIndex;
285−
286256 for (int32_t i = iMbStartIndex; i < iMbEndIndex; i ++) {
287257 uiSampleSum += pVaaCalcResults->pSum16x16[i];
288258 uiSquareSum += pVaaCalcResults->pSumOfSquare16x16[i];
@@ -291,8 +261,6 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 2 unmodified lines
291261 iMbStartIndex = iMbEndIndex;
292262 iMbEndIndex = WELS_MIN (iMbEndIndex + iMbWidth, iGomMbEndIndex);
293263
294− iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iCurStride + (iMbStartIndex % iMbWidth) *
295− MB_WIDTH_LUMA;
296264 } while (--iGomMbRowNum);
297265
298266 pGomComplexity[j] = uiSquareSum - (uiSampleSum * uiSampleSum / iGomSampleNum);

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