[x265] [PATCH] Fixed inconsistent output for parallel frames and slices when abr is enabled
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Thu Oct 5 14:02:40 CEST 2017
# HG changeset patch
# User Ashok Kumar Mishra <ashok at multicorewareinc.com>
# Date 1507204558 -19800
# Thu Oct 05 17:25:58 2017 +0530
# Node ID 4b95f82c9fb1f210d31acdd93370bfddbecea828
# Parent 0cdb464618ee43674de02557910a023522cc9a9c
Fixed inconsistent output for parallel frames and slices when abr is enabled
diff -r 0cdb464618ee -r 4b95f82c9fb1 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Mon Sep 25 10:31:17 2017 +0530
+++ b/source/encoder/frameencoder.cpp Thu Oct 05 17:25:58 2017 +0530
@@ -1730,6 +1730,7 @@
{
uint32_t rowCount = 0;
uint32_t maxRows = m_sliceBaseRow[sliceId + 1] - m_sliceBaseRow[sliceId];
+
if (!m_rce.encodeOrder)
rowCount = maxRows - 1;
else if ((uint32_t)m_rce.encodeOrder <= 2 * (m_param->fpsNum / m_param->fpsDenom))
@@ -1747,10 +1748,10 @@
}
else
{
- uint32_t startAddr = rowCount * numCols * sliceId;
- uint32_t finishAddr = startAddr + rowCount * numCols;
+ uint32_t startAddr = m_sliceBaseRow[sliceId] * numCols;
+ uint32_t finishAddr = startAddr + rowCount * numCols;
- for (uint32_t cuAddr = startAddr; cuAddr < finishAddr; cuAddr++)
+ for (uint32_t cuAddr = startAddr; cuAddr < finishAddr; cuAddr++)
m_rowSliceTotalBits[sliceId] += curEncData.m_cuStat[cuAddr].totalBits;
}
More information about the x265-devel
mailing list