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

Unified Diff: source/libvpx/vpx_dsp/mips/convolve8_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
Index: source/libvpx/vpx_dsp/mips/convolve8_dspr2.c
diff --git a/source/libvpx/vpx_dsp/mips/vpx_convolve8_dspr2.c b/source/libvpx/vpx_dsp/mips/convolve8_dspr2.c
similarity index 98%
rename from source/libvpx/vpx_dsp/mips/vpx_convolve8_dspr2.c
rename to source/libvpx/vpx_dsp/mips/convolve8_dspr2.c
index f239c116a459e059f34ace464c14d52255d1f42a..ddad186922835c8933fa1c377e7e966b43dc4925 100644
--- a/source/libvpx/vpx_dsp/mips/vpx_convolve8_dspr2.c
+++ b/source/libvpx/vpx_dsp/mips/convolve8_dspr2.c
@@ -12,28 +12,12 @@
#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"
#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,
@@ -952,6 +936,12 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
int32_t intermediate_height = ((h * y_step_q4) >> 4) + 7;
uint32_t pos = 38;
+ assert(x_step_q4 == 16);
+ assert(y_step_q4 == 16);
+ assert(((const int32_t *)filter_x)[1] != 0x800000);
+ assert(((const int32_t *)filter_y)[1] != 0x800000);
+
+
/* bit positon for extract from acc */
__asm__ __volatile__ (
"wrdsp %[pos], 1 \n\t"
@@ -962,21 +952,6 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
if (intermediate_height < h)
intermediate_height = h;
- if (x_step_q4 != 16 || y_step_q4 != 16)
- return vpx_convolve8_c(src, src_stride,
- dst, dst_stride,
- filter_x, x_step_q4,
- filter_y, y_step_q4,
- w, h);
-
- if ((((const int32_t *)filter_x)[1] == 0x800000)
- && (((const int32_t *)filter_y)[1] == 0x800000))
- return vpx_convolve_copy(src, src_stride,
- dst, dst_stride,
- filter_x, x_step_q4,
- filter_y, y_step_q4,
- w, h);
-
/* copy the src to dst */
if (filter_x[3] == 0x80) {
copy_horiz_transposed(src - src_stride * 3, src_stride,
« no previous file with comments | « source/libvpx/vpx_dsp/mips/convolve8_avg_horiz_dspr2.c ('k') | source/libvpx/vpx_dsp/mips/convolve8_horiz_dspr2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698