[x265] [PATCH] analysis: check for proper cost
Satoshi Nakagawa
nakagawa424 at oki.com
Wed Aug 13 02:33:31 CEST 2014
# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1407889822 -32400
# Wed Aug 13 09:30:22 2014 +0900
# Node ID b284a0c71bb8c69b2bb2097d8ce4d50cfed6e41e
# Parent 8a7f4bb1d1be32fe668d410450c2e320ccae6098
analysis: check for proper cost
diff -r 8a7f4bb1d1be -r b284a0c71bb8 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Tue Aug 12 01:11:39 2014 -0500
+++ b/source/encoder/analysis.cpp Wed Aug 13 09:30:22 2014 +0900
@@ -1011,12 +1011,28 @@
/* Assert if Best prediction mode is NONE
* Selected mode's RD-cost must be not MAX_INT64 */
+#if CHECKED_BUILD || _DEBUG
if (bInsidePicture)
{
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_param->rdLevel > 1)
+ {
+ 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");
+ }
+ }
+ else
+ {
+ X265_CHECK(outBestCU->m_sa8dCost != MAX_INT64, "no best partition cost\n");
+ }
}
+#endif
x265_emms();
}
More information about the x265-devel
mailing list