From e392932ad2623f35fc9181cba1469ad2c47bd3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 3 Mar 2014 10:14:42 +0200 Subject: [PATCH] Initialize sSpatialLayers[0] in SEncParamExt for GetDefaultParams --- codec/encoder/core/inc/param_svc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codec/encoder/core/inc/param_svc.h b/codec/encoder/core/inc/param_svc.h index 7847fca8..a35f0989 100644 --- a/codec/encoder/core/inc/param_svc.h +++ b/codec/encoder/core/inc/param_svc.h @@ -192,6 +192,16 @@ static void FillDefault (SEncParamExt& param, const bool kbEnableRc) { param.iMaxQp = 51; param.iMinQp = 0; param.iUsageType = 0; + + param.sSpatialLayers[0].iDLayerQp = SVC_QUALITY_BASE_QP; + param.sSpatialLayers[0].fFrameRate = param.fMaxFrameRate; + param.sSpatialLayers[0].sSliceCfg.uiSliceMode = 0; + param.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceSizeConstraint = 1500; + param.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceNum = 1; + + const int32_t kiLesserSliceNum = ((MAX_SLICES_NUM < MAX_SLICES_NUM_TMP) ? MAX_SLICES_NUM : MAX_SLICES_NUM_TMP); + for (int32_t idx = 0; idx < kiLesserSliceNum; idx++) + param.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceMbNum[idx] = 960; } void FillDefault (const bool kbEnableRc) {