Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 3 files). Show all
Unified · Split
| @@ -200,14 +200,13 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 199 unmodified lines | |||
| 200 | 200 | ||
| 201 | } | 201 | } |
| 202 | if (pCfg->iSpatialLayerNum > 1) { | 202 | if (pCfg->iSpatialLayerNum > 1) { |
| 203 | int32_t iFinalWidth = pCfg->sSpatialLayers[pCfg->iSpatialLayerNum - 1].iVideoWidth; | 203 | for (i = pCfg->iSpatialLayerNum - 1; i > 0; i--) { |
| 204 | int32_t iFinalHeight = pCfg->sSpatialLayers[pCfg->iSpatialLayerNum - 1].iVideoHeight; | 204 | SSpatialLayerConfig* fDlpUp = &pCfg->sSpatialLayers[i]; |
| 205 | for (i = 0; i < (pCfg->iSpatialLayerNum - 1); i++) { | 205 | SSpatialLayerConfig* fDlp = &pCfg->sSpatialLayers[i-1]; |
| 206 | SSpatialLayerConfig* fDlp = &pCfg->sSpatialLayers[i]; | 206 | if ((fDlp->iVideoWidth > fDlpUp->iVideoWidth) || (fDlp->iVideoHeight > fDlpUp->iVideoHeight)) { |
| 207 | if ((fDlp->iVideoWidth > iFinalWidth) || (fDlp->iVideoHeight > iFinalHeight)) { | ||
| 208 | WelsLog (pLogCtx, WELS_LOG_ERROR, | 207 | WelsLog (pLogCtx, WELS_LOG_ERROR, |
| 209 | "ParamValidation,Invalid resolution layer(%d) resolution(%d x %d) should be less than the highest spatial layer resolution(%d x %d) ", | 208 | "ParamValidation,Invalid resolution layer(%d) resolution(%d x %d) should be less than the upper spatial layer resolution(%d x %d) ", |
| 210 | i, fDlp->iVideoWidth, fDlp->iVideoHeight, iFinalWidth, iFinalHeight); | 209 | i, fDlp->iVideoWidth, fDlp->iVideoHeight, fDlpUp->iVideoWidth, fDlpUp->iVideoHeight); |
| 211 | return ENC_RETURN_UNSUPPORTED_PARA; | 210 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 212 | } | 211 | } |
| 213 | } | 212 | } |