[x265] [PATCH] Fix for deltaWeight assert failure in Decoder

shazeb at multicorewareinc.com shazeb at multicorewareinc.com
Thu Dec 12 13:09:14 CET 2013


# HG changeset patch
# User Shazeb Nawaz Khan <shazeb at multicorewareinc.com>
# Date 1386850105 -19800
#      Thu Dec 12 17:38:25 2013 +0530
# Node ID d2edb2f7e472e9ebd75f6dc575f78b0364edcce7
# Parent  a87f12ebb55bc565fb3fa428471c5343c0125198
Fix for deltaWeight assert failure in Decoder

diff -r a87f12ebb55b -r d2edb2f7e472 source/Lib/TLibEncoder/WeightPredAnalysis.cpp
--- a/source/Lib/TLibEncoder/WeightPredAnalysis.cpp	Wed Dec 11 15:37:02 2013 -0600
+++ b/source/Lib/TLibEncoder/WeightPredAnalysis.cpp	Thu Dec 12 17:38:25 2013 +0530
@@ -254,7 +254,7 @@
                 // Weighting factor limitation
                 int defaultWeight = (1 << log2Denom);
                 int deltaWeight = (defaultWeight - weight);
-                if (deltaWeight > 127 || deltaWeight < -128)
+                if (deltaWeight > 127 || deltaWeight <= -128)
                     return false;
 
                 m_wp[list][refIdxTemp][comp].bPresentFlag = true;


More information about the x265-devel mailing list