[x265-commits] [x265] Fixed inconsistent output for parallel frames and slices ...

Ashok Kumar Mishra ashok at multicorewareinc.com
Sat Oct 7 01:03:03 CEST 2017


details:   http://hg.videolan.org/x265/rev/4b95f82c9fb1
branches:  
changeset: 11887:4b95f82c9fb1
user:      Ashok Kumar Mishra <ashok at multicorewareinc.com>
date:      Thu Oct 05 17:25:58 2017 +0530
description:
Fixed inconsistent output for parallel frames and slices when abr is enabled

diffstat:

 source/encoder/frameencoder.cpp |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (25 lines):

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 @@ void FrameEncoder::processRowEncoder(int
     {
         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 @@ void FrameEncoder::processRowEncoder(int
             }
             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-commits mailing list