From: jzhou Date: Thu, 5 Aug 2010 18:33:41 +0000 (+0000) Subject: fix some bug found by Yonghun X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a9a0db766b1255e86b9b680a6098df7b0adff78c;p=IRC.git fix some bug found by Yonghun --- diff --git a/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java b/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java index 447dee92..fc969431 100644 --- a/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java +++ b/Robust/src/Benchmarks/Scheduling/Tracking/BlurPiece.java @@ -17,16 +17,19 @@ public class BlurPiece { /* id indicating the piece # */ int m_id; int m_range; + int m_pnum; /* constructor */ public BlurPiece(int id, int range, - int[] data) { + int[] data, + int pnum) { this.m_id = id; this.m_range = range; this.m_image = data; this.m_rows = data[0]; this.m_cols = data[1]; + this.m_pnum = pnum; } public int getId() { @@ -75,6 +78,9 @@ public class BlurPiece { if(rows < this.m_rows_re) { this.m_rows_re = rows; } + if(this.m_id == this.m_pnum - 1) { + this.m_rows_re = rows; + } this.m_cols_r = this.m_cols; image = this.m_result = new float[(this.m_rows_re-this.m_rows_rs)*cols]; @@ -104,10 +110,9 @@ public class BlurPiece { int ii = startRow - this.m_rows_rs; for(i=startRow; i= srtdPnts[supId[i] * cols_sp + 2]) { - t = srtdPnts[supId[i] * cols_sp + 0] - interestPnts[rows1 * cols1 + 0]; - t1 = srtdPnts[supId[i] * cols_sp + 1] - interestPnts[rows1 * cols1 + 1]; + >= srtdPnts[i * cols_sp + 2]) { + t = srtdPnts[i * cols_sp + 0] - interestPnts[rows1 * cols1 + 0]; + t1 = srtdPnts[i * cols_sp + 1] - interestPnts[rows1 * cols1 + 1]; t = t * t + t1 * t1; t1 = (float)0; } if ((C_ROBUST * interestPnts[rows1 * cols1 + 2]) - < srtdPnts[supId[i] * cols_sp + 2]) { + < srtdPnts[i * cols_sp + 2]) { t1 = (float)1 * (float)MAX_LIMIT; } - if (suppressR[supId[i]] > (t + t1)) { - suppressR[supId[i]] = t + t1; + if (suppressR[i] > (t + t1)) { + suppressR[i] = t + t1; } } @@ -911,6 +910,9 @@ public class TrackDemo { rows_v = 1; cols_v = nFeatures; valid = new int[rows_v * cols_v]; + for(int valid_idx=0;valid_idx