diff options
Diffstat (limited to 'SD-VBS/common/c/isMinus.c')
| -rw-r--r-- | SD-VBS/common/c/isMinus.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/SD-VBS/common/c/isMinus.c b/SD-VBS/common/c/isMinus.c new file mode 100644 index 0000000..da0eb89 --- /dev/null +++ b/SD-VBS/common/c/isMinus.c | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include "sdvbs_common.h" | ||
| 8 | |||
| 9 | I2D* isMinus(I2D* a, int b) | ||
| 10 | { | ||
| 11 | I2D *c; | ||
| 12 | int i, j, rows, cols; | ||
| 13 | |||
| 14 | rows = a->height; | ||
| 15 | cols = a->width; | ||
| 16 | |||
| 17 | c = iMallocHandle(rows, cols); | ||
| 18 | |||
| 19 | for(i=0; i<(rows*cols); i++) | ||
| 20 | asubsref(c,i) = asubsref(a,i) - b; | ||
| 21 | |||
| 22 | return c; | ||
| 23 | } | ||
