summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/c/isMinus.c
blob: da0eb89d9197e450d397d4416068e92a01feb68a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/********************************
Author: Sravanthi Kota Venkata
********************************/

#include <stdio.h>
#include <stdlib.h>
#include "sdvbs_common.h"

I2D* isMinus(I2D* a, int b)
{
    I2D *c;
    int i, j, rows, cols;

    rows = a->height;
    cols = a->width;

    c = iMallocHandle(rows, cols);
    
    for(i=0; i<(rows*cols); i++)
        asubsref(c,i) = asubsref(a,i) - b;

    return c;
}