Add common_dspr2.c file to vpx_dsp/mips
authorJingning Han <jingning@google.com>
Mon, 3 Aug 2015 17:17:45 +0000 (10:17 -0700)
committerJingning Han <jingning@google.com>
Mon, 3 Aug 2015 17:53:47 +0000 (10:53 -0700)
Move the declaration of commonly referenced variable to
vpx_dsp/mips/common_dspr2.c.

Change-Id: Ia51287b02e2ac5cfae0fba98c721f0810618f28e

build/make/rtcd.pl
vp9/common/mips/dspr2/vp9_common_dspr2.c [deleted file]
vp9/common/mips/dspr2/vp9_common_dspr2.h
vp9/vp9_common.mk
vpx_dsp/mips/common_dspr2.c [new file with mode: 0644]
vpx_dsp/mips/convolve8_dspr2.c
vpx_dsp/vpx_dsp.mk

index 634d2be..991b6ab 100755 (executable)
@@ -323,17 +323,11 @@ void vpx_dsputil_static_init();
 #if CONFIG_VP8
 void dsputil_static_init();
 #endif
-#if CONFIG_VP9
-void vp9_dsputil_static_init();
-#endif
 
 vpx_dsputil_static_init();
 #if CONFIG_VP8
 dsputil_static_init();
 #endif
-#if CONFIG_VP9
-vp9_dsputil_static_init();
-#endif
 #endif
 }
 #endif
diff --git a/vp9/common/mips/dspr2/vp9_common_dspr2.c b/vp9/common/mips/dspr2/vp9_common_dspr2.c
deleted file mode 100644 (file)
index 6498a7e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  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
index 4e6b355..f8690fd 100644 (file)
@@ -22,9 +22,6 @@ extern "C" {
 #endif
 
 #if HAVE_DSPR2
-
-extern uint8_t *vpx_ff_cropTbl;
-
 #define DCT_CONST_ROUND_SHIFT_TWICE_COSPI_16_64(input)                    ({   \
                                                                                \
   int32_t tmp, out;                                                            \
index e95da44..f47d56a 100644 (file)
@@ -73,7 +73,6 @@ endif
 
 # common (c)
 VP9_COMMON_SRCS-$(HAVE_DSPR2)  += common/mips/dspr2/vp9_common_dspr2.h
-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/common_dspr2.c b/vpx_dsp/mips/common_dspr2.c
new file mode 100644 (file)
index 0000000..b22f084
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *  Copyright (c) 2015 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 "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];
+}
+
+#endif
index 4aa0c9c..398b85a 100644 (file)
 #include "vpx_ports/mem.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];
-}
-
 static void convolve_horiz_4_transposed_dspr2(const uint8_t *src,
                                               int32_t src_stride,
                                               uint8_t *dst,
index 776921d..4158d64 100644 (file)
@@ -54,6 +54,9 @@ DSP_SRCS-$(HAVE_DSPR2)  += mips/intrapred8_dspr2.c
 DSP_SRCS-$(HAVE_DSPR2)  += mips/intrapred16_dspr2.c
 endif  # CONFIG_VP9
 
+DSP_SRCS-$(HAVE_DSPR2)  += mips/common_dspr2.h
+DSP_SRCS-$(HAVE_DSPR2)  += mips/common_dspr2.c
+
 # interpolation filters
 DSP_SRCS-yes += vpx_convolve.c
 DSP_SRCS-yes += vpx_convolve.h