shithub: openh264

Download patch

ref: f5e0058786ee70ffc131d8d7df1e93dc0e0d8bb4
parent: 077c29a0f1f40ef92b81822424ef6406acc7b4e8
author: Varun B Patil <varun.basavaraj.patil@gmail.com>
date: Sun Dec 15 13:49:08 EST 2013

Make the two ParseCommandLine functions consistent

with respect to strcmp function call.
Removed unnecessary brackets.

--- a/codec/console/enc/src/welsenc.cpp
+++ b/codec/console/enc/src/welsenc.cpp
@@ -497,76 +497,76 @@
 
   while (n < argc) {
     pCommand = argv[n++];
-    if (! (strcmp (pCommand, "-h"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-h")) {	// confirmed_safe_unsafe_usage
       PrintHelp();
       continue;
     }
-    if (! (strcmp (pCommand, "-bf"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-bf")) {	// confirmed_safe_unsafe_usage
       sFileSet.strBsFile.assign (argv[n]);
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-frms"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-frms")) {	// confirmed_safe_unsafe_usage
       pSvcParam.uiFrameToBeCoded = atoi (argv[n ]);
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-gop"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-gop")) {	// confirmed_safe_unsafe_usage
       pSvcParam.uiGopSize = atoi (argv[n ]);
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-iper"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-iper")) {	// confirmed_safe_unsafe_usage
       pSvcParam.uiIntraPeriod = atoi (argv[n ]);
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-spsid"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-spsid")) {	// confirmed_safe_unsafe_usage
       pSvcParam.bEnableSpsPpsIdAddition = atoi (argv[n ]) ? true : false;
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-denois"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-denois")) {	// confirmed_safe_unsafe_usage
       pSvcParam.bEnableDenoise = atoi (argv[n ]) ? true : false;
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-scene"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-scene")) {	// confirmed_safe_unsafe_usage
       pSvcParam.bEnableSceneChangeDetect = atoi (argv[n ]) ? true : false;
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-bgd"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-bgd")) {	// confirmed_safe_unsafe_usage
       pSvcParam.bEnableBackgroundDetection = atoi (argv[n ]) ? true : false;
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-aq"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-aq")) {	// confirmed_safe_unsafe_usage
       pSvcParam.bEnableAdaptiveQuant = atoi (argv[n ]) ? true : false;
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-ltr"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-ltr")) {	// confirmed_safe_unsafe_usage
       pSvcParam.bEnableLongTermReference = atoi (argv[n ]) ? true : false;
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-ltrper"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-ltrper")) {	// confirmed_safe_unsafe_usage
       pSvcParam.uiLtrMarkPeriod = atoi (argv[n ]);
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-rc"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-rc")) {	// confirmed_safe_unsafe_usage
       pSvcParam.bEnableRc = atoi (argv[n ]) ? true : false;
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-tarb"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-tarb")) {	// confirmed_safe_unsafe_usage
       pSvcParam.iTargetBitrate = atoi (argv[n ]);
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-numl"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-numl")) {	// confirmed_safe_unsafe_usage
       bool_t bFound = false;
       pSvcParam.iNumDependencyLayer = atoi (argv[n++]);
       for (int ln = 0 ; ln < pSvcParam.iNumDependencyLayer ; ln++) {
@@ -669,13 +669,13 @@
       //n += 1;
       continue;
     }
-    if (! (strcmp (pCommand, "-org"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-org")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       sFileSet.sSpatialLayers[iLayer].strSeqFile.assign (argv[n]);
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-drec"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-drec")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       const int iLen = strlen (argv[n]);	// confirmed_safe_unsafe_usage
 #ifdef ENABLE_FRAME_DUMP
@@ -686,7 +686,7 @@
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-sw"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-sw")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->iFrameWidth =  atoi (argv[n ]);
@@ -694,7 +694,7 @@
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-sh"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-sh")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->iFrameHeight =  atoi (argv[n ]);
@@ -702,7 +702,7 @@
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-frin"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-frin")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->fInputFrameRate = (float)atof (argv[n ]);
@@ -709,7 +709,7 @@
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-frout"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-frout")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->fOutputFrameRate = (float)atof (argv[n ]);
@@ -717,7 +717,7 @@
       continue;
     }
 
-    if (! (strcmp (pCommand, "-lqp"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-lqp")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       uiQpChangeFlag[iLayer] = 1;
@@ -727,7 +727,7 @@
     }
     //sLayerCtx[iLayer].num_quality_layers = pDLayer->num_quality_layers = 1;
 
-    if (! (strcmp (pCommand, "-ltarb"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-ltarb")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->iSpatialBitrate	= 1000 * atoi (argv[n ]);
@@ -735,7 +735,7 @@
       continue;
     }
 
-    if (! (strcmp (pCommand, "-slcmd"))) {	// confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-slcmd")) {	// confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
 
@@ -762,7 +762,7 @@
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-slcsize"))) { //confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-slcsize")) { //confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->sMso.sSliceArgument.uiSliceSizeConstraint = atoi (argv[n ]);
@@ -769,7 +769,7 @@
       ++ n;
       continue;
     }
-    if (! (strcmp (pCommand, "-slcnum"))) { // confirmed_safe_unsafe_usage
+    if (!strcmp (pCommand, "-slcnum")) { // confirmed_safe_unsafe_usage
       unsigned int	iLayer = atoi (argv[n++]);
       SDLayerParam* pDLayer = &pSvcParam.sDependencyLayers[iLayer];
       pDLayer->sMso.sSliceArgument.iSliceNum = atoi (argv[n ]);