Fix several -Werror=unused-variable and -Werror=unused-but-set-variable and removed dead code found with this warnings
Showing the changes to codec/processing/src/complexityanalysis (1 of 10 files). Show all
Unified · Split
| @@ -178,7 +178,6 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 177 unmodified lines | ||
| 178 | 178 | |
| 179 | 179 | int32_t iGomMbStartIndex = 0, iGomMbEndIndex = 0, iGomMbRowNum = 0; |
| 180 | 180 | int32_t iMbStartIndex = 0, iMbEndIndex = 0; |
| 181 | − int32_t iStartSampleIndex = 0; | |
| 182 | 181 | |
| 183 | 182 | uint8_t* pBackgroundMbFlag = (uint8_t*)m_sComplexityAnalysisParam.pBackgroundMbFlag; |
| 184 | 183 | uint32_t* uiRefMbType = (uint32_t*)m_sComplexityAnalysisParam.uiRefMbType; |
| @@ -186,18 +185,9 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 1 unmodified line | ||
| 186 | 185 | int32_t* pGomForegroundBlockNum = (int32_t*)m_sComplexityAnalysisParam.pGomForegroundBlockNum; |
| 187 | 186 | int32_t* pGomComplexity = (int32_t*)m_sComplexityAnalysisParam.pGomComplexity; |
| 188 | 187 | |
| 189 | − uint8_t* pRefY = NULL, *pSrcY = NULL; | |
| 190 | − int32_t iRefStride = 0, iCurStride = 0; | |
| 191 | 188 | |
| 192 | − uint8_t* pRefTmp = NULL, *pCurTmp = NULL; | |
| 193 | 189 | uint32_t uiGomSad = 0, uiFrameSad = 0; |
| 194 | 190 | |
| 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 | − | |
| 201 | 191 | InitGomSadFunc (m_pfGomSad, m_sComplexityAnalysisParam.iCalcBgd); |
| 202 | 192 | |
| 203 | 193 | for (int32_t j = 0; j < iGomMbNum; j ++) { |
| @@ -210,13 +200,7 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 6 unmodified lines | ||
| 210 | 200 | iMbStartIndex = iGomMbStartIndex; |
| 211 | 201 | iMbEndIndex = WELS_MIN ((iMbStartIndex / iMbWidth + 1) * iMbWidth, iGomMbEndIndex); |
| 212 | 202 | |
| 213 | − iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iRefStride + (iMbStartIndex % iMbWidth) * | |
| 214 | − MB_WIDTH_LUMA; | |
| 215 | − | |
| 216 | 203 | do { |
| 217 | − pRefTmp = pRefY + iStartSampleIndex; | |
| 218 | − pCurTmp = pSrcY + iStartSampleIndex; | |
| 219 | − | |
| 220 | 204 | for (int32_t i = iMbStartIndex; i < iMbEndIndex; i ++) { |
| 221 | 205 | m_pfGomSad (&uiGomSad, pGomForegroundBlockNum + j, pVaaCalcResults->pSad8x8[i], pBackgroundMbFlag[i] |
| 222 | 206 | && !IS_INTRA (uiRefMbType[i])); |
| @@ -225,9 +209,6 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 2 unmodified lines | ||
| 225 | 209 | iMbStartIndex = iMbEndIndex; |
| 226 | 210 | iMbEndIndex = WELS_MIN (iMbEndIndex + iMbWidth , iGomMbEndIndex); |
| 227 | 211 | |
| 228 | − iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iRefStride + (iMbStartIndex % iMbWidth) * | |
| 229 | − MB_WIDTH_LUMA; | |
| 230 | − | |
| 231 | 212 | } while (--iGomMbRowNum); |
| 232 | 213 | |
| 233 | 214 | pGomComplexity[j] = uiGomSad; |
| @@ -251,20 +232,13 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 17 unmodified lines | ||
| 251 | 232 | |
| 252 | 233 | int32_t iGomMbStartIndex = 0, iGomMbEndIndex = 0, iGomMbRowNum = 0; |
| 253 | 234 | int32_t iMbStartIndex = 0, iMbEndIndex = 0; |
| 254 | − int32_t iStartSampleIndex = 0; | |
| 255 | 235 | |
| 256 | 236 | SVAACalcResult* pVaaCalcResults = m_sComplexityAnalysisParam.pCalcResult; |
| 257 | 237 | int32_t* pGomComplexity = (int32_t*)m_sComplexityAnalysisParam.pGomComplexity; |
| 258 | 238 | |
| 259 | − uint8_t* pSrcY = NULL; | |
| 260 | − int32_t iCurStride = 0; | |
| 261 | 239 | |
| 262 | − uint8_t* pCurTmp = NULL; | |
| 263 | 240 | uint32_t uiSampleSum = 0, uiSquareSum = 0; |
| 264 | 241 | |
| 265 | − pSrcY = (uint8_t*)pSrcPixMap->pPixel[0]; | |
| 266 | − iCurStride = pSrcPixMap->iStride[0]; | |
| 267 | − | |
| 268 | 242 | for (int32_t j = 0; j < iGomMbNum; j ++) { |
| 269 | 243 | uiSampleSum = 0; |
| 270 | 244 | uiSquareSum = 0; |
| @@ -276,13 +250,9 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 5 unmodified lines | ||
| 276 | 250 | iMbStartIndex = iGomMbStartIndex; |
| 277 | 251 | iMbEndIndex = WELS_MIN ((iMbStartIndex / iMbWidth + 1) * iMbWidth, iGomMbEndIndex); |
| 278 | 252 | |
| 279 | − iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iCurStride + (iMbStartIndex % iMbWidth) * | |
| 280 | − MB_WIDTH_LUMA; | |
| 281 | 253 | iGomSampleNum = (iMbEndIndex - iMbStartIndex) * MB_WIDTH_LUMA * MB_WIDTH_LUMA; |
| 282 | 254 | |
| 283 | 255 | do { |
| 284 | − pCurTmp = pSrcY + iStartSampleIndex; | |
| 285 | − | |
| 286 | 256 | for (int32_t i = iMbStartIndex; i < iMbEndIndex; i ++) { |
| 287 | 257 | uiSampleSum += pVaaCalcResults->pSum16x16[i]; |
| 288 | 258 | uiSquareSum += pVaaCalcResults->pSumOfSquare16x16[i]; |
| @@ -291,8 +261,6 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 2 unmodified lines | ||
| 291 | 261 | iMbStartIndex = iMbEndIndex; |
| 292 | 262 | iMbEndIndex = WELS_MIN (iMbEndIndex + iMbWidth, iGomMbEndIndex); |
| 293 | 263 | |
| 294 | − iStartSampleIndex = (iMbStartIndex / iMbWidth) * MB_WIDTH_LUMA * iCurStride + (iMbStartIndex % iMbWidth) * | |
| 295 | − MB_WIDTH_LUMA; | |
| 296 | 264 | } while (--iGomMbRowNum); |
| 297 | 265 | |
| 298 | 266 | pGomComplexity[j] = uiSquareSum - (uiSampleSum * uiSampleSum / iGomSampleNum); |