shithub: openh264

Download patch

ref: 61141a46f551791c4f68b399a87e69ee9f457a59
parent: 26e1f94bce19cbd01184159cf5a8c6b9a97bad47
author: Guangwei Wang <[email protected]>
date: Thu Oct 26 07:20:30 EDT 2017

astyle code style for console

--- a/codec/console/common/src/read_config.cpp
+++ b/codec/console/common/src/read_config.cpp
@@ -105,7 +105,7 @@
       bCommentFlag = true;
     if (!bCommentFlag) {
       if (kCh == '\t' || kCh == ' ') {
-        if (nTagNum >= kiValSize-1)
+        if (nTagNum >= kiValSize - 1)
           break;
         if (! (*strTags).empty()) {
           ++ nTagNum;
--- a/codec/console/dec/src/d3d9_utils.cpp
+++ b/codec/console/dec/src/d3d9_utils.cpp
@@ -336,7 +336,7 @@
       || m_nHeight != pInfo->UsrData.sSystemBuffer.iHeight) {
     m_nWidth = pInfo->UsrData.sSystemBuffer.iWidth;
     m_nHeight = pInfo->UsrData.sSystemBuffer.iHeight;
-    MoveWindow(m_hWnd,0,0,pInfo->UsrData.sSystemBuffer.iWidth,pInfo->UsrData.sSystemBuffer.iHeight,true);
+    MoveWindow (m_hWnd, 0, 0, pInfo->UsrData.sSystemBuffer.iWidth, pInfo->UsrData.sSystemBuffer.iHeight, true);
     SAFE_RELEASE (m_lpD3D9RawSurfaceShare);
     SAFE_RELEASE (m_lpD3D9Device);
   }
--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -223,9 +223,9 @@
 
       if (strTag[0].compare ("UsageType") == 0) {
         pSvcParam.iUsageType = (EUsageType)atoi (strTag[1].c_str());
-      }else if (strTag[0].compare ("SimulcastAVC") == 0) {
+      } else if (strTag[0].compare ("SimulcastAVC") == 0) {
         pSvcParam.bSimulcastAVC = atoi (strTag[1].c_str()) ? true : false;
-      }else if (strTag[0].compare ("SourceWidth") == 0) {
+      } else if (strTag[0].compare ("SourceWidth") == 0) {
         pSrcPic->iPicWidth = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("SourceHeight") == 0) {
         pSrcPic->iPicHeight = atoi (strTag[1].c_str());
@@ -273,8 +273,8 @@
       } else if (strTag[0].compare ("EntropyCodingModeFlag") == 0) {
         pSvcParam.iEntropyCodingModeFlag = (atoi (strTag[1].c_str()) != 0);
       } else if (strTag[0].compare ("ComplexityMode") == 0) {
-        pSvcParam.iComplexityMode = (ECOMPLEXITY_MODE)(atoi (strTag[1].c_str()));
-      }else if (strTag[0].compare ("LoopFilterDisableIDC") == 0) {
+        pSvcParam.iComplexityMode = (ECOMPLEXITY_MODE) (atoi (strTag[1].c_str()));
+      } else if (strTag[0].compare ("LoopFilterDisableIDC") == 0) {
         pSvcParam.iLoopFilterDisableIdc = (int8_t)atoi (strTag[1].c_str());
         if (pSvcParam.iLoopFilterDisableIdc > 6 || pSvcParam.iLoopFilterDisableIdc < 0) {
           fprintf (stderr, "Invalid parameter in iLoopFilterDisableIdc: %d.\n", pSvcParam.iLoopFilterDisableIdc);
@@ -317,9 +317,9 @@
           return 1;
         }
       } else if (strTag[0].compare ("MaxQp") == 0) {
-          pSvcParam.iMaxQp = atoi (strTag[1].c_str());
+        pSvcParam.iMaxQp = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("MinQp") == 0) {
-          pSvcParam.iMinQp = atoi (strTag[1].c_str());
+        pSvcParam.iMinQp = atoi (strTag[1].c_str());
       } else if (strTag[0].compare ("EnableDenoise") == 0) {
         pSvcParam.bEnableDenoise = atoi (strTag[1].c_str()) ? true : false;
       } else if (strTag[0].compare ("EnableSceneChangeDetection") == 0) {
@@ -448,7 +448,7 @@
       pSvcParam.iUsageType = (EUsageType)atoi (argv[n++]);
 
     else if (!strcmp (pCommand, "-savc") && (n < argc))
-        pSvcParam.bSimulcastAVC =  atoi (argv[n++]) ? true : false;
+      pSvcParam.bSimulcastAVC =  atoi (argv[n++]) ? true : false;
 
     else if (!strcmp (pCommand, "-org") && (n < argc))
       sFileSet.strSeqFile.assign (argv[n++]);
@@ -552,10 +552,10 @@
       pSvcParam.iMaxBitrate = 1000 * atoi (argv[n++]);
 
     else if (!strcmp (pCommand, "-maxqp") && (n < argc))
-        pSvcParam.iMaxQp = atoi (argv[n++]);
+      pSvcParam.iMaxQp = atoi (argv[n++]);
 
     else if (!strcmp (pCommand, "-minqp") && (n < argc))
-        pSvcParam.iMinQp = atoi (argv[n++]);
+      pSvcParam.iMinQp = atoi (argv[n++]);
 
     else if (!strcmp (pCommand, "-numl") && (n < argc)) {
       pSvcParam.iSpatialLayerNum = atoi (argv[n++]);