[x265] [PATCH] analysis: check for proper cost

sumalatha at multicorewareinc.com sumalatha at multicorewareinc.com
Tue Aug 12 13:42:01 CEST 2014


# HG changeset patch
# User Sumalatha Polureddy<sumalatha at multicorewareinc.com>
# Date 1407843710 -19800
# Node ID 91ccff0ca74b0d1b81e3f31300e9b6b5241541df
# Parent  8a7f4bb1d1be32fe668d410450c2e320ccae6098
analysis: check for proper cost

Throws error when psyrd is enabled since cost is stored in m_totalPsyCost and m_totalRDCost has MAX_INT64

diff -r 8a7f4bb1d1be -r 91ccff0ca74b source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp	Tue Aug 12 01:11:39 2014 -0500
+++ b/source/encoder/analysis.cpp	Tue Aug 12 17:11:50 2014 +0530
@@ -1015,7 +1015,14 @@
     {
         X265_CHECK(outBestCU->getPartitionSize(0) != SIZE_NONE, "no best prediction size\n");
         X265_CHECK(outBestCU->getPredictionMode(0) != MODE_NONE, "no best prediction mode\n");
-        X265_CHECK(outBestCU->m_totalRDCost != MAX_INT64, "no best prediction cost\n");
+        if (m_rdCost.m_psyRd)
+        {
+            X265_CHECK(outBestCU->m_totalPsyCost != MAX_INT64, "no best partition cost\n");
+        }
+        else
+        {
+            X265_CHECK(outBestCU->m_totalRDCost != MAX_INT64, "no best partition cost\n");
+        }
     }
 
     x265_emms();


More information about the x265-devel mailing list