shithub: openh264

Download patch

ref: c228c51423b5e957678d00c205816bdeae027844
parent: 8bdf6abe59ebe2c150d034e9a3e379a7b607bdeb
parent: d98cefecec59d8d0c0e991eadf765aa262bba989
author: huili2 <huili2@cisco.com>
date: Tue Jul 8 12:14:01 EDT 2014

Merge pull request #1102 from ruil2/rc_fix_1

add skip frame processing for screen content

--- a/codec/encoder/core/src/encoder.cpp
+++ b/codec/encoder/core/src/encoder.cpp
@@ -325,10 +325,14 @@
     } else {
       iFrameType = videoFrameTypeP;
     }
-    if (videoFrameTypeIDR == iFrameType) {
+    if (videoFrameTypeP == iFrameType && pEncCtx->iSkipFrameFlag > 0) {
+      -- pEncCtx->iSkipFrameFlag;
+      iFrameType = videoFrameTypeSkip;
+    } else if (videoFrameTypeIDR == iFrameType) {
       pEncCtx->iCodingIndex = 0;
       pEncCtx->bCurFrameMarkedAsSceneLtr   = true;
     }
+
   } else {
     // perform scene change detection
     if ((!pSvcParam->bEnableSceneChangeDetect) || pEncCtx->pVaa->bIdrPeriodFlag ||