[x265-commits] [x265] common: assignment inside conditional expression

Deepthi Nandakumar deepthi at multicorewareinc.com
Mon Feb 24 03:44:34 CET 2014


details:   http://hg.videolan.org/x265/rev/39e2c8bda975
branches:  
changeset: 6264:39e2c8bda975
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Mon Feb 24 07:59:48 2014 +0530
description:
common: assignment inside conditional expression
Subject: [x265] NAL: Define a default constructor for base class to prevent warning

details:   http://hg.videolan.org/x265/rev/6e7c2f5b7b22
branches:  
changeset: 6265:6e7c2f5b7b22
user:      Deepthi Nandakumar <deepthi at multicorewareinc.com>
date:      Mon Feb 24 08:03:58 2014 +0530
description:
NAL: Define a default constructor for base class to prevent warning
Subject: [x265] common: c is a char pointer

details:   http://hg.videolan.org/x265/rev/07537439599b
branches:  
changeset: 6266:07537439599b
user:      Steve Borho <steve at borho.org>
date:      Sun Feb 23 20:43:09 2014 -0600
description:
common: c is a char pointer
Subject: [x265] encoder: use more frame threads when WPP is disabled

details:   http://hg.videolan.org/x265/rev/d1cd52bb3461
branches:  
changeset: 6267:d1cd52bb3461
user:      Steve Borho <steve at borho.org>
date:      Sat Feb 22 19:00:07 2014 -0600
description:
encoder: use more frame threads when WPP is disabled

Use up to one frame thread per CPU, but cap the frame threads at half the
number of CTU rows.  Any more frame threads than that is generally counter-
productive.

diffstat:

 source/Lib/TLibCommon/NAL.h |  2 ++
 source/common/common.cpp    |  2 +-
 source/encoder/encoder.cpp  |  6 ++++--
 3 files changed, 7 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 734f106295df -r d1cd52bb3461 source/Lib/TLibCommon/NAL.h
--- a/source/Lib/TLibCommon/NAL.h	Sat Feb 22 15:59:39 2014 -0600
+++ b/source/Lib/TLibCommon/NAL.h	Sat Feb 22 19:00:07 2014 -0600
@@ -49,6 +49,8 @@ struct NALUnit
     uint32_t    m_temporalId;        ///< temporal_id
     uint32_t    m_reservedZero6Bits; ///< reserved_zero_6bits
 
+    NALUnit() : m_nalUnitType(NAL_UNIT_INVALID), m_temporalId(0), m_reservedZero6Bits(0){}
+
     NALUnit(NalUnitType nalUnitType)
     {
         m_nalUnitType = nalUnitType;
diff -r 734f106295df -r d1cd52bb3461 source/common/common.cpp
--- a/source/common/common.cpp	Sat Feb 22 15:59:39 2014 -0600
+++ b/source/common/common.cpp	Sat Feb 22 19:00:07 2014 -0600
@@ -793,7 +793,7 @@ int x265_param_parse(x265_param *p, cons
     {
         char *c;
         strcpy(nameBuf, name);
-        while ((c = strchr(nameBuf, '_')))
+        while ((c = strchr(nameBuf, '_')) != 0)
         {
             *c = '-';
         }
diff -r 734f106295df -r d1cd52bb3461 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Sat Feb 22 15:59:39 2014 -0600
+++ b/source/encoder/encoder.cpp	Sat Feb 22 19:00:07 2014 -0600
@@ -1269,9 +1269,11 @@ void Encoder::configure(x265_param *_par
 
     if (_param->frameNumThreads == 0)
     {
+        // auto-detect frame threads
         int cpuCount = getCpuCount();
-        // auto-detect frame threads
-        if (cpuCount > 32)
+        if (poolThreadCount <= 1)
+            _param->frameNumThreads = X265_MIN(cpuCount, rows / 2);
+        else if (cpuCount > 32)
             _param->frameNumThreads = 6; // dual-socket 10-core IvyBridge or higher
         else if (cpuCount >= 16)
             _param->frameNumThreads = 5; // 8 HT cores, or dual socket


More information about the x265-commits mailing list