[x265] [PATCH] analysis: fix validation conditon for save/load encodes

bhavna at multicorewareinc.com bhavna at multicorewareinc.com
Fri Jun 15 13:54:58 CEST 2018


# HG changeset patch
# User Bhavna Hariharan <bhavna at multicorewareinc.com>
# Date 1529048000 -19800
#      Fri Jun 15 13:03:20 2018 +0530
# Node ID 34c3cf4263bddb1caab8c5c8088ae4614d432e35
# Parent  dac90ba6690a118b6e5aa4e7999e0abbbf06ee24
analysis: fix validation conditon for save/load encodes

diff -r dac90ba6690a -r 34c3cf4263bd source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Mon Jun 11 14:51:02 2018 +0530
+++ b/source/encoder/encoder.cpp	Fri Jun 15 13:03:20 2018 +0530
@@ -4113,10 +4113,12 @@
         if (!isScaledRes && (sourceHeight != curSourceHeight || sourceWidth != curSourceWidth 
                             || readValue != (int)m_param->maxCUSize || m_param->scaleFactor))
             error = true;
-        else if (isScaledRes && (!m_param->scaleFactor || (g_log2Size[m_param->maxCUSize] - g_log2Size[readValue]) != 1))
+        else if (isScaledRes && !m_param->scaleFactor)
             error = true;
         else if (isScaledRes && (int)m_param->maxCUSize == readValue)
             m_saveCTUSize = 1;
+        else if (isScaledRes && (g_log2Size[m_param->maxCUSize] - g_log2Size[readValue]) != 1)
+            error = true;
 
         if (error)
         {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265-clone.patch
Type: text/x-patch
Size: 1196 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180615/02ede3e7/attachment.bin>


More information about the x265-devel mailing list