Clean up naming of VP9 support functions.
Change-Id: Ibfa931f3fb3a2ed2649733b7d7e679c0091dda90
diff --git a/driver/runtime/rs_dct.c b/driver/runtime/rs_dct.c
index 8e8dbb0..a28287a 100644
--- a/driver/runtime/rs_dct.c
+++ b/driver/runtime/rs_dct.c
@@ -392,7 +392,7 @@
output[31] = dct_32_round(step[31] * cospi_31_64 + step[16] * -cospi_1_64);
}
-extern void dct4x4(rs_allocation input, rs_allocation output, int xoff, int yoff) {
+extern void rsDct4x4(rs_allocation input, rs_allocation output, int xoff, int yoff) {
// The 2D transform is done with two passes which are actually pretty
// similar. In the first one, we transform the columns and transpose
// the results. In the second one, we transform the rows. To achieve that,
@@ -467,7 +467,7 @@
}
}
-extern void dct8x8(rs_allocation input, rs_allocation output, int xoff, int yoff) {
+extern void rsDct8x8(rs_allocation input, rs_allocation output, int xoff, int yoff) {
int i, j;
int16_t intermediate[64];
int16_t inptr[64];
@@ -553,7 +553,7 @@
}
-extern void dct16x16(rs_allocation input, rs_allocation output, int xoff, int yoff) {
+extern void rsDct16x16(rs_allocation input, rs_allocation output, int xoff, int yoff) {
// The 2D transform is done with two passes which are actually pretty
// similar. In the first one, we transform the columns and transpose
// the results. In the second one, we transform the rows. To achieve that,
@@ -748,7 +748,7 @@
}
}
-extern void dct32x32(rs_allocation input, rs_allocation out, int xoff, int yoff) {
+extern void rsDct32x32(rs_allocation input, rs_allocation out, int xoff, int yoff) {
int i, j;
int output[32 * 32];
int16_t inptr[1024];
@@ -792,7 +792,7 @@
// Note that although we use dct_32_round in dct32_1d computation flow,
// this 2d fdct32x32 for rate-distortion optimization loop is operating
// within 16 bits precision.
-extern void dct32x32_rd(rs_allocation input, rs_allocation out, int xoff, int yoff) {
+extern void rsDct32x32_rd(rs_allocation input, rs_allocation out, int xoff, int yoff) {
int i, j;
int output[32 * 32];
int16_t inptr[1024];
diff --git a/driver/runtime/rs_fadst.c b/driver/runtime/rs_fadst.c
index b3483b7..0698e1a 100644
--- a/driver/runtime/rs_fadst.c
+++ b/driver/runtime/rs_fadst.c
@@ -1,7 +1,7 @@
#include "rs_fadst.h"
#include "rs_allocation.rsh"
-extern void fadst4(const rs_allocation input, rs_allocation output, int32_t xoff) {
+extern void rsFadst4(const rs_allocation input, rs_allocation output, int32_t xoff) {
int x0, x1, x2, x3;
int s0, s1, s2, s3, s4, s5, s6, s7;
@@ -43,7 +43,7 @@
rsSetElementAt_short(output, fdct_round_shift(s3), xoff + 3);
}
-extern void fadst8(const rs_allocation input, rs_allocation output, int32_t xoff) {
+extern void rsFadst8(const rs_allocation input, rs_allocation output, int32_t xoff) {
int s0, s1, s2, s3, s4, s5, s6, s7;
int16_t outArr[8];
@@ -120,7 +120,7 @@
}
}
-extern void fadst16(const rs_allocation input, rs_allocation output, int32_t xoff) {
+extern void rsFadst16(const rs_allocation input, rs_allocation output, int32_t xoff) {
int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;
int16_t outArr[16];
diff --git a/driver/runtime/rs_iadst.c b/driver/runtime/rs_iadst.c
index ee1d0cf..ccb6fc0 100644
--- a/driver/runtime/rs_iadst.c
+++ b/driver/runtime/rs_iadst.c
@@ -1,7 +1,7 @@
#include "rs_iadst.h"
#include "rs_allocation.rsh"
-extern void iadst4(const rs_allocation input, rs_allocation output, int32_t xoff) {
+extern void rsIadst4(const rs_allocation input, rs_allocation output, int32_t xoff) {
int s0, s1, s2, s3, s4, s5, s6, s7;
int x0 = rsGetElementAt_short(input, xoff);
@@ -42,7 +42,7 @@
rsSetElementAt_short(output, dct_const_round_shift(s3), xoff + 3);
}
-extern void iadst8(const rs_allocation input, rs_allocation output, int32_t xoff) {
+extern void rsIadst8(const rs_allocation input, rs_allocation output, int32_t xoff) {
int s0, s1, s2, s3, s4, s5, s6, s7;
int16_t outArr[8];
@@ -131,7 +131,7 @@
}
}
-extern void iadst16(const rs_allocation input, rs_allocation output, int32_t xoff) {
+extern void rsIadst16(const rs_allocation input, rs_allocation output, int32_t xoff) {
int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;
int16_t outArr[16];
int i;
diff --git a/driver/runtime/rs_idct.c b/driver/runtime/rs_idct.c
index 575599f..7319bdf 100644
--- a/driver/runtime/rs_idct.c
+++ b/driver/runtime/rs_idct.c
@@ -22,7 +22,7 @@
output[3] = step[0] - step[3];
}
-void idct4x4_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct4x4_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int i, j;
int a1;
int16_t out = dct_const_round_shift(rsGetElementAt_short(input, xoff, yoff)
@@ -39,7 +39,7 @@
}
}
-void idct4x4_16(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct4x4_16(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int16_t out[4 * 4];
int16_t *outptr = out;
int i, j;
@@ -120,7 +120,7 @@
output[7] = step1[0] - step1[7];
}
-void idct8x8_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct8x8_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int i, j;
int a1;
int16_t out = dct_const_round_shift(rsGetElementAt_short(input, xoff, yoff)
@@ -137,7 +137,7 @@
}
}
-void idct8x8_10(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct8x8_10(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int16_t out[8 * 8] = { 0 };
int16_t *outptr = out;
int i, j;
@@ -173,7 +173,7 @@
}
}
-void idct8x8_64(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct8x8_64(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int16_t out[8 * 8];
int16_t *outptr = out;
int i, j;
@@ -373,7 +373,7 @@
output[15] = step2[0] - step2[15];
}
-void idct16x16_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct16x16_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int i, j;
int a1;
int16_t out = dct_const_round_shift(rsGetElementAt_short(input, xoff, yoff)
@@ -390,7 +390,7 @@
}
}
-void idct16x16_10(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct16x16_10(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int16_t out[16 * 16] = { 0 };
int16_t *outptr = out;
int i, j;
@@ -426,7 +426,7 @@
}
}
-void idct16x16_256(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct16x16_256(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int16_t out[16 * 16];
int16_t *outptr = out;
int i, j;
@@ -828,7 +828,7 @@
output[31] = step1[0] - step1[31];
}
-void idct32x32_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct32x32_1(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int i, j;
int a1;
int16_t out = dct_const_round_shift(rsGetElementAt_short(input, xoff, yoff)
@@ -844,7 +844,7 @@
}
}
-void idct32x32_34(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct32x32_34(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int16_t out[32 * 32] = { 0 };
int16_t *outptr = out;
int i, j;
@@ -880,7 +880,7 @@
}
}
-void idct32x32_1024(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+static void idct32x32_1024(const rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int16_t out[32 * 32];
int16_t *outptr = out;
int i, j;
@@ -928,7 +928,7 @@
}
}
-extern void idct4x4(const rs_allocation input, rs_allocation dest, int eob,
+extern void rsIdct4x4(const rs_allocation input, rs_allocation dest, int eob,
int xoff, int yoff) {
if (eob > 1) {
idct4x4_16(input, dest, xoff, yoff);
@@ -937,7 +937,7 @@
}
}
-extern void idct8x8(const rs_allocation input, rs_allocation dest, int eob,
+extern void rsIdct8x8(const rs_allocation input, rs_allocation dest, int eob,
int xoff, int yoff) {
if (eob == 1)
// DC only DCT coefficient
@@ -948,7 +948,7 @@
idct8x8_64(input, dest, xoff, yoff);
}
-extern void idct16x16(const rs_allocation input, rs_allocation dest, int eob,
+extern void rsIdct16x16(const rs_allocation input, rs_allocation dest, int eob,
int xoff, int yoff) {
if (eob == 1)
/* DC only DCT coefficient. */
@@ -959,7 +959,7 @@
idct16x16_256(input, dest, xoff, yoff);
}
-extern void idct32x32(const rs_allocation input, rs_allocation dest, int eob,
+extern void rsIdct32x32(const rs_allocation input, rs_allocation dest, int eob,
int xoff, int yoff) {
if (eob == 1)
idct32x32_1(input, dest, xoff, yoff);
diff --git a/driver/runtime/rs_walsh.c b/driver/runtime/rs_walsh.c
index 9d7630e..b3441af 100644
--- a/driver/runtime/rs_walsh.c
+++ b/driver/runtime/rs_walsh.c
@@ -1,7 +1,7 @@
#include "rs_types.rsh"
#include "rs_allocation.rsh"
-extern void walsh4x4(rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+extern void rsWalsh4x4(rs_allocation input, rs_allocation dest, int xoff, int yoff) {
short output[16];
int i, j;
int a1, b1, c1, d1;
@@ -56,7 +56,7 @@
}
-extern void walsh4x4_1(rs_allocation input, rs_allocation dest, int xoff, int yoff) {
+extern void rsWalsh4x4_1(rs_allocation input, rs_allocation dest, int xoff, int yoff) {
int i, j;
int a1;
int16_t inptr[16];
diff --git a/scriptc/rs_core.rsh b/scriptc/rs_core.rsh
index 9ff0190..0d3642e 100644
--- a/scriptc/rs_core.rsh
+++ b/scriptc/rs_core.rsh
@@ -60,11 +60,6 @@
#include "rs_quaternion.rsh"
#include "rs_sampler.rsh"
#include "rs_time.rsh"
-#include "rs_idct.rsh"
-#include "rs_dct.rsh"
-#include "rs_iadst.rsh"
-#include "rs_fadst.rsh"
-#include "rs_walsh.rsh"
/**
* Send a message back to the client. Will not block and returns true
diff --git a/scriptc/rs_dct.rsh b/scriptc/rs_dct.rsh
index 51e789d..d7289dd 100644
--- a/scriptc/rs_dct.rsh
+++ b/scriptc/rs_dct.rsh
@@ -3,11 +3,11 @@
#if RS_VERSION > 19
-extern void dct4x4(rs_allocation input, rs_allocation output, int xoff, int yoff);
-extern void dct8x8(rs_allocation input, rs_allocation output, int xoff, int yoff);
-extern void dct16x16(rs_allocation input, rs_allocation output, int xoff, int yoff);
-extern void dct32x32(rs_allocation input, rs_allocation out, int xoff, int yoff);
-extern void dct32x32_rd(rs_allocation input, rs_allocation out, int xoff, int yoff);
+extern void rsDct4x4(rs_allocation input, rs_allocation output, int xoff, int yoff);
+extern void rsDct8x8(rs_allocation input, rs_allocation output, int xoff, int yoff);
+extern void rsDct16x16(rs_allocation input, rs_allocation output, int xoff, int yoff);
+extern void rsDct32x32(rs_allocation input, rs_allocation out, int xoff, int yoff);
+extern void rsDct32x32_rd(rs_allocation input, rs_allocation out, int xoff, int yoff);
#endif
diff --git a/scriptc/rs_fadst.rsh b/scriptc/rs_fadst.rsh
index 6dc0170..1dfe58f 100644
--- a/scriptc/rs_fadst.rsh
+++ b/scriptc/rs_fadst.rsh
@@ -3,11 +3,11 @@
#if RS_VERSION > 19
-extern void fadst4(const rs_allocation input, rs_allocation output, int32_t xoff);
+extern void rsFadst4(const rs_allocation input, rs_allocation output, int32_t xoff);
-extern void fadst8(const rs_allocation input, rs_allocation output, int32_t xoff);
+extern void rsFadst8(const rs_allocation input, rs_allocation output, int32_t xoff);
-extern void fadst16(const rs_allocation input, rs_allocation output, int32_t xoff);
+extern void rsFadst16(const rs_allocation input, rs_allocation output, int32_t xoff);
#endif
diff --git a/scriptc/rs_iadst.rsh b/scriptc/rs_iadst.rsh
index dad396c..3208814 100644
--- a/scriptc/rs_iadst.rsh
+++ b/scriptc/rs_iadst.rsh
@@ -3,11 +3,11 @@
#if RS_VERSION > 19
-extern void iadst4(const rs_allocation input, rs_allocation output, int32_t xoff);
+extern void rsIadst4(const rs_allocation input, rs_allocation output, int32_t xoff);
-extern void iadst8(const rs_allocation input, rs_allocation output, int32_t xoff);
+extern void rsIadst8(const rs_allocation input, rs_allocation output, int32_t xoff);
-extern void iadst16(const rs_allocation input, rs_allocation output, int32_t xoff);
+extern void rsIadst16(const rs_allocation input, rs_allocation output, int32_t xoff);
#endif
diff --git a/scriptc/rs_idct.rsh b/scriptc/rs_idct.rsh
index e379736..d602e34 100644
--- a/scriptc/rs_idct.rsh
+++ b/scriptc/rs_idct.rsh
@@ -3,10 +3,10 @@
#if RS_VERSION > 19
-extern void idct4x4(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
-extern void idct8x8(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
-extern void idct16x16(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
-extern void idct32x32(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
+extern void rsIdct4x4(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
+extern void rsIdct8x8(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
+extern void rsIdct16x16(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
+extern void rsIdct32x32(const rs_allocation input, rs_allocation dest, int eob, int xoff, int yoff);
#endif
diff --git a/scriptc/rs_vp9.rsh b/scriptc/rs_vp9.rsh
new file mode 100644
index 0000000..52fbe81
--- /dev/null
+++ b/scriptc/rs_vp9.rsh
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __RS_VP9_RSH__
+#define __RS_VP9_RSH__
+
+
+#include "rs_idct.rsh"
+#include "rs_dct.rsh"
+#include "rs_iadst.rsh"
+#include "rs_fadst.rsh"
+#include "rs_walsh.rsh"
+
+#endif
+
diff --git a/scriptc/rs_walsh.rsh b/scriptc/rs_walsh.rsh
index de058ce..6f7445d 100644
--- a/scriptc/rs_walsh.rsh
+++ b/scriptc/rs_walsh.rsh
@@ -3,8 +3,8 @@
#if RS_VERSION > 19
-extern void walsh4x4(rs_allocation input, rs_allocation dest, int xoff, int yoff);
-extern void walsh4x4_1(rs_allocation input, rs_allocation dest, int xoff, int yoff);
+extern void rsWalsh4x4(rs_allocation input, rs_allocation dest, int xoff, int yoff);
+extern void rsWalsh4x4_1(rs_allocation input, rs_allocation dest, int xoff, int yoff);
#endif