shithub: openh264

Download patch

ref: c923dc6cc32124425cf42ca7f295c075bd519c49
parent: 6cb5e468d050dfc49775a43b1704c3316b38bb90
author: Huade Shi (huashi) <huashi@cisco.com>
date: Tue Apr 11 09:56:05 EDT 2017

slice buffer design: tune slice buffer reallocate step

--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -1292,6 +1292,7 @@
   int32_t iIncreaseSlicNum = (iLeftMBNum * INT_MULTIPLY / iMBNumInPatition) * iMaxSliceNumOld;
 
   iIncreaseSlicNum  = ( 0 == (iIncreaseSlicNum / INT_MULTIPLY) ) ? 1 : (iIncreaseSlicNum / INT_MULTIPLY);
+  iIncreaseSlicNum  = (iIncreaseSlicNum < iMaxSliceNumOld / 2) ? (iMaxSliceNumOld / 2) : iIncreaseSlicNum;
   iMaxSliceNumNew   = iMaxSliceNumOld + iIncreaseSlicNum;
 
   return ENC_RETURN_SUCCESS;