Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/orc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-06-10 03:14:32 +0400
committerDavid Schleef <ds@schleef.org>2010-06-10 03:19:49 +0400
commit27c572f26b36105a71bdbddcc07318dd2b158c53 (patch)
tree97592fede4edfd31c305423715c641ad82d852f5 /examples
parent8f2cc55f745d1e9ed6874087c679b03746e3de5b (diff)
convert from stdint types to orc types
Diffstat (limited to 'examples')
-rw-r--r--examples/example1.c10
-rw-r--r--examples/mt19937ar.c6
-rw-r--r--examples/volscale.c30
3 files changed, 23 insertions, 23 deletions
diff --git a/examples/example1.c b/examples/example1.c
index 0d21b75..ad1630d 100644
--- a/examples/example1.c
+++ b/examples/example1.c
@@ -6,11 +6,11 @@
#define N 10
-int16_t a[N];
-int16_t b[N];
-int16_t c[N];
+orc_int16 a[N];
+orc_int16 b[N];
+orc_int16 c[N];
-void add_s16(int16_t *dest, int16_t *src1, int16_t *src2, int n);
+void add_s16(orc_int16 *dest, orc_int16 *src1, orc_int16 *src2, int n);
int
@@ -39,7 +39,7 @@ main (int argc, char *argv[])
}
void
-add_s16(int16_t *dest, int16_t *src1, int16_t *src2, int n)
+add_s16(orc_int16 *dest, orc_int16 *src1, orc_int16 *src2, int n)
{
static OrcProgram *p = NULL;
OrcExecutor _ex;
diff --git a/examples/mt19937ar.c b/examples/mt19937ar.c
index f23b50e..604abbf 100644
--- a/examples/mt19937ar.c
+++ b/examples/mt19937ar.c
@@ -57,12 +57,12 @@
/* mag01[x] = x * MATRIX_A for x=0,1 */
-static const uint32_t mag01[2]={0x0UL, MATRIX_A};
+static const orc_uint32 mag01[2]={0x0UL, MATRIX_A};
void
-mt19937_ref (uint32_t *d, uint32_t *mt)
+mt19937_ref (orc_uint32 *d, orc_uint32 *mt)
{
- uint32_t y;
+ orc_uint32 y;
int kk;
for (kk=0;kk<N-M;kk++) {
diff --git a/examples/volscale.c b/examples/volscale.c
index 1f02b99..f60ba9c 100644
--- a/examples/volscale.c
+++ b/examples/volscale.c
@@ -86,7 +86,7 @@ sse_register_rules (void)
static void
mulhslw (OrcOpcodeExecutor *ex, void *user)
{
- int32_t src, sl, sh, scale;
+ orc_int32 src, sl, sh, scale;
scale = ex->src_values[0];
src = ex->src_values[1];
@@ -94,7 +94,7 @@ mulhslw (OrcOpcodeExecutor *ex, void *user)
sh = scale >> 16;
sl = scale & 0xffff;
- ex->dest_values[0] = (int32_t) ((src * sl) >> 16) + (src * sh);
+ ex->dest_values[0] = (orc_int32) ((src * sl) >> 16) + (src * sh);
}
static OrcStaticOpcode opcodes[] = {
@@ -112,19 +112,19 @@ register_instr (void)
}
static void
-do_volume_c (int16_t *dest, const int32_t *vols, const int16_t *samp, int len)
+do_volume_c (orc_int16 *dest, const orc_int32 *vols, const orc_int16 *samp, int len)
{
int i;
for (i = 0; i < len; i++) {
- int32_t t, hi, lo;
+ orc_int32 t, hi, lo;
hi = vols[i] >> 16;
lo = vols[i] & 0xffff;
- t = (int32_t)(samp[i]);
+ t = (orc_int32)(samp[i]);
t = ((t * lo) >> 16) + (t * hi);
- dest[i] = (int16_t) ORC_CLAMP (t, -0x8000, 0x7FFF);
+ dest[i] = (orc_int16) ORC_CLAMP (t, -0x8000, 0x7FFF);
}
}
@@ -132,9 +132,9 @@ do_volume_c (int16_t *dest, const int32_t *vols, const int16_t *samp, int len)
static void
do_volume_backup (OrcExecutor *ex)
{
- int16_t *dest;
- int32_t *vols;
- const int16_t *samp;
+ orc_int16 *dest;
+ orc_int32 *vols;
+ const orc_int16 *samp;
int len;
dest = ex->arrays[ORC_VAR_D1];
@@ -174,7 +174,7 @@ make_volume_orc()
}
static void
-do_volume_orc (int16_t *dest, int32_t *volumes, int16_t *samp, int length)
+do_volume_orc (orc_int16 *dest, orc_int32 *volumes, orc_int16 *samp, int length)
{
OrcExecutor _ex;
OrcExecutor *ex = &_ex;
@@ -191,7 +191,7 @@ do_volume_orc (int16_t *dest, int32_t *volumes, int16_t *samp, int length)
orc_executor_run (ex);
}
-static uint64_t
+static orc_uint64
get_timestamp ()
{
#ifndef _MSC_VER
@@ -208,15 +208,15 @@ get_timestamp ()
#define TIMES 100000
#define N 1024
-int16_t dest[N];
-int16_t samp[N];
-int32_t vols[N];
+orc_int16 dest[N];
+orc_int16 samp[N];
+orc_int32 vols[N];
int
main (int argc, char *argv[])
{
int i;
- uint64_t start, stop;
+ orc_uint64 start, stop;
/* orc_init() must be called before any other Orc function */
orc_init ();