[x265-commits] [x265] quant: initialize qp to impossible value so first set alw...

Steve Borho steve at borho.org
Tue Aug 12 08:13:26 CEST 2014


details:   http://hg.videolan.org/x265/rev/8a7f4bb1d1be
branches:  
changeset: 7764:8a7f4bb1d1be
user:      Steve Borho <steve at borho.org>
date:      Tue Aug 12 01:11:39 2014 -0500
description:
quant: initialize qp to impossible value so first set always works

A bug spotted by valgrind

diffstat:

 source/common/quant.h |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 945e071f491f -r 8a7f4bb1d1be source/common/quant.h
--- a/source/common/quant.h	Tue Aug 12 12:28:00 2014 +0900
+++ b/source/common/quant.h	Tue Aug 12 01:11:39 2014 -0500
@@ -54,6 +54,8 @@ struct QpParam
     int per;
     int qp;
 
+    QpParam() : qp(MAX_INT) {}
+
     void setQpParam(int qpScaled)
     {
         if (qp != qpScaled)


More information about the x265-commits mailing list