[x265] [PATCH] fix non-determination output after apply new preset parameter sets

Min Chen chenm003 at 163.com
Thu Dec 31 22:18:53 CET 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1451594594 21600
# Node ID e5abd9b22f52fb8800068a2c699aea1648b69f54
# Parent  fb58aa76a9ae1eb6b0bac37f34bc418ba2ce941c
fix non-determination output after apply new preset parameter sets
---
 source/encoder/analysis.cpp |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff -r fb58aa76a9ae -r e5abd9b22f52 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Thu Dec 31 12:54:33 2015 -0600
+++ b/source/encoder/analysis.cpp	Thu Dec 31 14:43:14 2015 -0600
@@ -836,6 +836,14 @@
     splitData[2].initSplitCUData();
     splitData[3].initSplitCUData();
 
+    // avoid uninitialize value in below reference
+    if (m_param->limitModes)
+    {
+        md.pred[PRED_2Nx2N].bestME[0][0].mvCost = 0; // L0
+        md.pred[PRED_2Nx2N].bestME[0][1].mvCost = 0; // L1
+        md.pred[PRED_2Nx2N].rdCost = 0;
+    }
+
     /* Step 1. Evaluate Merge/Skip candidates for likely early-outs */
     if (mightNotSplit && depth >= minDepth)
     {
@@ -1304,6 +1312,14 @@
     bool foundSkip = false;
     bool splitIntra = true;
 
+    // avoid uninitialize value in below reference
+    if (m_param->limitModes)
+    {
+        md.pred[PRED_2Nx2N].bestME[0][0].mvCost = 0; // L0
+        md.pred[PRED_2Nx2N].bestME[0][1].mvCost = 0; // L1
+        md.pred[PRED_2Nx2N].rdCost = 0;
+    }
+
     if (m_param->analysisMode == X265_ANALYSIS_LOAD)
     {
         uint8_t* reuseDepth  = &m_reuseInterDataCTU->depth[parentCTU.m_cuAddr * parentCTU.m_numPartitions];



More information about the x265-devel mailing list