# HG changeset patch
# User Ashok Kumar Mishra <[email protected]>
# 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;
             }            
 
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to