Merge pull request #1426 from sijchen/fix_paramtranscode1
[Encoder] add clip in ParamTranscode for input para checking
This commit is contained in:
commit
d720122a37
@ -399,8 +399,11 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt {
|
||||
#ifdef ENABLE_FRAME_DUMP
|
||||
pDlp->sRecFileName[0] = '\0'; // file to be constructed
|
||||
#endif//ENABLE_FRAME_DUMP
|
||||
pSpatialLayer->iVideoWidth = pCodingParam.sSpatialLayers[iIdxSpatial].iVideoWidth; // frame width
|
||||
pSpatialLayer->iVideoHeight = pCodingParam.sSpatialLayers[iIdxSpatial].iVideoHeight;// frame height
|
||||
pSpatialLayer->iVideoWidth = WELS_CLIP3 (pCodingParam.sSpatialLayers[iIdxSpatial].iVideoWidth, MB_WIDTH_LUMA,
|
||||
iPicWidth); // frame width
|
||||
pSpatialLayer->iVideoHeight = WELS_CLIP3 (pCodingParam.sSpatialLayers[iIdxSpatial].iVideoHeight, MB_HEIGHT_LUMA,
|
||||
iPicHeight);// frame height
|
||||
|
||||
pSpatialLayer->iSpatialBitrate =
|
||||
pCodingParam.sSpatialLayers[iIdxSpatial].iSpatialBitrate; // target bitrate for current spatial layer
|
||||
pSpatialLayer->iMaxSpatialBitrate =
|
||||
|
@ -207,6 +207,7 @@ int CWelsH264SVCEncoder::Initialize (const SEncParamBase* argv) {
|
||||
if (sConfig.ParamBaseTranscode (*argv)) {
|
||||
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
|
||||
"CWelsH264SVCEncoder::Initialize(), parameter_translation failed.");
|
||||
TraceParamInfo (&sConfig);
|
||||
Uninitialize();
|
||||
return cmInitParaError;
|
||||
}
|
||||
@ -230,6 +231,7 @@ int CWelsH264SVCEncoder::InitializeExt (const SEncParamExt* argv) {
|
||||
if (sConfig.ParamTranscode (*argv)) {
|
||||
WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR,
|
||||
"CWelsH264SVCEncoder::InitializeExt(), parameter_translation failed.");
|
||||
TraceParamInfo (&sConfig);
|
||||
Uninitialize();
|
||||
return cmInitParaError;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user