[x265] [PATCH] Consider rounded width, height for ssd calculation

shazeb at multicorewareinc.com shazeb at multicorewareinc.com
Thu Dec 19 13:17:23 CET 2013


# HG changeset patch
# User Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
# Date 1387455436 -19800
#      Thu Dec 19 17:47:16 2013 +0530
# Node ID 8133378e225020dbdd747d42a021588bef679ec3
# Parent  146051557e0db01d9bedb8778e83a3729a2cf4bc
Consider rounded width, height for ssd calculation

diff -r 146051557e0d -r 8133378e2250 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Thu Dec 19 11:05:42 2013 +0530
+++ b/source/encoder/ratecontrol.cpp	Thu Dec 19 17:47:16 2013 +0530
@@ -148,6 +148,8 @@
     {
         int hShift = CHROMA_H_SHIFT(cfg->param.internalCsp);
         int vShift = CHROMA_V_SHIFT(cfg->param.internalCsp);
+        maxCol = ((maxCol + 8) >> 4) << 4;
+        maxRow = ((maxRow + 8) >> 4) << 4;
         int width[3]  = { maxCol, maxCol >> hShift, maxCol >> hShift };
         int height[3] = { maxRow, maxRow >> vShift, maxRow >> vShift };
 


More information about the x265-devel mailing list