shithub: openh264

Download patch

ref: 01016b1c83b019d731e73c0bf513cd79ea3223ff
parent: 9ea1f0c7ea5407c269ce1ddaf18b97fa62979fc1
parent: f3c4b878ffde64307deb68ba4b6668d119fdfcdf
author: HaiboZhu <haibozhu@cisco.com>
date: Tue Nov 24 09:16:21 EST 2015

Merge pull request #2264 from sijchen/api41

[Encoder] put bUseLoadBalancing into actual usage and add test case for it

--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -281,6 +281,7 @@
     SUsedPicRect.iHeight = ((iPicHeight >> 1) << 1);
 
     iMultipleThreadIdc = pCodingParam.iMultipleThreadIdc;
+    bUseLoadBalancing = pCodingParam.bUseLoadBalancing;
 
     /* Deblocking loop filter */
     iLoopFilterDisableIdc       = pCodingParam.iLoopFilterDisableIdc;      // 0: on, 1: off, 2: on except for slice boundaries,
--- a/test/api/BaseEncoderTest.cpp
+++ b/test/api/BaseEncoderTest.cpp
@@ -50,6 +50,11 @@
         param.sSpatialLayers[i].sSliceArgument.uiSliceSizeConstraint = 600;
         param.uiMaxNalSize = 1500;
       }
+      if (eSliceMode == SM_FIXEDSLCNUM_SLICE) {
+        param.sSpatialLayers[i].sSliceArgument.uiSliceNum = 4;
+        param.iMultipleThreadIdc = 4;
+        param.bUseLoadBalancing = false;
+      }
     }
     param.iTargetBitrate *= param.iSpatialLayerNum;
 
--- a/test/api/encoder_test.cpp
+++ b/test/api/encoder_test.cpp
@@ -163,6 +163,10 @@
     "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
     "6c13d959d981d412343664b4830dd4042bc4ddf9", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SIZELIMITED_SLICE, false, 1, false, false, true
   },
+  {
+    "res/Cisco_Absolute_Power_1280x720_30fps.yuv",
+    "fbc231e3ec66b426561bc80b902106fc4b5d2ccb", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_FIXEDSLCNUM_SLICE, false, 1, false, false, true
+  },
 };
 
 INSTANTIATE_TEST_CASE_P (EncodeFile, EncoderOutputTest,