diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
| commit | 14c854543b1a3cf344a371a5b45595657f95786b (patch) | |
| tree | 70f752880522e5e44669af365754ac0f649dce81 /SD-VBS/benchmarks/disparity/src | |
| parent | 5e2ccfae0532ddd89bcc04bf14aad451e9c79785 (diff) | |
add deadlines and costs
Diffstat (limited to 'SD-VBS/benchmarks/disparity/src')
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/computeSAD.c | 27 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/correlateSAD_2D.c | 34 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/disparity.h | 24 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/finalSAD.c | 28 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/findDisparity.c | 29 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/getDisparity.c | 43 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/integralImage2D2D.c | 31 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/padarray2.c | 33 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/padarray4.c | 41 | ||||
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/script_disparity.c | 129 |
10 files changed, 0 insertions, 419 deletions
diff --git a/SD-VBS/benchmarks/disparity/src/c/computeSAD.c b/SD-VBS/benchmarks/disparity/src/c/computeSAD.c deleted file mode 100644 index e12bd55..0000000 --- a/SD-VBS/benchmarks/disparity/src/c/computeSAD.c +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "disparity.h" | ||
| 8 | |||
| 9 | void computeSAD(I2D *Ileft, I2D* Iright_moved, F2D* SAD) | ||
| 10 | { | ||
| 11 | int rows, cols, i, j, diff; | ||
| 12 | |||
| 13 | rows = Ileft->height; | ||
| 14 | cols = Ileft->width; | ||
| 15 | |||
| 16 | for(i=0; i<rows; i++) | ||
| 17 | { | ||
| 18 | for(j=0; j<cols; j++) | ||
| 19 | { | ||
| 20 | diff = subsref(Ileft,i,j) - subsref(Iright_moved,i,j); | ||
| 21 | subsref(SAD,i,j) = diff * diff; | ||
| 22 | } | ||
| 23 | } | ||
| 24 | |||
| 25 | return; | ||
| 26 | } | ||
| 27 | |||
diff --git a/SD-VBS/benchmarks/disparity/src/c/correlateSAD_2D.c b/SD-VBS/benchmarks/disparity/src/c/correlateSAD_2D.c deleted file mode 100644 index 6b43cbd..0000000 --- a/SD-VBS/benchmarks/disparity/src/c/correlateSAD_2D.c +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "disparity.h" | ||
| 8 | |||
| 9 | void correlateSAD_2D(I2D* Ileft, I2D* Iright, I2D* Iright_moved, int win_sz, int disparity, F2D* SAD, F2D* integralImg, F2D* retSAD, I2D* range) | ||
| 10 | { | ||
| 11 | int rows, cols; | ||
| 12 | int i, j, endRM; | ||
| 13 | //I2D *range; | ||
| 14 | |||
| 15 | //iResetArray(range,1,2,0); | ||
| 16 | subsref(range,0,0) = 0; | ||
| 17 | subsref(range,0,1) = disparity; | ||
| 18 | |||
| 19 | rows = Iright_moved->height; | ||
| 20 | cols = Iright_moved->width; | ||
| 21 | |||
| 22 | for(i=0; i<rows*cols; i++) | ||
| 23 | asubsref(Iright_moved,i) = 0; | ||
| 24 | |||
| 25 | padarray4(Iright, range, -1, Iright_moved); | ||
| 26 | |||
| 27 | computeSAD(Ileft, Iright_moved, SAD); | ||
| 28 | integralImage2D2D(SAD, integralImg); | ||
| 29 | finalSAD(integralImg, win_sz, retSAD); | ||
| 30 | |||
| 31 | //iFreeHandle(range); | ||
| 32 | return; | ||
| 33 | } | ||
| 34 | |||
diff --git a/SD-VBS/benchmarks/disparity/src/c/disparity.h b/SD-VBS/benchmarks/disparity/src/c/disparity.h deleted file mode 100644 index 8617a87..0000000 --- a/SD-VBS/benchmarks/disparity/src/c/disparity.h +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #ifndef _DISP_ | ||
| 6 | #define _DISP_ | ||
| 7 | |||
| 8 | #include "sdvbs_common.h" | ||
| 9 | void computeSAD(I2D *Ileft, I2D* Iright_moved, F2D* SAD); | ||
| 10 | I2D* getDisparity(I2D* Ileft, I2D* Iright, int win_sz, int max_shift, | ||
| 11 | I2D* minSAD, I2D* retDisp, I2D* halfWin, | ||
| 12 | I2D* IrightPadded, I2D* IleftPadded, I2D* Iright_moved, | ||
| 13 | F2D* retSAD, F2D* SAD, F2D* integralImg, | ||
| 14 | I2D* range); | ||
| 15 | void finalSAD(F2D* integralImg, int win_sz, F2D* retSAD); | ||
| 16 | void findDisparity(F2D* retSAD, F2D* minSAD, I2D* retDisp, int level, int nr, int nc); | ||
| 17 | void integralImage2D2D(F2D* SAD, F2D* integralImg); | ||
| 18 | void correlateSAD_2D(I2D* Ileft, I2D* Iright, I2D* Iright_moved, int win_sz, int disparity, F2D* SAD, F2D* integralImg, F2D* retSAD, I2D* range); | ||
| 19 | I2D* padarray2(I2D* inMat, I2D* borderMat); | ||
| 20 | void padarray4(I2D* inMat, I2D* borderMat, int dir, I2D* paddedArray); | ||
| 21 | |||
| 22 | #endif | ||
| 23 | |||
| 24 | |||
diff --git a/SD-VBS/benchmarks/disparity/src/c/finalSAD.c b/SD-VBS/benchmarks/disparity/src/c/finalSAD.c deleted file mode 100644 index 8155820..0000000 --- a/SD-VBS/benchmarks/disparity/src/c/finalSAD.c +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "disparity.h" | ||
| 8 | |||
| 9 | void finalSAD(F2D* integralImg, int win_sz, F2D* retSAD) | ||
| 10 | { | ||
| 11 | int endR, endC; | ||
| 12 | int i, j, k; | ||
| 13 | |||
| 14 | endR = integralImg->height; | ||
| 15 | endC = integralImg->width; | ||
| 16 | |||
| 17 | k = 0; | ||
| 18 | for(j=0; j<(endC-win_sz); j++) | ||
| 19 | { | ||
| 20 | for(i=0; i<(endR-win_sz); i++) | ||
| 21 | { | ||
| 22 | subsref(retSAD,i,j) = subsref(integralImg,(win_sz+i),(j+win_sz)) + subsref(integralImg,(i+1) ,(j+1)) - subsref(integralImg,(i+1),(j+win_sz)) - subsref(integralImg,(win_sz+i),(j+1)); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | return; | ||
| 27 | } | ||
| 28 | |||
diff --git a/SD-VBS/benchmarks/disparity/src/c/findDisparity.c b/SD-VBS/benchmarks/disparity/src/c/findDisparity.c deleted file mode 100644 index 6335daf..0000000 --- a/SD-VBS/benchmarks/disparity/src/c/findDisparity.c +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "disparity.h" | ||
| 8 | |||
| 9 | void findDisparity(F2D* retSAD, F2D* minSAD, I2D* retDisp, int level, int nr, int nc) | ||
| 10 | { | ||
| 11 | int i, j, a, b; | ||
| 12 | |||
| 13 | for(i=0; i<nr; i++) | ||
| 14 | { | ||
| 15 | for(j=0; j<nc; j++) | ||
| 16 | { | ||
| 17 | a = subsref(retSAD,i,j); | ||
| 18 | b = subsref(minSAD,i,j); | ||
| 19 | if(a<b) | ||
| 20 | { | ||
| 21 | subsref(minSAD,i,j) = a; | ||
| 22 | subsref(retDisp,i,j) = level; | ||
| 23 | } | ||
| 24 | } | ||
| 25 | } | ||
| 26 | return; | ||
| 27 | } | ||
| 28 | |||
| 29 | |||
diff --git a/SD-VBS/benchmarks/disparity/src/c/getDisparity.c b/SD-VBS/benchmarks/disparity/src/c/getDisparity.c deleted file mode 100644 index 3246e97..0000000 --- a/SD-VBS/benchmarks/disparity/src/c/getDisparity.c +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "disparity.h" | ||
| 8 | |||
| 9 | I2D* getDisparity(I2D* Ileft, I2D* Iright, int win_sz, int max_shift, | ||
| 10 | I2D* minSAD, I2D* retDisp, I2D* halfWin, | ||
| 11 | I2D* IrightPadded, I2D* IleftPadded, I2D* Iright_moved, | ||
| 12 | F2D* retSAD, F2D* SAD, F2D* integralImg, | ||
| 13 | I2D* range) | ||
| 14 | { | ||
| 15 | int nr, nc, k; | ||
| 16 | int half_win_sz, rows, cols; | ||
| 17 | |||
| 18 | nr = Ileft->height; | ||
| 19 | nc = Ileft->width; | ||
| 20 | half_win_sz=win_sz/2; | ||
| 21 | |||
| 22 | |||
| 23 | fResetArray(minSAD, nr, nc, 255.0*255.0); | ||
