<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 7:11 AM, Min Chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
# Date 1382616670 -28800<br>
# Node ID 31485d1c19051ac633bda3298f8b9c2dc762d928<br>
# Parent 8430c3486b416687a25e37c60090a2358ceec47e<br>
fix assert crash<br></blockquote><div><br></div><div>Folded into the patch which introduced the asserts</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff -r 8430c3486b41 -r 31485d1c1905 source/Lib/TLibCommon/TComTrQuant.cpp<br>
--- a/source/Lib/TLibCommon/TComTrQuant.cpp Thu Oct 24 19:55:58 2013 +0800<br>
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp Thu Oct 24 20:11:10 2013 +0800<br>
@@ -1032,8 +1032,11 @@<br>
const int size = (1 << log2BlockSize);<br>
const UInt* sigPos = &sigCoeffGroupFlag[(posYCG << log2BlockSize) + posXCG];<br>
<br>
- assert(sigPos[1] <= 1);<br>
- assert(sigPos[size] <= 1);<br>
+ if (posXCG < size - 1)<br>
+ assert(sigPos[1] <= 1);<br>
+<br>
+ if (posYCG < size - 1)<br>
+ assert(sigPos[size] <= 1);<br>
<br>
UInt sigRight = (sigPos[1]);<br>
UInt sigLower = (sigPos[size]);<br>
@@ -1358,8 +1361,11 @@<br>
const int size = (1 << log2BlockSize);<br>
const UInt* sigPos = &sigCoeffGroupFlag[(cgPosY << log2BlockSize) + cgPosX];<br>
<br>
- assert(sigPos[1] <= 1);<br>
- assert(sigPos[size] <= 1);<br>
+ if (cgPosX < size - 1)<br>
+ assert(sigPos[1] <= 1);<br>
+<br>
+ if (cgPosY < size - 1)<br>
+ assert(sigPos[size] <= 1);<br>
<br>
UInt sigRight = (cgPosX == size - 1) ? 0 : (sigPos[1]);<br>
UInt sigLower = (cgPosY == size - 1) ? 0 : (sigPos[size]);<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>