[x265] [PATCH 2 of 4] param: nits

Steve Borho steve at borho.org
Wed Mar 18 01:31:29 CET 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1426638490 18000
#      Tue Mar 17 19:28:10 2015 -0500
# Node ID b0e2a02c92fb8387c5f29eb6190ec281906818cb
# Parent  e7dabcfdc06698781c2bef5a2d85cad3e8ddac85
param: nits

diff -r e7dabcfdc066 -r b0e2a02c92fb source/common/param.cpp
--- a/source/common/param.cpp	Tue Mar 17 19:24:54 2015 -0500
+++ b/source/common/param.cpp	Tue Mar 17 19:28:10 2015 -0500
@@ -52,9 +52,7 @@
  */
 
 #undef strtok_r
-char* strtok_r(char *      str,
-               const char *delim,
-               char **     nextp)
+char* strtok_r(char* str, const char* delim, char** nextp)
 {
     if (!str)
         str = *nextp;
@@ -87,13 +85,13 @@
 }
 
 extern "C"
-void x265_param_free(x265_param *p)
+void x265_param_free(x265_param* p)
 {
     return x265_free(p);
 }
 
 extern "C"
-void x265_param_default(x265_param *param)
+void x265_param_default(x265_param* param)
 {
     memset(param, 0, sizeof(x265_param));
 
@@ -234,7 +232,7 @@
 }
 
 extern "C"
-int x265_param_default_preset(x265_param *param, const char *preset, const char *tune)
+int x265_param_default_preset(x265_param* param, const char* preset, const char* tune)
 {
     x265_param_default(param);
 
@@ -437,7 +435,7 @@
     return 0;
 }
 
-static int x265_atobool(const char *str, bool& bError)
+static int x265_atobool(const char* str, bool& bError)
 {
     if (!strcmp(str, "1") ||
         !strcmp(str, "true") ||
@@ -451,7 +449,7 @@
     return 0;
 }
 
-static double x265_atof(const char *str, bool& bError)
+static double x265_atof(const char* str, bool& bError)
 {
     char *end;
     double v = strtod(str, &end);
@@ -461,7 +459,7 @@
     return v;
 }
 
-static int parseName(const char *arg, const char * const * names, bool& bError)
+static int parseName(const char* arg, const char* const* names, bool& bError)
 {
     for (int i = 0; names[i]; i++)
         if (!strcmp(arg, names[i]))
@@ -478,7 +476,7 @@
 #define atobool(str) (bNameWasBool = true, x265_atobool(str, bError))
 
 extern "C"
-int x265_param_parse(x265_param *p, const char *name, const char *value)
+int x265_param_parse(x265_param* p, const char* name, const char* value)
 {
     bool bError = false;
     bool bNameWasBool = false;
@@ -853,7 +851,7 @@
 namespace x265 {
 // internal encoder functions
 
-int x265_atoi(const char *str, bool& bError)
+int x265_atoi(const char* str, bool& bError)
 {
     char *end;
     int v = strtol(str, &end, 0);
@@ -868,7 +866,7 @@
  *   false || no  - disabled
  *   integer bitmap value
  *   comma separated list of SIMD names, eg: SSE4.1,XOP */
-int parseCpuName(const char *value, bool& bError)
+int parseCpuName(const char* value, bool& bError)
 {
     if (!value)
     {
@@ -927,7 +925,7 @@
     { 2, 1 },
 };
 
-void setParamAspectRatio(x265_param *p, int width, int height)
+void setParamAspectRatio(x265_param* p, int width, int height)
 {
     p->vui.aspectRatioIdc = X265_EXTENDED_SAR;
     p->vui.sarWidth = width;
@@ -942,7 +940,7 @@
     }
 }
 
-void getParamAspectRatio(x265_param *p, int& width, int& height)
+void getParamAspectRatio(x265_param* p, int& width, int& height)
 {
     if (!p->vui.aspectRatioIdc)
         width = height = 0;
@@ -960,7 +958,7 @@
         width = height = 0;
 }
 
-static inline int _confirm(x265_param *param, bool bflag, const char* message)
+static inline int _confirm(x265_param* param, bool bflag, const char* message)
 {
     if (!bflag)
         return 0;
@@ -969,7 +967,7 @@
     return 1;
 }
 
-int x265_check_params(x265_param *param)
+int x265_check_params(x265_param* param)
 {
 #define CHECK(expr, msg) check_failed |= _confirm(param, expr, msg)
     int check_failed = 0; /* abort if there is a fatal configuration problem */
@@ -1172,7 +1170,7 @@
     }
 }
 
-int x265_set_globals(x265_param *param)
+int x265_set_globals(x265_param* param)
 {
     static int once /* = 0 */;
 
@@ -1226,7 +1224,7 @@
     }
 }
 
-void x265_print_params(x265_param *param)
+void x265_print_params(x265_param* param)
 {
     if (param->logLevel < X265_LOG_INFO)
         return;
@@ -1322,7 +1320,7 @@
     fflush(stderr);
 }
 
-char *x265_param2string(x265_param *p)
+char *x265_param2string(x265_param* p)
 {
     char *buf, *s;
 
@@ -1418,7 +1416,7 @@
     return buf;
 }
 
-bool parseLambdaFile(x265_param *param)
+bool parseLambdaFile(x265_param* param)
 {
     if (!param->rc.lambdaFileName)
         return false;


More information about the x265-devel mailing list