shithub: openh264

Download patch

ref: d98cefecec59d8d0c0e991eadf765aa262bba989
parent: c1a24d52f5e4ca96a0775dfe0f83cc22e43f3c8c
author: ruil2 <[email protected]>
date: Tue Jul 8 10:41:34 EDT 2014

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 ||