Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: source/libvpx/vpx_dsp/mips/convolve8_horiz_dspr2.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vpx_dsp/mips/convolve8_dspr2.c ('k') | source/libvpx/vpx_dsp/mips/convolve8_vert_dspr2.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vpx_dsp/mips/convolve8_horiz_dspr2.c
diff --git a/source/libvpx/vpx_dsp/mips/vpx_convolve8_horiz_dspr2.c b/source/libvpx/vpx_dsp/mips/convolve8_horiz_dspr2.c
similarity index 95%
rename from source/libvpx/vpx_dsp/mips/vpx_convolve8_horiz_dspr2.c
rename to source/libvpx/vpx_dsp/mips/convolve8_horiz_dspr2.c
index 65720d9da3b0e168de9bda5e0a048a17e8d4bf65..ae78bab8924832ca60ec8a1452f51484f9a7a260 100644
--- a/source/libvpx/vpx_dsp/mips/vpx_convolve8_horiz_dspr2.c
+++ b/source/libvpx/vpx_dsp/mips/convolve8_horiz_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_dsp_common.h"
#include "vpx_dsp/vpx_filter.h"
#include "vpx_ports/mem.h"
@@ -841,80 +841,69 @@ void vpx_convolve8_horiz_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_x)[1] == 0x800000) {
- 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) {
+ assert(x_step_q4 == 16);
+ assert(((const int32_t *)filter_x)[1] != 0x800000);
+
+ if (((const int32_t *)filter_x)[0] == 0) {
vpx_convolve2_horiz_dspr2(src, src_stride,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
w, h);
} else {
- if (16 == x_step_q4) {
- uint32_t pos = 38;
+ uint32_t pos = 38;
- prefetch_load((const uint8_t *)filter_x);
- src -= 3;
+ prefetch_load((const uint8_t *)filter_x);
+ src -= 3;
- /* bit positon for extract from acc */
- __asm__ __volatile__ (
- "wrdsp %[pos], 1 \n\t"
- :
- : [pos] "r" (pos)
- );
+ /* bit positon for extract from acc */
+ __asm__ __volatile__ (
+ "wrdsp %[pos], 1 \n\t"
+ :
+ : [pos] "r" (pos)
+ );
- /* prefetch data to cache memory */
- prefetch_load(src);
- prefetch_load(src + 32);
- prefetch_store(dst);
-
- switch (w) {
- case 4:
- convolve_horiz_4_dspr2(src, (int32_t)src_stride,
- dst, (int32_t)dst_stride,
- filter_x, (int32_t)h);
- break;
- case 8:
- convolve_horiz_8_dspr2(src, (int32_t)src_stride,
- dst, (int32_t)dst_stride,
- filter_x, (int32_t)h);
- break;
- case 16:
- convolve_horiz_16_dspr2(src, (int32_t)src_stride,
- dst, (int32_t)dst_stride,
- filter_x, (int32_t)h, 1);
- break;
- case 32:
- convolve_horiz_16_dspr2(src, (int32_t)src_stride,
- dst, (int32_t)dst_stride,
- filter_x, (int32_t)h, 2);
- break;
- case 64:
- prefetch_load(src + 64);
- prefetch_store(dst + 32);
-
- convolve_horiz_64_dspr2(src, (int32_t)src_stride,
- dst, (int32_t)dst_stride,
- filter_x, (int32_t)h);
- break;
- default:
- vpx_convolve8_horiz_c(src + 3, src_stride,
- dst, dst_stride,
- filter_x, x_step_q4,
- filter_y, y_step_q4,
- w, h);
- break;
- }
- } else {
- vpx_convolve8_horiz_c(src, src_stride,
- dst, dst_stride,
- filter_x, x_step_q4,
- filter_y, y_step_q4,
- w, h);
+ /* prefetch data to cache memory */
+ prefetch_load(src);
+ prefetch_load(src + 32);
+ prefetch_store(dst);
+
+ switch (w) {
+ case 4:
+ convolve_horiz_4_dspr2(src, (int32_t)src_stride,
+ dst, (int32_t)dst_stride,
+ filter_x, (int32_t)h);
+ break;
+ case 8:
+ convolve_horiz_8_dspr2(src, (int32_t)src_stride,
+ dst, (int32_t)dst_stride,
+ filter_x, (int32_t)h);
+ break;
+ case 16:
+ convolve_horiz_16_dspr2(src, (int32_t)src_stride,
+ dst, (int32_t)dst_stride,
+ filter_x, (int32_t)h, 1);
+ break;
+ case 32:
+ convolve_horiz_16_dspr2(src, (int32_t)src_stride,
+ dst, (int32_t)dst_stride,
+ filter_x, (int32_t)h, 2);
+ break;
+ case 64:
+ prefetch_load(src + 64);
+ prefetch_store(dst + 32);
+
+ convolve_horiz_64_dspr2(src, (int32_t)src_stride,
+ dst, (int32_t)dst_stride,
+ filter_x, (int32_t)h);
+ break;
+ default:
+ vpx_convolve8_horiz_c(src + 3, src_stride,
+ dst, dst_stride,
+ filter_x, x_step_q4,
+ filter_y, y_step_q4,
+ w, h);
+ break;
}
}
}
« no previous file with comments | « source/libvpx/vpx_dsp/mips/convolve8_dspr2.c ('k') | source/libvpx/vpx_dsp/mips/convolve8_vert_dspr2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698