File: example3.c

package info (click to toggle)
orc 1%3A0.4.42-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,668 kB
  • sloc: ansic: 67,528; sh: 85; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
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
#include <stdlib.h>
#include "example3orc.h"

#define N 10

int
main (int argc, char *argv[])
{
  unsigned char *input_y = calloc(640*480, sizeof(unsigned char));
  unsigned char *input_u = calloc(320*240, sizeof(unsigned char));
  unsigned char *input_v = calloc(320*240, sizeof(unsigned char));
  unsigned int *output = malloc(640*480*sizeof(unsigned int));

  /* Call a function that uses Orc */
  convert_I420_AYUV (output, 1280*4, output + 640, 1280 * 4,
      input_y, 1280, input_y + 640, 1280,
      input_u, 320, input_v, 320,
      320, 240);

  free(output);
  free(input_v);
  free(input_u);
  free(input_y);
  return 0;
}