Merge "Refactor mips/dspr2 on convolution."
diff --git a/vp9/common/mips/dspr2/vp9_common_dspr2.c b/vp9/common/mips/dspr2/vp9_common_dspr2.c
new file mode 100644
index 0000000..6498a7e
--- /dev/null
+++ b/vp9/common/mips/dspr2/vp9_common_dspr2.c
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
+#include "vpx_dsp/vpx_dsp_common.h"
+#include "vpx_ports/mem.h"
+
+#if HAVE_DSPR2
+uint8_t vp9_ff_cropTbl_a[256 + 2 * CROP_WIDTH];
+uint8_t *vp9_ff_cropTbl;
+
+void vp9_dsputil_static_init(void) {
+ int i;
+
+ for (i = 0; i < 256; i++) vp9_ff_cropTbl_a[i + CROP_WIDTH] = i;
+
+ for (i = 0; i < CROP_WIDTH; i++) {
+ vp9_ff_cropTbl_a[i] = 0;
+ vp9_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255;
+ }
+
+ vp9_ff_cropTbl = &vp9_ff_cropTbl_a[CROP_WIDTH];
+}
+
+#endif
diff --git a/vp9/common/mips/dspr2/vp9_common_dspr2.h b/vp9/common/mips/dspr2/vp9_common_dspr2.h
index cd07a56..4e6b355 100644
--- a/vp9/common/mips/dspr2/vp9_common_dspr2.h
+++ b/vp9/common/mips/dspr2/vp9_common_dspr2.h
@@ -22,7 +22,8 @@
#endif
#if HAVE_DSPR2
-extern uint8_t *vp9_ff_cropTbl;
+
+extern uint8_t *vpx_ff_cropTbl;
#define DCT_CONST_ROUND_SHIFT_TWICE_COSPI_16_64(input) ({ \
\
@@ -53,35 +54,6 @@
void vp9_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest,
int dest_stride);
-void vp9_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
- uint8_t *dst, ptrdiff_t dst_stride,
- const int16_t *filter_x, int x_step_q4,
- const int16_t *filter_y, int y_step_q4,
- int w, int h);
-
-void vp9_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
- uint8_t *dst, ptrdiff_t dst_stride,
- const int16_t *filter_x, int x_step_q4,
- const int16_t *filter_y, int y_step_q4,
- int w, int h);
-
-void vp9_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
- uint8_t *dst, ptrdiff_t dst_stride,
- const int16_t *filter_x, int x_step_q4,
- const int16_t *filter_y, int y_step_q4,
- int w, int h);
-
-void vp9_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride,
- uint8_t *dst, ptrdiff_t dst_stride,
- const int16_t *filter,
- int w, int h);
-
-void vp9_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
- uint8_t *dst, ptrdiff_t dst_stride,
- const int16_t *filter_x, int x_step_q4,
- const int16_t *filter_y, int y_step_q4,
- int w, int h);
-
#endif // #if HAVE_DSPR2
#ifdef __cplusplus
} // extern "C"
diff --git a/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c
index c4fa2a0..e7ca393 100644
--- a/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c
@@ -419,17 +419,17 @@
int result1, result2, result3, result4;
const int const_2_power_13 = 8192;
uint8_t *dest_pix;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
- /* prefetch vp9_ff_cropTbl */
- prefetch_load(vp9_ff_cropTbl);
- prefetch_load(vp9_ff_cropTbl + 32);
- prefetch_load(vp9_ff_cropTbl + 64);
- prefetch_load(vp9_ff_cropTbl + 96);
- prefetch_load(vp9_ff_cropTbl + 128);
- prefetch_load(vp9_ff_cropTbl + 160);
- prefetch_load(vp9_ff_cropTbl + 192);
- prefetch_load(vp9_ff_cropTbl + 224);
+ /* prefetch vpx_ff_cropTbl */
+ prefetch_load(vpx_ff_cropTbl);
+ prefetch_load(vpx_ff_cropTbl + 32);
+ prefetch_load(vpx_ff_cropTbl + 64);
+ prefetch_load(vpx_ff_cropTbl + 96);
+ prefetch_load(vpx_ff_cropTbl + 128);
+ prefetch_load(vpx_ff_cropTbl + 160);
+ prefetch_load(vpx_ff_cropTbl + 192);
+ prefetch_load(vpx_ff_cropTbl + 224);
for (i = 0; i < 16; ++i) {
dest_pix = (dest + i);
diff --git a/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c
index 37b50c5..48da85c 100644
--- a/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c
@@ -41,17 +41,17 @@
int i, temp21;
uint8_t *dest_pix, *dest_pix1;
const int const_2_power_13 = 8192;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
- /* prefetch vp9_ff_cropTbl */
- prefetch_load(vp9_ff_cropTbl);
- prefetch_load(vp9_ff_cropTbl + 32);
- prefetch_load(vp9_ff_cropTbl + 64);
- prefetch_load(vp9_ff_cropTbl + 96);
- prefetch_load(vp9_ff_cropTbl + 128);
- prefetch_load(vp9_ff_cropTbl + 160);
- prefetch_load(vp9_ff_cropTbl + 192);
- prefetch_load(vp9_ff_cropTbl + 224);
+ /* prefetch vpx_ff_cropTbl */
+ prefetch_load(vpx_ff_cropTbl);
+ prefetch_load(vpx_ff_cropTbl + 32);
+ prefetch_load(vpx_ff_cropTbl + 64);
+ prefetch_load(vpx_ff_cropTbl + 96);
+ prefetch_load(vpx_ff_cropTbl + 128);
+ prefetch_load(vpx_ff_cropTbl + 160);
+ prefetch_load(vpx_ff_cropTbl + 192);
+ prefetch_load(vpx_ff_cropTbl + 224);
for (i = 0; i < 32; ++i) {
dest_pix = dest + i;
diff --git a/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
index a0b77f5..aa801ec 100644
--- a/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
@@ -113,17 +113,17 @@
const int const_2_power_13 = 8192;
int i;
uint8_t *dest_pix;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
- /* prefetch vp9_ff_cropTbl */
- prefetch_load(vp9_ff_cropTbl);
- prefetch_load(vp9_ff_cropTbl + 32);
- prefetch_load(vp9_ff_cropTbl + 64);
- prefetch_load(vp9_ff_cropTbl + 96);
- prefetch_load(vp9_ff_cropTbl + 128);
- prefetch_load(vp9_ff_cropTbl + 160);
- prefetch_load(vp9_ff_cropTbl + 192);
- prefetch_load(vp9_ff_cropTbl + 224);
+ /* prefetch vpx_ff_cropTbl */
+ prefetch_load(vpx_ff_cropTbl);
+ prefetch_load(vpx_ff_cropTbl + 32);
+ prefetch_load(vpx_ff_cropTbl + 64);
+ prefetch_load(vpx_ff_cropTbl + 96);
+ prefetch_load(vpx_ff_cropTbl + 128);
+ prefetch_load(vpx_ff_cropTbl + 160);
+ prefetch_load(vpx_ff_cropTbl + 192);
+ prefetch_load(vpx_ff_cropTbl + 224);
for (i = 0; i < 4; ++i) {
dest_pix = (dest + i);
diff --git a/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c
index 672946e..5270fa1 100644
--- a/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c
@@ -208,17 +208,17 @@
int i;
const int const_2_power_13 = 8192;
uint8_t *dest_pix;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
- /* prefetch vp9_ff_cropTbl */
- prefetch_load(vp9_ff_cropTbl);
- prefetch_load(vp9_ff_cropTbl + 32);
- prefetch_load(vp9_ff_cropTbl + 64);
- prefetch_load(vp9_ff_cropTbl + 96);
- prefetch_load(vp9_ff_cropTbl + 128);
- prefetch_load(vp9_ff_cropTbl + 160);
- prefetch_load(vp9_ff_cropTbl + 192);
- prefetch_load(vp9_ff_cropTbl + 224);
+ /* prefetch vpx_ff_cropTbl */
+ prefetch_load(vpx_ff_cropTbl);
+ prefetch_load(vpx_ff_cropTbl + 32);
+ prefetch_load(vpx_ff_cropTbl + 64);
+ prefetch_load(vpx_ff_cropTbl + 96);
+ prefetch_load(vpx_ff_cropTbl + 128);
+ prefetch_load(vpx_ff_cropTbl + 160);
+ prefetch_load(vpx_ff_cropTbl + 192);
+ prefetch_load(vpx_ff_cropTbl + 224);
for (i = 0; i < 8; ++i) {
dest_pix = (dest + i);
diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk
index 339bc8b..cc201bc 100644
--- a/vp9/vp9_common.mk
+++ b/vp9/vp9_common.mk
@@ -74,16 +74,7 @@
# common (c)
VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_common_dspr2.h
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve2_avg_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve2_avg_horiz_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve2_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve2_horiz_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve2_vert_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve8_avg_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve8_avg_horiz_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve8_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve8_horiz_dspr2.c
-VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_convolve8_vert_dspr2.c
+VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_common_dspr2.c
ifneq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
VP9_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/vp9_itrans4_dspr2.c
diff --git a/vpx_dsp/mips/intrapred4_dspr2.c b/vpx_dsp/mips/intrapred4_dspr2.c
index 3872f24..03baf4c 100644
--- a/vpx_dsp/mips/intrapred4_dspr2.c
+++ b/vpx_dsp/mips/intrapred4_dspr2.c
@@ -11,22 +11,6 @@
#include "vpx_dsp/mips/common_dspr2.h"
#if HAVE_DSPR2
-uint8_t vpx_ff_cropTbl_a[256 + 2 * CROP_WIDTH];
-uint8_t *vpx_ff_cropTbl;
-
-void vpx_dsputil_static_init(void) {
- int i;
-
- for (i = 0; i < 256; i++) vpx_ff_cropTbl_a[i + CROP_WIDTH] = i;
-
- for (i = 0; i < CROP_WIDTH; i++) {
- vpx_ff_cropTbl_a[i] = 0;
- vpx_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255;
- }
-
- vpx_ff_cropTbl = &vpx_ff_cropTbl_a[CROP_WIDTH];
-}
-
void vpx_h_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride,
const uint8_t *above, const uint8_t *left) {
int32_t tmp1, tmp2, tmp3, tmp4;
diff --git a/vpx_dsp/mips/vpx_common_dspr2.h b/vpx_dsp/mips/vpx_common_dspr2.h
new file mode 100644
index 0000000..4aff9e5
--- /dev/null
+++ b/vpx_dsp/mips/vpx_common_dspr2.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_
+#define VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_
+
+#include <assert.h>
+
+#include "./vpx_config.h"
+#include "vpx/vpx_integer.h"
+#include "vpx_dsp/mips/common_dspr2.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if HAVE_DSPR2
+extern uint8_t *vpx_ff_cropTbl;
+
+void vpx_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+ uint8_t *dst, ptrdiff_t dst_stride,
+ const int16_t *filter_x, int x_step_q4,
+ const int16_t *filter_y, int y_step_q4,
+ int w, int h);
+
+void vpx_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+ uint8_t *dst, ptrdiff_t dst_stride,
+ const int16_t *filter_x, int x_step_q4,
+ const int16_t *filter_y, int y_step_q4,
+ int w, int h);
+
+void vpx_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+ uint8_t *dst, ptrdiff_t dst_stride,
+ const int16_t *filter_x, int x_step_q4,
+ const int16_t *filter_y, int y_step_q4,
+ int w, int h);
+
+void vpx_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+ uint8_t *dst, ptrdiff_t dst_stride,
+ const int16_t *filter,
+ int w, int h);
+
+void vpx_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+ uint8_t *dst, ptrdiff_t dst_stride,
+ const int16_t *filter_x, int x_step_q4,
+ const int16_t *filter_y, int y_step_q4,
+ int w, int h);
+
+#endif // #if HAVE_DSPR2
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // VPX_DSP_MIPS_VPX_COMMON_DSPR2_H_
diff --git a/vp9/common/mips/dspr2/vp9_convolve2_avg_dspr2.c b/vpx_dsp/mips/vpx_convolve2_avg_dspr2.c
similarity index 96%
rename from vp9/common/mips/dspr2/vp9_convolve2_avg_dspr2.c
rename to vpx_dsp/mips/vpx_convolve2_avg_dspr2.c
index aad7c45..4a738b9 100644
--- a/vp9/common/mips/dspr2/vp9_convolve2_avg_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve2_avg_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_convolve.h"
+#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_bi_avg_vert_4_dspr2(const uint8_t *src,
@@ -30,7 +28,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2;
uint32_t p1, p2;
@@ -134,7 +132,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2;
uint32_t p1, p2;
@@ -230,7 +228,7 @@
}
}
-void vp9_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
@@ -263,7 +261,7 @@
filter_y, h);
break;
default:
- vp9_convolve8_avg_vert_c(src, src_stride,
+ vpx_convolve8_avg_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -271,7 +269,7 @@
break;
}
} else {
- vp9_convolve8_avg_vert_c(src, src_stride,
+ vpx_convolve8_avg_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vp9/common/mips/dspr2/vp9_convolve2_avg_horiz_dspr2.c b/vpx_dsp/mips/vpx_convolve2_avg_horiz_dspr2.c
similarity index 98%
rename from vp9/common/mips/dspr2/vp9_convolve2_avg_horiz_dspr2.c
rename to vpx_dsp/mips/vpx_convolve2_avg_horiz_dspr2.c
index bc60e93..b8f33f6 100644
--- a/vp9/common/mips/dspr2/vp9_convolve2_avg_horiz_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve2_avg_horiz_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_convolve.h"
+#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_bi_avg_horiz_4_dspr2(const uint8_t *src,
@@ -27,7 +25,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
int32_t Temp1, Temp2, Temp3, Temp4;
uint32_t vector4a = 64;
uint32_t tp1, tp2;
@@ -122,7 +120,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t tp1, tp2, tp3, tp4;
@@ -274,7 +272,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t qload1, qload2, qload3;
@@ -523,7 +521,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t qload1, qload2, qload3;
@@ -765,7 +763,7 @@
}
}
-void vp9_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
@@ -815,7 +813,7 @@
filter_x, h);
break;
default:
- vp9_convolve8_avg_horiz_c(src, src_stride,
+ vpx_convolve8_avg_horiz_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -823,7 +821,7 @@
break;
}
} else {
- vp9_convolve8_avg_horiz_c(src, src_stride,
+ vpx_convolve8_avg_horiz_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vp9/common/mips/dspr2/vp9_convolve2_dspr2.c b/vpx_dsp/mips/vpx_convolve2_dspr2.c
similarity index 98%
rename from vp9/common/mips/dspr2/vp9_convolve2_dspr2.c
rename to vpx_dsp/mips/vpx_convolve2_dspr2.c
index b714f9a..4a722e1 100644
--- a/vp9/common/mips/dspr2/vp9_convolve2_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve2_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_dsp_common.h"
+#include "vpx_dsp/vpx_filter.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_filter.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_bi_horiz_4_transposed_dspr2(const uint8_t *src,
@@ -27,7 +25,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint8_t *dst_ptr;
int32_t Temp1, Temp2;
uint32_t vector4a = 64;
@@ -117,7 +115,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint8_t *dst_ptr;
uint32_t vector4a = 64;
int32_t Temp1, Temp2, Temp3;
@@ -257,7 +255,7 @@
int32_t c, y;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t qload1, qload2;
@@ -489,7 +487,7 @@
int32_t c, y;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t qload1, qload2;
@@ -733,7 +731,7 @@
}
}
-void vp9_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve2_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter,
int w, int h) {
diff --git a/vp9/common/mips/dspr2/vp9_convolve2_horiz_dspr2.c b/vpx_dsp/mips/vpx_convolve2_horiz_dspr2.c
similarity index 98%
rename from vp9/common/mips/dspr2/vp9_convolve2_horiz_dspr2.c
rename to vpx_dsp/mips/vpx_convolve2_horiz_dspr2.c
index 27ea100..b6fc665 100644
--- a/vp9/common/mips/dspr2/vp9_convolve2_horiz_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve2_horiz_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_convolve.h"
+#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_bi_horiz_4_dspr2(const uint8_t *src,
@@ -27,7 +25,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
int32_t Temp1, Temp2, Temp3, Temp4;
uint32_t vector4a = 64;
uint32_t tp1, tp2;
@@ -109,7 +107,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t tp1, tp2, tp3;
@@ -236,7 +234,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t qload1, qload2, qload3;
@@ -443,7 +441,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t Temp1, Temp2, Temp3;
uint32_t qload1, qload2, qload3;
@@ -643,7 +641,7 @@
}
}
-void vp9_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
@@ -695,7 +693,7 @@
filter_x, (int32_t)h);
break;
default:
- vp9_convolve8_horiz_c(src, src_stride,
+ vpx_convolve8_horiz_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -703,7 +701,7 @@
break;
}
} else {
- vp9_convolve8_horiz_c(src, src_stride,
+ vpx_convolve8_horiz_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vp9/common/mips/dspr2/vp9_convolve2_vert_dspr2.c b/vpx_dsp/mips/vpx_convolve2_vert_dspr2.c
similarity index 95%
rename from vp9/common/mips/dspr2/vp9_convolve2_vert_dspr2.c
rename to vpx_dsp/mips/vpx_convolve2_vert_dspr2.c
index 32f5fb6..41197eb 100644
--- a/vp9/common/mips/dspr2/vp9_convolve2_vert_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve2_vert_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_convolve.h"
+#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_bi_vert_4_dspr2(const uint8_t *src,
@@ -30,7 +28,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2;
uint32_t p1, p2;
@@ -127,7 +125,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2;
uint32_t p1, p2;
@@ -215,7 +213,7 @@
}
}
-void vp9_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
@@ -248,7 +246,7 @@
filter_y, h);
break;
default:
- vp9_convolve8_vert_c(src, src_stride,
+ vpx_convolve8_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -256,7 +254,7 @@
break;
}
} else {
- vp9_convolve8_vert_c(src, src_stride,
+ vpx_convolve8_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c b/vpx_dsp/mips/vpx_convolve8_avg_dspr2.c
similarity index 97%
rename from vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c
rename to vpx_dsp/mips/vpx_convolve8_avg_dspr2.c
index d9cbfe6..3ba4c97 100644
--- a/vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve8_avg_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_convolve.h"
+#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_avg_vert_4_dspr2(const uint8_t *src,
@@ -30,7 +28,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2, load3, load4;
uint32_t p1, p2;
@@ -191,7 +189,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2, load3, load4;
uint32_t p1, p2;
@@ -344,19 +342,19 @@
}
}
-void vp9_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
if (((const int32_t *)filter_y)[1] == 0x800000) {
- vp9_convolve_avg(src, src_stride,
+ vpx_convolve_avg(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, h);
} else if (((const int32_t *)filter_y)[0] == 0) {
- vp9_convolve2_avg_vert_dspr2(src, src_stride,
+ vpx_convolve2_avg_vert_dspr2(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -390,7 +388,7 @@
filter_y, h);
break;
default:
- vp9_convolve8_avg_vert_c(src, src_stride,
+ vpx_convolve8_avg_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -398,7 +396,7 @@
break;
}
} else {
- vp9_convolve8_avg_vert_c(src, src_stride,
+ vpx_convolve8_avg_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -407,7 +405,7 @@
}
}
-void vp9_convolve8_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve8_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
@@ -423,26 +421,26 @@
intermediate_height = h;
if (x_step_q4 != 16 || y_step_q4 != 16)
- return vp9_convolve8_avg_c(src, src_stride,
+ return vpx_convolve8_avg_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, h);
- vp9_convolve8_horiz(src - (src_stride * 3), src_stride,
+ vpx_convolve8_horiz(src - (src_stride * 3), src_stride,
temp, 64,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, intermediate_height);
- vp9_convolve8_avg_vert(temp + 64 * 3, 64,
+ vpx_convolve8_avg_vert(temp + 64 * 3, 64,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, h);
}
-void vp9_convolve_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int filter_x_stride,
const int16_t *filter_y, int filter_y_stride,
diff --git a/vp9/common/mips/dspr2/vp9_convolve8_avg_horiz_dspr2.c b/vpx_dsp/mips/vpx_convolve8_avg_horiz_dspr2.c
similarity index 98%
rename from vp9/common/mips/dspr2/vp9_convolve8_avg_horiz_dspr2.c
rename to vpx_dsp/mips/vpx_convolve8_avg_horiz_dspr2.c
index cdb8312..f8ba96b 100644
--- a/vp9/common/mips/dspr2/vp9_convolve8_avg_horiz_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve8_avg_horiz_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_convolve.h"
+#include "vpx_dsp/vpx_dsp_common.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_avg_horiz_4_dspr2(const uint8_t *src,
@@ -27,7 +25,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
int32_t vector1b, vector2b, vector3b, vector4b;
int32_t Temp1, Temp2, Temp3, Temp4;
uint32_t vector4a = 64;
@@ -149,7 +147,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
int32_t vector1b, vector2b, vector3b, vector4b;
int32_t Temp1, Temp2, Temp3;
@@ -339,7 +337,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t filter12, filter34, filter56, filter78;
int32_t Temp1, Temp2, Temp3;
@@ -650,7 +648,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t filter12, filter34, filter56, filter78;
int32_t Temp1, Temp2, Temp3;
@@ -954,19 +952,19 @@
}
}
-void vp9_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
if (((const int32_t *)filter_x)[1] == 0x800000) {
- vp9_convolve_avg(src, src_stride,
+ vpx_convolve_avg(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, h);
} else if (((const int32_t *)filter_x)[0] == 0) {
- vp9_convolve2_avg_horiz_dspr2(src, src_stride,
+ vpx_convolve2_avg_horiz_dspr2(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -1019,7 +1017,7 @@
filter_x, h);
break;
default:
- vp9_convolve8_avg_horiz_c(src + 3, src_stride,
+ vpx_convolve8_avg_horiz_c(src + 3, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -1027,7 +1025,7 @@
break;
}
} else {
- vp9_convolve8_avg_horiz_c(src, src_stride,
+ vpx_convolve8_avg_horiz_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vp9/common/mips/dspr2/vp9_convolve8_dspr2.c b/vpx_dsp/mips/vpx_convolve8_dspr2.c
similarity index 98%
rename from vp9/common/mips/dspr2/vp9_convolve8_dspr2.c
rename to vpx_dsp/mips/vpx_convolve8_dspr2.c
index a1309d1..f239c11 100644
--- a/vp9/common/mips/dspr2/vp9_convolve8_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve8_dspr2.c
@@ -11,29 +11,27 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_dsp_common.h"
+#include "vpx_dsp/vpx_filter.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_filter.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
-uint8_t vp9_ff_cropTbl_a[256 + 2 * CROP_WIDTH];
-uint8_t *vp9_ff_cropTbl;
+uint8_t vpx_ff_cropTbl_a[256 + 2 * CROP_WIDTH];
+uint8_t *vpx_ff_cropTbl;
-void vp9_dsputil_static_init(void) {
+void vpx_dsputil_static_init(void) {
int i;
- for (i = 0; i < 256; i++) vp9_ff_cropTbl_a[i + CROP_WIDTH] = i;
+ for (i = 0; i < 256; i++) vpx_ff_cropTbl_a[i + CROP_WIDTH] = i;
for (i = 0; i < CROP_WIDTH; i++) {
- vp9_ff_cropTbl_a[i] = 0;
- vp9_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255;
+ vpx_ff_cropTbl_a[i] = 0;
+ vpx_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255;
}
- vp9_ff_cropTbl = &vp9_ff_cropTbl_a[CROP_WIDTH];
+ vpx_ff_cropTbl = &vpx_ff_cropTbl_a[CROP_WIDTH];
}
static void convolve_horiz_4_transposed_dspr2(const uint8_t *src,
@@ -43,7 +41,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint8_t *dst_ptr;
int32_t vector1b, vector2b, vector3b, vector4b;
int32_t Temp1, Temp2, Temp3, Temp4;
@@ -159,7 +157,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint8_t *dst_ptr;
uint32_t vector4a = 64;
int32_t vector1b, vector2b, vector3b, vector4b;
@@ -338,7 +336,7 @@
int32_t c, y;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t filter12, filter34, filter56, filter78;
int32_t Temp1, Temp2, Temp3;
@@ -628,7 +626,7 @@
int32_t c, y;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t filter12, filter34, filter56, filter78;
int32_t Temp1, Temp2, Temp3;
@@ -945,7 +943,7 @@
}
}
-void vp9_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
@@ -965,7 +963,7 @@
intermediate_height = h;
if (x_step_q4 != 16 || y_step_q4 != 16)
- return vp9_convolve8_c(src, src_stride,
+ return vpx_convolve8_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -973,7 +971,7 @@
if ((((const int32_t *)filter_x)[1] == 0x800000)
&& (((const int32_t *)filter_y)[1] == 0x800000))
- return vp9_convolve_copy(src, src_stride,
+ return vpx_convolve_copy(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -985,7 +983,7 @@
temp, intermediate_height,
w, intermediate_height);
} else if (((const int32_t *)filter_x)[0] == 0) {
- vp9_convolve2_dspr2(src - src_stride * 3, src_stride,
+ vpx_convolve2_dspr2(src - src_stride * 3, src_stride,
temp, intermediate_height,
filter_x,
w, intermediate_height);
@@ -1034,7 +1032,7 @@
dst, dst_stride,
h, w);
} else if (((const int32_t *)filter_y)[0] == 0) {
- vp9_convolve2_dspr2(temp + 3, intermediate_height,
+ vpx_convolve2_dspr2(temp + 3, intermediate_height,
dst, dst_stride,
filter_y,
h, w);
@@ -1070,7 +1068,7 @@
}
}
-void vp9_convolve_copy_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve_copy_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int filter_x_stride,
const int16_t *filter_y, int filter_y_stride,
diff --git a/vp9/common/mips/dspr2/vp9_convolve8_horiz_dspr2.c b/vpx_dsp/mips/vpx_convolve8_horiz_dspr2.c
similarity index 98%
rename from vp9/common/mips/dspr2/vp9_convolve8_horiz_dspr2.c
rename to vpx_dsp/mips/vpx_convolve8_horiz_dspr2.c
index d0e3095..65720d9 100644
--- a/vp9/common/mips/dspr2/vp9_convolve8_horiz_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve8_horiz_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_dsp_common.h"
+#include "vpx_dsp/vpx_filter.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_horiz_4_dspr2(const uint8_t *src,
@@ -27,7 +25,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
int32_t vector1b, vector2b, vector3b, vector4b;
int32_t Temp1, Temp2, Temp3, Temp4;
uint32_t vector4a = 64;
@@ -138,7 +136,7 @@
const int16_t *filter_x0,
int32_t h) {
int32_t y;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
int32_t vector1b, vector2b, vector3b, vector4b;
int32_t Temp1, Temp2, Temp3;
@@ -305,7 +303,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t filter12, filter34, filter56, filter78;
int32_t Temp1, Temp2, Temp3;
@@ -575,7 +573,7 @@
int32_t y, c;
const uint8_t *src;
uint8_t *dst;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector_64 = 64;
int32_t filter12, filter34, filter56, filter78;
int32_t Temp1, Temp2, Temp3;
@@ -838,19 +836,19 @@
}
}
-void vp9_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
if (((const int32_t *)filter_x)[1] == 0x800000) {
- vp9_convolve_copy(src, src_stride,
+ vpx_convolve_copy(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, h);
} else if (((const int32_t *)filter_x)[0] == 0) {
- vp9_convolve2_horiz_dspr2(src, src_stride,
+ vpx_convolve2_horiz_dspr2(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -904,7 +902,7 @@
filter_x, (int32_t)h);
break;
default:
- vp9_convolve8_horiz_c(src + 3, src_stride,
+ vpx_convolve8_horiz_c(src + 3, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -912,7 +910,7 @@
break;
}
} else {
- vp9_convolve8_horiz_c(src, src_stride,
+ vpx_convolve8_horiz_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vp9/common/mips/dspr2/vp9_convolve8_vert_dspr2.c b/vpx_dsp/mips/vpx_convolve8_vert_dspr2.c
similarity index 96%
rename from vp9/common/mips/dspr2/vp9_convolve8_vert_dspr2.c
rename to vpx_dsp/mips/vpx_convolve8_vert_dspr2.c
index 98acb81..cf9b4f1 100644
--- a/vp9/common/mips/dspr2/vp9_convolve8_vert_dspr2.c
+++ b/vpx_dsp/mips/vpx_convolve8_vert_dspr2.c
@@ -11,13 +11,11 @@
#include <assert.h>
#include <stdio.h>
-#include "./vpx_config.h"
-#include "./vp9_rtcd.h"
-#include "vp9/common/vp9_common.h"
-#include "vpx/vpx_integer.h"
+#include "./vpx_dsp_rtcd.h"
+#include "vpx_dsp/mips/vpx_common_dspr2.h"
+#include "vpx_dsp/vpx_dsp_common.h"
+#include "vpx_dsp/vpx_filter.h"
#include "vpx_ports/mem.h"
-#include "vp9/common/vp9_convolve.h"
-#include "vp9/common/mips/dspr2/vp9_common_dspr2.h"
#if HAVE_DSPR2
static void convolve_vert_4_dspr2(const uint8_t *src,
@@ -30,7 +28,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2, load3, load4;
uint32_t p1, p2;
@@ -184,7 +182,7 @@
int32_t x, y;
const uint8_t *src_ptr;
uint8_t *dst_ptr;
- uint8_t *cm = vp9_ff_cropTbl;
+ uint8_t *cm = vpx_ff_cropTbl;
uint32_t vector4a = 64;
uint32_t load1, load2, load3, load4;
uint32_t p1, p2;
@@ -330,19 +328,19 @@
}
}
-void vp9_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
+void vpx_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
if (((const int32_t *)filter_y)[1] == 0x800000) {
- vp9_convolve_copy(src, src_stride,
+ vpx_convolve_copy(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, h);
} else if (((const int32_t *)filter_y)[0] == 0) {
- vp9_convolve2_vert_dspr2(src, src_stride,
+ vpx_convolve2_vert_dspr2(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -376,7 +374,7 @@
filter_y, h);
break;
default:
- vp9_convolve8_vert_c(src, src_stride,
+ vpx_convolve8_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
@@ -384,7 +382,7 @@
break;
}
} else {
- vp9_convolve8_vert_c(src, src_stride,
+ vpx_convolve8_vert_c(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vpx_dsp/vpx_dsp.mk b/vpx_dsp/vpx_dsp.mk
index de45782..4c5545c 100644
--- a/vpx_dsp/vpx_dsp.mk
+++ b/vpx_dsp/vpx_dsp.mk
@@ -102,6 +102,19 @@
DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_copy_msa.c
DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_msa.h
+# common (dspr2)
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_common_dspr2.h
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve2_avg_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve2_avg_horiz_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve2_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve2_horiz_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve2_vert_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve8_avg_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve8_avg_horiz_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve8_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve8_horiz_dspr2.c
+DSP_SRCS-$(HAVE_DSPR2) += mips/vpx_convolve8_vert_dspr2.c
+
# loop filters
DSP_SRCS-yes += loopfilter.c
diff --git a/vpx_dsp/vpx_dsp_rtcd_defs.pl b/vpx_dsp/vpx_dsp_rtcd_defs.pl
index 6e63271..3b732b9 100644
--- a/vpx_dsp/vpx_dsp_rtcd_defs.pl
+++ b/vpx_dsp/vpx_dsp_rtcd_defs.pl
@@ -375,28 +375,28 @@
# Sub Pixel Filters
#
add_proto qw/void vpx_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve_copy neon msa/, "$sse2_x86inc";
+specialize qw/vpx_convolve_copy neon dspr2 msa/, "$sse2_x86inc";
add_proto qw/void vpx_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve_avg neon msa/, "$sse2_x86inc";
+specialize qw/vpx_convolve_avg neon dspr2 msa/, "$sse2_x86inc";
add_proto qw/void vpx_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve8 sse2 ssse3 neon msa/, "$avx2_ssse3";
+specialize qw/vpx_convolve8 sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3";
add_proto qw/void vpx_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve8_horiz sse2 ssse3 neon msa/, "$avx2_ssse3";
+specialize qw/vpx_convolve8_horiz sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3";
add_proto qw/void vpx_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve8_vert sse2 ssse3 neon msa/, "$avx2_ssse3";
+specialize qw/vpx_convolve8_vert sse2 ssse3 neon dspr2 msa/, "$avx2_ssse3";
add_proto qw/void vpx_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve8_avg sse2 ssse3 neon msa/;
+specialize qw/vpx_convolve8_avg sse2 ssse3 neon dspr2 msa/;
add_proto qw/void vpx_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve8_avg_horiz sse2 ssse3 neon msa/;
+specialize qw/vpx_convolve8_avg_horiz sse2 ssse3 neon dspr2 msa/;
add_proto qw/void vpx_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
-specialize qw/vpx_convolve8_avg_vert sse2 ssse3 neon msa/;
+specialize qw/vpx_convolve8_avg_vert sse2 ssse3 neon dspr2 msa/;
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
#