[x265] [PATCH 2 of 2] ratecontrol: add check failure

deepthi at multicorewareinc.com deepthi at multicorewareinc.com
Mon Feb 23 12:25:09 CET 2015


# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1424690682 -19800
#      Mon Feb 23 16:54:42 2015 +0530
# Node ID d0ed002511777cd6db274a9356f3adf38a24785b
# Parent  5c0575c25628f98d8f7570a70bf942fecad4f7e0
ratecontrol: add check failure

diff -r 5c0575c25628 -r d0ed00251177 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Mon Feb 23 10:19:52 2015 +0530
+++ b/source/encoder/ratecontrol.cpp	Mon Feb 23 16:54:42 2015 +0530
@@ -1160,6 +1160,7 @@
             m_currentSatd = curFrame->m_lowres.satdCost >> (X265_DEPTH - 8);
             /* Update rce for use in rate control VBV later */
             rce->lastSatd = m_currentSatd;
+            X265_CHECK(rce->lastSatd, "satdcost cannot be zero\n");
         }
         double q = x265_qScale2qp(rateEstimateQscale(curFrame, rce));
         q = x265_clip3((double)QP_MIN, (double)QP_MAX_MAX, q);


More information about the x265-devel mailing list