[x265] fix CHECKED_BUILD
Satoshi Nakagawa
nakagawa424 at oki.com
Sun Sep 7 05:37:54 CEST 2014
# HG changeset patch
# User Satoshi Nakagawa <nakagawa424 at oki.com>
# Date 1410060921 -32400
# Sun Sep 07 12:35:21 2014 +0900
# Node ID 5bdb43ad058348fbe847b5c8e63ea9712a41c6a4
# Parent ed4c9acafc11ccdd9ea5221175a891e43e24b1cc
fix CHECKED_BUILD
diff -r ed4c9acafc11 -r 5bdb43ad0583 source/common/dct.cpp
--- a/source/common/dct.cpp Fri Sep 05 17:36:18 2014 -0700
+++ b/source/common/dct.cpp Sun Sep 07 12:35:21 2014 +0900
@@ -729,7 +729,7 @@
X265_CHECK(num <= 32 * 32, "dequant num %d too large\n", num);
X265_CHECK((num % 8) == 0, "dequant num %d not multiple of 8\n", num);
X265_CHECK(shift <= 10, "shift too large %d\n", shift);
- X265_CHECK(((int)coef & 31) == 0, "dequant coef buffer not aligned\n");
+ X265_CHECK(((intptr_t)coef & 31) == 0, "dequant coef buffer not aligned\n");
int add, coeffQ;
diff -r ed4c9acafc11 -r 5bdb43ad0583 source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Fri Sep 05 17:36:18 2014 -0700
+++ b/source/encoder/analysis.cpp Sun Sep 07 12:35:21 2014 +0900
@@ -1056,21 +1056,30 @@
copyYuv2Pic(pic, outBestCU->getAddr(), absPartIdx, depth);
}
+#if CHECKED_BUILD || _DEBUG
/* Assert if Best prediction mode is NONE
* Selected mode's RD-cost must be not MAX_INT64 */
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");
- if (m_rdCost.m_psyRd)
+ if (m_param->rdLevel > 1)
{
- X265_CHECK(outBestCU->m_totalPsyCost != MAX_INT64, "no best partition 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");
+ }
}
else
{
- X265_CHECK(outBestCU->m_totalRDCost != MAX_INT64, "no best partition cost\n");
+ X265_CHECK(outBestCU->m_sa8dCost != MAX_INT64, "no best partition cost\n");
}
}
+#endif
x265_emms();
}
More information about the x265-devel
mailing list