Fix several -Werror=unused-variable and -Werror=unused-but-set-variable and removed dead code found with this warnings
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 10 files). Show all
Unified · Split
| @@ -78,11 +78,6 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 77 unmodified lines | |||
| 78 | float fMaxFrameRate = 0.0f; | 78 | float fMaxFrameRate = 0.0f; |
| 79 | const float fEpsn = 0.000001f; | 79 | const float fEpsn = 0.000001f; |
| 80 | int32_t i = 0; | 80 | int32_t i = 0; |
| 81 | int32_t iLastSpatialWidth = 0; | ||
| 82 | int32_t iLastSpatialHeight = 0; | ||
| 83 | float fLastFrameRateIn = 0.0f; | ||
| 84 | float fLastFrameRateOut = 0.0f; | ||
| 85 | SDLayerParam* pLastSpatialParam = NULL; | ||
| 86 | 81 | ||
| 87 | assert (pCfg != NULL); | 82 | assert (pCfg != NULL); |
| 88 | 83 | ||
| @@ -118,16 +113,6 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 29 unmodified lines | |||
| 118 | pCfg->fMaxFrameRate = fMaxFrameRate; | 113 | pCfg->fMaxFrameRate = fMaxFrameRate; |
| 119 | } | 114 | } |
| 120 | 115 | ||
| 121 | for (i = 0; i < pCfg->iSpatialLayerNum; ++ i) { | ||
| 122 | SDLayerParam* fDlp = &pCfg->sDependencyLayers[i]; | ||
| 123 | |||
| 124 | pLastSpatialParam = fDlp; | ||
| 125 | iLastSpatialWidth = fDlp->iFrameWidth; | ||
| 126 | iLastSpatialHeight = fDlp->iFrameHeight; | ||
| 127 | fLastFrameRateIn = fDlp->fInputFrameRate; | ||
| 128 | fLastFrameRateOut = fDlp->fOutputFrameRate; | ||
| 129 | } | ||
| 130 | |||
| 131 | return 0; | 116 | return 0; |
| 132 | } | 117 | } |
| 133 | 118 | ||
| @@ -680,7 +665,6 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 546 unmodified lines | |||
| 680 | SSubsetSps* pSubsetSps = NULL; | 665 | SSubsetSps* pSubsetSps = NULL; |
| 681 | SWelsPPS* pPps = NULL; | 666 | SWelsPPS* pPps = NULL; |
| 682 | CMemoryAlign* pMa = NULL; | 667 | CMemoryAlign* pMa = NULL; |
| 683 | SStrideTables* pStrideTab = NULL; | ||
| 684 | int32_t iDlayerCount = 0; | 668 | int32_t iDlayerCount = 0; |
| 685 | int32_t iDlayerIndex = 0; | 669 | int32_t iDlayerIndex = 0; |
| 686 | uint32_t iSpsId = 0; | 670 | uint32_t iSpsId = 0; |
| @@ -696,7 +680,6 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 9 unmodified lines | |||
| 696 | iDlayerCount = pParam->iSpatialLayerNum; | 680 | iDlayerCount = pParam->iSpatialLayerNum; |
| 697 | iNumRef = pParam->iNumRefFrame; | 681 | iNumRef = pParam->iNumRefFrame; |
| 698 | // highest_layers_in_temporal = 1 + WELS_MAX(pParam->iDecompStages, 1); | 682 | // highest_layers_in_temporal = 1 + WELS_MAX(pParam->iDecompStages, 1); |
| 699 | pStrideTab = (*ppCtx)->pStrideTab; | ||
| 700 | 683 | ||
| 701 | iDlayerIndex = 0; | 684 | iDlayerIndex = 0; |
| 702 | while (iDlayerIndex < iDlayerCount) { | 685 | while (iDlayerIndex < iDlayerCount) { |