[x265] [PATCH] stats: use input source pictures to calculate avgerage and max luma level

kavitha at multicorewareinc.com kavitha at multicorewareinc.com
Wed Aug 5 08:46:16 CEST 2015


# HG changeset patch
# User Kavitha Sampath <kavitha at multicorewareinc.com>
# Date 1438757018 -19800
#      Wed Aug 05 12:13:38 2015 +0530
# Node ID 3483e9cffd703c540f75068e358bb8261dd80165
# Parent  3fa7f6838098854de79d3800b2d775dabaf45705
stats: use input source pictures to calculate avgerage and max luma level

diff -r 3fa7f6838098 -r 3483e9cffd70 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp	Mon Aug 03 14:56:21 2015 -0500
+++ b/source/encoder/frameencoder.cpp	Wed Aug 05 12:13:38 2015 +0530
@@ -990,12 +990,12 @@
         }
         uint64_t ctuLumaLevel = 0;
         uint64_t ctuNoOfPixels = 0;
-        for (uint32_t i = 0; i < (best.reconYuv.m_size * best.reconYuv.m_size); i++)
+        for (uint32_t i = 0; i < (best.fencYuv->m_size * best.fencYuv->m_size); i++)
         {
-            ctuLumaLevel += *(best.reconYuv.m_buf[0] + i);
+            ctuLumaLevel += *(best.fencYuv->m_buf[0] + i);
             ctuNoOfPixels++;
-            if ((*(best.reconYuv.m_buf[0] + i)) > curRow.rowStats.maxLumaLevel)
-                curRow.rowStats.maxLumaLevel = *(best.reconYuv.m_buf[0] + i);
+            if ((*(best.fencYuv->m_buf[0] + i)) > curRow.rowStats.maxLumaLevel)
+                curRow.rowStats.maxLumaLevel = *(best.fencYuv->m_buf[0] + i);
         }
         curRow.rowStats.lumaLevel += (double)(ctuLumaLevel / ctuNoOfPixels);
 


More information about the x265-devel mailing list