Refactor mips/dspr2 on convolution.

Change-Id: If59a39d5a92c261537342726f94bb7f7f26dfff3
This commit is contained in:
Zoe Liu 2015-07-28 10:52:24 -07:00
parent 7186a2dd86
commit 7cfdc00337
21 changed files with 280 additions and 247 deletions

View File

@ -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

View File

@ -22,7 +22,8 @@ extern "C" {
#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 @@ extern uint8_t *vp9_ff_cropTbl;
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"

View File

@ -419,17 +419,17 @@ static void idct16_cols_add_blk_dspr2(int16_t *input, uint8_t *dest,
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);

View File

@ -41,17 +41,17 @@ void vp9_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest,
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;

View File

@ -113,17 +113,17 @@ static void vp9_idct4_columns_add_blk_dspr2(int16_t *input, uint8_t *dest,
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);

View File

@ -208,17 +208,17 @@ static void idct8_columns_add_blk_dspr2(int16_t *input, uint8_t *dest,
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);

View File

@ -74,16 +74,7 @@ endif
# 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

View File

@ -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;

View File

@ -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_

View File

@ -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 @@ static void convolve_bi_avg_vert_4_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_avg_vert_64_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_avg_vert_64_dspr2(const uint8_t *src,
}
}
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 @@ void vp9_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve2_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -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 @@ static void convolve_bi_avg_horiz_4_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_avg_horiz_8_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_avg_horiz_16_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_bi_avg_horiz_64_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_bi_avg_horiz_64_dspr2(const uint8_t *src_ptr,
}
}
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 @@ void vp9_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve2_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -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 @@ static void convolve_bi_horiz_4_transposed_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_horiz_8_transposed_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_horiz_16_transposed_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_bi_horiz_64_transposed_dspr2(const uint8_t *src_ptr,
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 convolve_bi_horiz_transposed(const uint8_t *src, ptrdiff_t src_stride,
}
}
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) {

View File

@ -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 @@ static void convolve_bi_horiz_4_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_horiz_8_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_horiz_16_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_bi_horiz_64_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_bi_horiz_64_dspr2(const uint8_t *src_ptr,
}
}
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 @@ void vp9_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve2_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -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 @@ static void convolve_bi_vert_4_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_vert_64_dspr2(const uint8_t *src,
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 @@ static void convolve_bi_vert_64_dspr2(const uint8_t *src,
}
}
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 @@ void vp9_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve2_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -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 @@ static void convolve_avg_vert_4_dspr2(const uint8_t *src,
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 @@ static void convolve_avg_vert_64_dspr2(const uint8_t *src,
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 @@ static void convolve_avg_vert_64_dspr2(const uint8_t *src,
}
}
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 @@ void vp9_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
}
}
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 @@ void vp9_convolve8_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -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 @@ static void convolve_avg_horiz_4_dspr2(const uint8_t *src,
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 @@ static void convolve_avg_horiz_8_dspr2(const uint8_t *src,
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 @@ static void convolve_avg_horiz_16_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_avg_horiz_64_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_avg_horiz_64_dspr2(const uint8_t *src_ptr,
}
}
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 @@ void vp9_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -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 @@ static void convolve_horiz_4_transposed_dspr2(const uint8_t *src,
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 @@ static void convolve_horiz_8_transposed_dspr2(const uint8_t *src,
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 @@ static void convolve_horiz_16_transposed_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_horiz_64_transposed_dspr2(const uint8_t *src_ptr,
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 copy_horiz_transposed(const uint8_t *src, ptrdiff_t src_stride,
}
}
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 @@ void vp9_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
}
}
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,

View File

@ -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 @@ static void convolve_horiz_4_dspr2(const uint8_t *src,
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 @@ static void convolve_horiz_8_dspr2(const uint8_t *src,
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 @@ static void convolve_horiz_16_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_horiz_64_dspr2(const uint8_t *src_ptr,
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 @@ static void convolve_horiz_64_dspr2(const uint8_t *src_ptr,
}
}
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 @@ void vp9_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -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 @@ static void convolve_vert_4_dspr2(const uint8_t *src,
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 @@ static void convolve_vert_64_dspr2(const uint8_t *src,
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 @@ static void convolve_vert_64_dspr2(const uint8_t *src,
}
}
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 @@ void vp9_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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 @@ void vp9_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
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,

View File

@ -102,6 +102,19 @@ DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_avg_msa.c
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

View File

@ -375,28 +375,28 @@ if (vpx_config("CONFIG_VP9") eq "yes") {
# 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") {
#