Index: source/libvpx/vpx_dsp/mips/convolve8_avg_dspr2.c |
diff --git a/source/libvpx/vpx_dsp/mips/vpx_convolve8_avg_dspr2.c b/source/libvpx/vpx_dsp/mips/convolve8_avg_dspr2.c |
similarity index 94% |
rename from source/libvpx/vpx_dsp/mips/vpx_convolve8_avg_dspr2.c |
rename to source/libvpx/vpx_dsp/mips/convolve8_avg_dspr2.c |
index 3ba4c9727afbefdbaf0c7efae2251e86f4a16ab2..43da9e54fb2f7b88578d38a476c3660e6de7d884 100644 |
--- a/source/libvpx/vpx_dsp/mips/vpx_convolve8_avg_dspr2.c |
+++ b/source/libvpx/vpx_dsp/mips/convolve8_avg_dspr2.c |
@@ -12,7 +12,7 @@ |
#include <stdio.h> |
#include "./vpx_dsp_rtcd.h" |
-#include "vpx_dsp/mips/vpx_common_dspr2.h" |
+#include "vpx_dsp/mips/convolve_common_dspr2.h" |
#include "vpx_dsp/vpx_convolve.h" |
#include "vpx_dsp/vpx_dsp_common.h" |
#include "vpx_ports/mem.h" |
@@ -347,60 +347,49 @@ void vpx_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_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) { |
- 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) { |
+ assert(y_step_q4 == 16); |
+ assert(((const int32_t *)filter_y)[1] != 0x800000); |
+ |
+ if (((const int32_t *)filter_y)[0] == 0) { |
vpx_convolve2_avg_vert_dspr2(src, src_stride, |
dst, dst_stride, |
filter_x, x_step_q4, |
filter_y, y_step_q4, |
w, h); |
} else { |
- if (16 == y_step_q4) { |
- uint32_t pos = 38; |
- |
- /* bit positon for extract from acc */ |
- __asm__ __volatile__ ( |
- "wrdsp %[pos], 1 \n\t" |
- : |
- : [pos] "r" (pos) |
- ); |
- |
- prefetch_store(dst); |
- |
- switch (w) { |
- case 4: |
- case 8: |
- case 16: |
- case 32: |
- convolve_avg_vert_4_dspr2(src, src_stride, |
- dst, dst_stride, |
- filter_y, w, h); |
- break; |
- case 64: |
- prefetch_store(dst + 32); |
- convolve_avg_vert_64_dspr2(src, src_stride, |
- dst, dst_stride, |
- filter_y, h); |
- break; |
- default: |
- vpx_convolve8_avg_vert_c(src, src_stride, |
+ uint32_t pos = 38; |
+ |
+ /* bit positon for extract from acc */ |
+ __asm__ __volatile__ ( |
+ "wrdsp %[pos], 1 \n\t" |
+ : |
+ : [pos] "r" (pos) |
+ ); |
+ |
+ prefetch_store(dst); |
+ |
+ switch (w) { |
+ case 4: |
+ case 8: |
+ case 16: |
+ case 32: |
+ convolve_avg_vert_4_dspr2(src, src_stride, |
+ dst, dst_stride, |
+ filter_y, w, h); |
+ break; |
+ case 64: |
+ prefetch_store(dst + 32); |
+ convolve_avg_vert_64_dspr2(src, src_stride, |
dst, dst_stride, |
- filter_x, x_step_q4, |
- filter_y, y_step_q4, |
- w, h); |
- break; |
- } |
- } else { |
- vpx_convolve8_avg_vert_c(src, src_stride, |
- dst, dst_stride, |
- filter_x, x_step_q4, |
- filter_y, y_step_q4, |
- w, h); |
+ filter_y, h); |
+ break; |
+ default: |
+ vpx_convolve8_avg_vert_c(src, src_stride, |
+ dst, dst_stride, |
+ filter_x, x_step_q4, |
+ filter_y, y_step_q4, |
+ w, h); |
+ break; |
} |
} |
} |
@@ -416,17 +405,12 @@ void vpx_convolve8_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride, |
assert(w <= 64); |
assert(h <= 64); |
+ assert(x_step_q4 == 16); |
+ assert(y_step_q4 == 16); |
if (intermediate_height < h) |
intermediate_height = h; |
- if (x_step_q4 != 16 || y_step_q4 != 16) |
- return vpx_convolve8_avg_c(src, src_stride, |
- dst, dst_stride, |
- filter_x, x_step_q4, |
- filter_y, y_step_q4, |
- w, h); |
- |
vpx_convolve8_horiz(src - (src_stride * 3), src_stride, |
temp, 64, |
filter_x, x_step_q4, |