[x265] [PATCH] rc : bug fix for quality drop with larger number of frame threads

Aarthi Thirumalai aarthi at multicorewareinc.com
Fri Oct 4 13:30:40 CEST 2013


# HG changeset patch
# User Aarthi Thirumalai
# Date 1380886221 -19800
#      Fri Oct 04 17:00:21 2013 +0530
# Node ID 517165b4294244d18f6be7b137549e09652663ac
# Parent  ed4f57163274364e419dabfa4f864aa5a48cab6b
rc : bug fix for quality drop with larger number of frame threads.

diff -r ed4f57163274 -r 517165b42942 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Fri Oct 04 16:50:04 2013 +0530
+++ b/source/encoder/ratecontrol.cpp	Fri Oct 04 17:00:21 2013 +0530
@@ -191,7 +191,7 @@
     }
     else
     {
-        double abrBuffer = 0.9 * rateTolerance * bitrate;
+        double abrBuffer = 1.5 * rateTolerance * bitrate ;
 
         /* 1pass ABR */
 
@@ -264,6 +264,7 @@
                 if (overflow > 1.5)
                     rfAdapt = 2;
                 lqmax *= pow(lstep, rfAdapt);
+                lqmin /= pow(lstep, rfAdapt / frameThreads);
             }
             else if (overflow < 0.9)
             {


More information about the x265-devel mailing list