summaryrefslogtreecommitdiffstats
path: root/SD-VBS/common/c/iTranspose.c
blob: 79b65d223eb1b3cb0ef0fdb6d095a2a23f3bb4c0 (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
24
25
26
/********************************
Author: Sravanthi Kota Venkata
********************************/

#include "sdvbs_common.h"

I2D* iTranspose(I2D* a)
{
    I2D *out;
    int m, p, p1, n, i, j, k;
    int temp;

    m = a->height;
    n = a->width;

    out = iMallocHandle(n, m);
    k = 0;
    for(i=0; i<n; i++)
    {
        for(j=0; j<m; j++)
            asubsref(out,k++) = subsref(a,j,i);
    }

    return out;
}