[x265-commits] [x265] slicetype: avoid bonded task group if lookahead slices no...
Steve Borho
steve at borho.org
Tue Feb 24 05:14:04 CET 2015
details: http://hg.videolan.org/x265/rev/2b0aa19193a1
branches:
changeset: 9401:2b0aa19193a1
user: Steve Borho <steve at borho.org>
date: Mon Feb 23 21:36:47 2015 -0600
description:
slicetype: avoid bonded task group if lookahead slices not in use
Subject: [x265] slicetype: only count intraMbs when estimating P slices
details: http://hg.videolan.org/x265/rev/271acc8a8115
branches:
changeset: 9402:271acc8a8115
user: Steve Borho <steve at borho.org>
date: Mon Feb 23 21:55:39 2015 -0600
description:
slicetype: only count intraMbs when estimating P slices
diffstat:
source/encoder/slicetype.cpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r 910e091d045a -r 271acc8a8115 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp Mon Feb 23 20:07:11 2015 -0600
+++ b/source/encoder/slicetype.cpp Mon Feb 23 21:55:39 2015 -0600
@@ -1882,8 +1882,7 @@ int64_t CostEstimateGroup::estimateFrame
fenc->costEst[b - p0][p1 - b] = 0;
fenc->costEstAq[b - p0][p1 - b] = 0;
- ThreadPool* pool = m_lookahead.m_pool;
- if (!m_batchMode && pool && pool->m_numWorkers > 2 && ((p1 > b) || bDoSearch[0] || bDoSearch[1]))
+ if (!m_batchMode && m_lookahead.m_numCoopSlices > 1 && ((p1 > b) || bDoSearch[0] || bDoSearch[1]))
{
/* Use cooperative mode if a thread pool is available and the cost estimate is
* going to need motion searches or bidir measurements */
@@ -1911,7 +1910,8 @@ int64_t CostEstimateGroup::estimateFrame
{
fenc->costEst[b - p0][p1 - b] += m_slice[i].costEst;
fenc->costEstAq[b - p0][p1 - b] += m_slice[i].costEstAq;
- fenc->intraMbs[b - p0] += m_slice[i].intraMbs;
+ if (p1 == b)
+ fenc->intraMbs[b - p0] += m_slice[i].intraMbs;
}
}
else
@@ -2063,14 +2063,14 @@ void CostEstimateGroup::estimateCUCost(L
{
fenc->costEst[b - p0][p1 - b] += bcost;
fenc->costEstAq[b - p0][p1 - b] += bcostAq;
- if (!listused)
+ if (!listused && !bBidir)
fenc->intraMbs[b - p0]++;
}
else
{
m_slice[slice].costEst += bcost;
m_slice[slice].costEstAq += bcostAq;
- if (!listused)
+ if (!listused && !bBidir)
m_slice[slice].intraMbs++;
}
}
More information about the x265-commits
mailing list