shithub: openh264

Download patch

ref: 1d79a1ac8010b48c2c94e359fb7e807ef7f19e16
parent: 5cbe4a40d3e2b9f4d6eb399f87af59e9a1d1222b
author: lyao2 <lyao2@LYAO2-WS01.cisco.com>
date: Mon Jun 9 11:57:15 EDT 2014

enable static/scroll Pskip functions

--- a/codec/encoder/core/src/svc_mode_decision.cpp
+++ b/codec/encoder/core/src/svc_mode_decision.cpp
@@ -223,7 +223,7 @@
   bool bTryScrollSkip = false;
 
   if (pVaaExt->sScrollDetectInfo.bScrollDetectFlag)
-    bTryScrollSkip = IsMbCollocatedStatic (pWelsMd->iBlock8x8StaticIdc);
+    bTryScrollSkip = IsMbScrolledStatic (pWelsMd->iBlock8x8StaticIdc);
   else return 0;
 
   if (bTryScrollSkip) {
@@ -237,7 +237,7 @@
         bTryScrollSkip =  false;
       } else {
         iStrideUV	= pCurDqLayer->iEncStride[1];
-        iOffsetUV	= (kiMbX << 3) + (iScrollMvX >> 1) + ((kiMbX << 3) + (iScrollMvY >> 1)) * iStrideUV;
+        iOffsetUV	= (kiMbX << 3) + (iScrollMvX >> 1) + ((kiMbY << 3) + (iScrollMvY >> 1)) * iStrideUV;
 
         int32_t iSadCostCb = CalUVSadCost (pFunc, pMbCache->SPicData.pEncMb[1], iStrideUV, pRefOri->pData[1] + iOffsetUV,
                                            pRefOri->iLineSize[1]);
@@ -390,9 +390,14 @@
   SetBlockStaticIdcToMd (pEncCtx->pVaa, pWelsMd, pCurMb, pCurDqLayer);
 
   //try static Pskip;
+  if (MdInterSCDPskipProcess (pEncCtx, pWelsMd, slice, pCurMb, pMbCache, STATIC)) {
+    return true;
+  }
 
   //try scrolled Pskip
-  //TBD
+  if (MdInterSCDPskipProcess (pEncCtx, pWelsMd, slice, pCurMb, pMbCache, SCROLLED)) {
+    return true;
+  }
 
   return false;
 }