Showing the changes to codec/processing (1 of 5 files). Show all
Unified · Split
| @@ -187,9 +187,7 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 186 unmodified lines | ||
| 187 | 187 | int32_t* pGomForegroundBlockNum = (int32_t*)m_sComplexityAnalysisParam.pGomForegroundBlockNum; |
| 188 | 188 | int32_t* pGomComplexity = (int32_t*)m_sComplexityAnalysisParam.pGomComplexity; |
| 189 | 189 | |
| 190 | − | |
| 191 | 190 | uint32_t uiGomSad = 0, uiFrameSad = 0; |
| 192 | − | |
| 193 | 191 | InitGomSadFunc (m_pfGomSad, m_sComplexityAnalysisParam.iCalcBgd); |
| 194 | 192 | |
| 195 | 193 | for (int32_t j = 0; j < iGomMbNum; j ++) { |
| @@ -212,11 +210,9 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaSad (SPixMap* pSrcPixMap, SPixM · 16 unmodified lines | ||
| 212 | 210 | iMbEndIndex = WELS_MIN (iMbEndIndex + iMbWidth , iGomMbEndIndex); |
| 213 | 211 | |
| 214 | 212 | } while (--iGomMbRowNum); |
| 215 | − | |
| 216 | 213 | pGomComplexity[j] = uiGomSad; |
| 217 | 214 | uiFrameSad += pGomComplexity[j]; |
| 218 | 215 | } |
| 219 | − | |
| 220 | 216 | m_sComplexityAnalysisParam.iFrameComplexity = uiFrameSad; |
| 221 | 217 | } |
| 222 | 218 | |
| @@ -237,7 +233,7 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 14 unmodified lines | ||
| 237 | 233 | |
| 238 | 234 | SVAACalcResult* pVaaCalcResults = m_sComplexityAnalysisParam.pCalcResult; |
| 239 | 235 | int32_t* pGomComplexity = (int32_t*)m_sComplexityAnalysisParam.pGomComplexity; |
| 240 | − | |
| 236 | + uint32_t uiFrameSad = 0; | |
| 241 | 237 | |
| 242 | 238 | uint32_t uiSampleSum = 0, uiSquareSum = 0; |
| 243 | 239 | |
| @@ -266,7 +262,9 @@ void CComplexityAnalysis::AnalyzeGomComplexityViaVar (SPixMap* pSrcPixMap, SPixM · 22 unmodified lines | ||
| 266 | 262 | } while (--iGomMbRowNum); |
| 267 | 263 | |
| 268 | 264 | pGomComplexity[j] = uiSquareSum - (uiSampleSum * uiSampleSum / iGomSampleNum); |
| 265 | + uiFrameSad += pGomComplexity[j]; | |
| 269 | 266 | } |
| 267 | + m_sComplexityAnalysisParam.iFrameComplexity = uiFrameSad; | |
| 270 | 268 | } |
| 271 | 269 | |
| 272 | 270 | |