[x265] [PATCH] rc: bug fix for variance data calculation for weighted prediction when aq-mode is disable

Gopu Govindaswamy gopu at multicorewareinc.com
Tue Dec 17 06:20:11 CET 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1387257603 -19800
# Node ID 6f1a39a9e886cf7c7a9ccf2948ca3e87d45abb12
# Parent  baf811614a7a25816aa5a7a631966e1cd392518c
rc: bug fix for variance data calculation for weighted prediction when aq-mode is disable

diff -r baf811614a7a -r 6f1a39a9e886 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Mon Dec 16 17:42:07 2013 +0530
+++ b/source/encoder/ratecontrol.cpp	Tue Dec 17 10:50:03 2013 +0530
@@ -120,9 +120,9 @@
          /* Need variance data for weighted prediction */
         if (cfg->param.bEnableWeightedPred)
         {
-            for (int cuy = 0; cuy < maxRow; cuy++ )
-                for (int cux = 0; cux < maxCol; cux++ )
-                    acEnergyCu(pic, cux, cuy);
+            for (block_y = 0; block_y < maxRow; block_y += 16)
+                for (block_x = 0; block_x < maxCol; block_x += 16)
+                    acEnergyCu(pic, block_x, block_y);
         }
 
     }
@@ -601,10 +601,7 @@
 
     if (cfg->param.rc.cuTree)
     {
-        double scale = curSlice->getSPS()->getVuiParameters()->getTimingInfo()->getTimeScale();
-        double units = curSlice->getSPS()->getVuiParameters()->getTimingInfo()->getNumUnitsInTick();
-        double timescale = units / scale;
-        q = pow(BASE_FRAME_DURATION / CLIP_DURATION(2 * timescale), 1 - cfg->param.rc.qCompress);
+        q = pow(BASE_FRAME_DURATION / CLIP_DURATION(2 * frameDuration), 1 - cfg->param.rc.qCompress);
     }
     else
         q = pow(rce->blurredComplexity, 1 - cfg->param.rc.qCompress);


More information about the x265-devel mailing list