[x265] [PATCH 1 of 2] aq : bug fix . extend border of TComPic::m_origPicYuv to a multiple of 16

aarthi at multicorewareinc.com aarthi at multicorewareinc.com
Tue Nov 5 16:45:16 CET 2013


# HG changeset patch
# User Aarthi Thirumalai<aarthi at multicorewareinc.com>
# Date 1383666119 -19800
#      Tue Nov 05 21:11:59 2013 +0530
# Node ID 00a0690f4e3efb69f80a5750ea3a7f0ec493e013
# Parent  ece7af249573a3965d21589f8e1d54a8e1cd2ce9
aq : bug fix . extend border of TComPic::m_origPicYuv to a multiple of 16
     when aqMode is enabled.

diff -r ece7af249573 -r 00a0690f4e3e source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Tue Nov 05 14:12:39 2013 +0530
+++ b/source/encoder/encoder.cpp	Tue Nov 05 21:11:59 2013 +0530
@@ -1122,6 +1122,11 @@
     //======== set pad size if width is not multiple of the minimum CU size =========
     uint32_t maxCUDepth = (uint32_t)g_convertToBit[_param->maxCUSize];
     uint32_t minCUDepth = (_param->maxCUSize >> (maxCUDepth - 1));
+
+    // Extend the width/height as multiples of 16.
+    if (minCUDepth < 16 && (param.rc.aqMode || param.bEnableWeightedPred))
+        minCUDepth = 16;
+
     if ((_param->sourceWidth % minCUDepth) != 0)
     {
         uint32_t padsize = 0;


More information about the x265-devel mailing list