]> granicus.if.org Git - libvpx/commitdiff
VPX: removed filter == 128 checks from mips convolve code
authorScott LaVarnway <slavarnway@google.com>
Thu, 13 Aug 2015 19:57:01 +0000 (12:57 -0700)
committerScott LaVarnway <slavarnway@google.com>
Thu, 13 Aug 2015 19:57:01 +0000 (12:57 -0700)
The check is handled by the predictor table.

Change-Id: I2fe52bfbbfccb2edd13ba250986e3a4b4b589459

vpx_dsp/mips/convolve8_avg_dspr2.c
vpx_dsp/mips/convolve8_avg_horiz_dspr2.c
vpx_dsp/mips/convolve8_dspr2.c
vpx_dsp/mips/convolve8_horiz_dspr2.c
vpx_dsp/mips/convolve8_vert_dspr2.c
vpx_dsp/mips/vpx_convolve8_avg_horiz_msa.c
vpx_dsp/mips/vpx_convolve8_avg_msa.c
vpx_dsp/mips/vpx_convolve8_avg_vert_msa.c
vpx_dsp/mips/vpx_convolve8_horiz_msa.c
vpx_dsp/mips/vpx_convolve8_msa.c
vpx_dsp/mips/vpx_convolve8_vert_msa.c

index b8fc0a7d3cc93965372de6cd14e62d905456b99a..43da9e54fb2f7b88578d38a476c3660e6de7d884 100644 (file)
@@ -348,13 +348,9 @@ void vpx_convolve8_avg_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
                                   const int16_t *filter_y, int y_step_q4,
                                   int w, int h) {
   assert(y_step_q4 == 16);
-  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(((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,
index 5d7c8f03bdb502d30f5e7efbf00e5695cccd5353..db0c2a4da5ad6c317ffe17acdef0e357df73e9a6 100644 (file)
@@ -958,13 +958,9 @@ void vpx_convolve8_avg_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
                                    const int16_t *filter_y, int y_step_q4,
                                    int w, int h) {
   assert(x_step_q4 == 16);
-  if (((const int32_t *)filter_x)[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_x)[0] == 0) {
+  assert(((const int32_t *)filter_x)[1] != 0x800000);
+
+  if (((const int32_t *)filter_x)[0] == 0) {
     vpx_convolve2_avg_horiz_dspr2(src, src_stride,
                                   dst, dst_stride,
                                   filter_x, x_step_q4,
index bab13a1326ed06c047bcc3967157a5e8187ef4c7..ddad186922835c8933fa1c377e7e966b43dc4925 100644 (file)
@@ -938,6 +938,9 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
 
   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__ (
@@ -949,14 +952,6 @@ void vpx_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride,
   if (intermediate_height < h)
     intermediate_height = 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,
index 2e51fd5c8bc588db5e73a5e359cddb8e73630445..ae78bab8924832ca60ec8a1452f51484f9a7a260 100644 (file)
@@ -842,13 +842,9 @@ void vpx_convolve8_horiz_dspr2(const uint8_t *src, ptrdiff_t src_stride,
                                const int16_t *filter_y, int y_step_q4,
                                int w, int h) {
   assert(x_step_q4 == 16);
-  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(((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,
index 05d088c1694d0997076c85e580f45e5e6bc3d02e..d553828c59a2b4a51f3cb65f0ba93281aeeff217 100644 (file)
@@ -334,13 +334,9 @@ void vpx_convolve8_vert_dspr2(const uint8_t *src, ptrdiff_t src_stride,
                               const int16_t *filter_y, int y_step_q4,
                               int w, int h) {
   assert(y_step_q4 == 16);
-  if (((const int32_t *)filter_y)[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_y)[0] == 0) {
+  assert(((const int32_t *)filter_y)[1] != 0x800000);
+
+  if (((const int32_t *)filter_y)[0] == 0) {
     vpx_convolve2_vert_dspr2(src, src_stride,
                              dst, dst_stride,
                              filter_x, x_step_q4,
index 75ec3df771471eb466482e36d7ef1b8d2fa0570d..f6244d834b7d4f24acd22c1b961071c62e71e798 100644 (file)
@@ -667,13 +667,7 @@ void vpx_convolve8_avg_horiz_msa(const uint8_t *src, ptrdiff_t src_stride,
   int8_t cnt, filt_hor[8];
 
   assert(x_step_q4 == 16);
-
-  if (((const int32_t *)filter_x)[1] == 0x800000) {
-    vpx_convolve_avg(src, src_stride, dst, dst_stride,
-                     filter_x, x_step_q4, filter_y, y_step_q4,
-                     w, h);
-    return;
-  }
+  assert(((const int32_t *)filter_x)[1] != 0x800000);
 
   for (cnt = 0; cnt < 8; ++cnt) {
     filt_hor[cnt] = filter_x[cnt];
index 9e96803d5fda966f7918efb836bcadfa4d447c8d..2abde6de83c3e14131866426cb21721764d76cdc 100644 (file)
@@ -577,14 +577,8 @@ void vpx_convolve8_avg_msa(const uint8_t *src, ptrdiff_t src_stride,
 
   assert(x_step_q4 == 16);
   assert(y_step_q4 == 16);
-
-  if (((const int32_t *)filter_x)[1] == 0x800000 &&
-      ((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);
-    return;
-  }
+  assert(((const int32_t *)filter_x)[1] != 0x800000);
+  assert(((const int32_t *)filter_y)[1] != 0x800000);
 
   for (cnt = 0; cnt < 8; ++cnt) {
     filt_hor[cnt] = filter_x[cnt];
index 4e1d180b6247d35615924ac16ee5d977889b1218..0164e41aa161a3c5614b86c2ac71687089a29083 100644 (file)
@@ -641,13 +641,7 @@ void vpx_convolve8_avg_vert_msa(const uint8_t *src, ptrdiff_t src_stride,
   int8_t cnt, filt_ver[8];
 
   assert(y_step_q4 == 16);
-
-  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);
-    return;
-  }
+  assert(((const int32_t *)filter_y)[1] != 0x800000);
 
   for (cnt = 0; cnt < 8; ++cnt) {
     filt_ver[cnt] = filter_y[cnt];
index 57df804dc89a414cf695f4b70eef6a89701bd24a..dbd120b0d5c546629f1b1175147e8c9169b45947 100644 (file)
@@ -627,13 +627,7 @@ void vpx_convolve8_horiz_msa(const uint8_t *src, ptrdiff_t src_stride,
   int8_t cnt, filt_hor[8];
 
   assert(x_step_q4 == 16);
-
-  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);
-    return;
-  }
+  assert(((const int32_t *)filter_x)[1] != 0x800000);
 
   for (cnt = 0; cnt < 8; ++cnt) {
     filt_hor[cnt] = filter_x[cnt];
index 355cc332f129262aa51ba561e422d3f50f9d7904..7546f13150095c355b8fd1a200071e668b96978e 100644 (file)
@@ -551,14 +551,8 @@ void vpx_convolve8_msa(const uint8_t *src, ptrdiff_t src_stride,
 
   assert(x_step_q4 == 16);
   assert(y_step_q4 == 16);
-
-  if (((const int32_t *)filter_x)[1] == 0x800000 &&
-      ((const int32_t *)filter_y)[1] == 0x800000) {
-    vpx_convolve_copy(src, src_stride, dst, dst_stride,
-                      filter_x, x_step_q4, filter_y, y_step_q4,
-                      w, h);
-    return;
-  }
+  assert(((const int32_t *)filter_x)[1] != 0x800000);
+  assert(((const int32_t *)filter_y)[1] != 0x800000);
 
   for (cnt = 0; cnt < 8; ++cnt) {
     filt_hor[cnt] = filter_x[cnt];
index f166005833acdce54ef4eed2937579e9c3aba384..527d4571991cd5ba56b5505f15bf74620ec3bcc2 100644 (file)
@@ -634,13 +634,7 @@ void vpx_convolve8_vert_msa(const uint8_t *src, ptrdiff_t src_stride,
   int8_t cnt, filt_ver[8];
 
   assert(y_step_q4 == 16);
-
-  if (((const int32_t *)filter_y)[1] == 0x800000) {
-    vpx_convolve_copy(src, src_stride, dst, dst_stride,
-                      filter_x, x_step_q4, filter_y, y_step_q4,
-                      w, h);
-    return;
-  }
+  assert(((const int32_t *)filter_y)[1] != 0x800000);
 
   for (cnt = 8; cnt--;) {
     filt_ver[cnt] = filter_y[cnt];