shithub: openh264

Download patch

ref: e392932ad2623f35fc9181cba1469ad2c47bd3ca
parent: 6ec60e6aee65cdc6ecaf81bdc159cf3dd0711836
author: Martin Storsjö <[email protected]>
date: Mon Mar 3 05:14:42 EST 2014

Initialize sSpatialLayers[0] in SEncParamExt for GetDefaultParams

--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -192,6 +192,16 @@
   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) {