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

Unified Diff: source/libvpx/vpx_dsp/mips/vpx_convolve8_msa.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/vpx_convolve8_msa.c
diff --git a/source/libvpx/vpx_dsp/mips/vpx_convolve8_msa.c b/source/libvpx/vpx_dsp/mips/vpx_convolve8_msa.c
index 52f2028cd23401f601a5cb4bf2812b91d60d8973..7546f13150095c355b8fd1a200071e668b96978e 100644
--- a/source/libvpx/vpx_dsp/mips/vpx_convolve8_msa.c
+++ b/source/libvpx/vpx_dsp/mips/vpx_convolve8_msa.c
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <assert.h>
#include "./vpx_dsp_rtcd.h"
#include "vpx_dsp/mips/vpx_convolve_msa.h"
@@ -256,7 +257,6 @@ static void common_hv_2ht_2vt_4x4_msa(const uint8_t *src, int32_t src_stride,
ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp0, tmp1);
SRARI_H2_UH(tmp0, tmp1, FILTER_BITS);
- SAT_UH2_UH(tmp0, tmp1, 7);
PCKEV_B2_UB(tmp0, tmp0, tmp1, tmp1, res0, res1);
ST4x4_UB(res0, res1, 0, 1, 0, 1, dst, dst_stride);
}
@@ -298,7 +298,6 @@ static void common_hv_2ht_2vt_4x8_msa(const uint8_t *src, int32_t src_stride,
DOTP_UB4_UH(vec0, vec1, vec2, vec3, filt_vt, filt_vt, filt_vt, filt_vt,
vec4, vec5, vec6, vec7);
SRARI_H4_UH(vec4, vec5, vec6, vec7, FILTER_BITS);
- SAT_UH4_UH(vec4, vec5, vec6, vec7, 7);
PCKEV_B4_SB(vec4, vec4, vec5, vec5, vec6, vec6, vec7, vec7, res0, res1,
res2, res3);
ST4x4_UB(res0, res1, 0, 1, 0, 1, dst, dst_stride);
@@ -357,7 +356,6 @@ static void common_hv_2ht_2vt_8x4_msa(const uint8_t *src, int32_t src_stride,
tmp3 = __msa_dotp_u_h(vec3, filt_vt);
SRARI_H4_UH(tmp0, tmp1, tmp2, tmp3, FILTER_BITS);
- SAT_UH4_UH(tmp0, tmp1, tmp2, tmp3, 7);
PCKEV_B2_SB(tmp1, tmp0, tmp3, tmp2, out0, out1);
ST8x4_UB(out0, out1, dst, dst_stride);
}
@@ -402,7 +400,6 @@ static void common_hv_2ht_2vt_8x8mult_msa(const uint8_t *src,
tmp2 = __msa_dotp_u_h(vec0, filt_vt);
SRARI_H2_UH(tmp1, tmp2, FILTER_BITS);
- SAT_UH2_UH(tmp1, tmp2, 7);
hz_out1 = HORIZ_2TAP_FILT_UH(src3, src3, mask, filt_hz, FILTER_BITS);
vec0 = (v16u8)__msa_ilvev_b((v16i8)hz_out1, (v16i8)hz_out0);
@@ -415,7 +412,6 @@ static void common_hv_2ht_2vt_8x8mult_msa(const uint8_t *src,
tmp4 = __msa_dotp_u_h(vec0, filt_vt);
SRARI_H2_UH(tmp3, tmp4, FILTER_BITS);
- SAT_UH2_UH(tmp3, tmp4, 7);
PCKEV_B2_SB(tmp2, tmp1, tmp4, tmp3, out0, out1);
ST8x4_UB(out0, out1, dst, dst_stride);
dst += (4 * dst_stride);
@@ -437,7 +433,6 @@ static void common_hv_2ht_2vt_8x8mult_msa(const uint8_t *src,
tmp8 = __msa_dotp_u_h(vec0, filt_vt);
SRARI_H4_UH(tmp5, tmp6, tmp7, tmp8, FILTER_BITS);
- SAT_UH4_UH(tmp5, tmp6, tmp7, tmp8, 7);
PCKEV_B2_SB(tmp6, tmp5, tmp8, tmp7, out0, out1);
ST8x4_UB(out0, out1, dst, dst_stride);
dst += (4 * dst_stride);
@@ -492,7 +487,6 @@ static void common_hv_2ht_2vt_16w_msa(const uint8_t *src, int32_t src_stride,
ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
SRARI_H2_UH(tmp1, tmp2, FILTER_BITS);
- SAT_UH2_UH(tmp1, tmp2, 7);
PCKEV_ST_SB(tmp1, tmp2, dst);
dst += dst_stride;
@@ -501,7 +495,6 @@ static void common_hv_2ht_2vt_16w_msa(const uint8_t *src, int32_t src_stride,
ILVEV_B2_UB(hz_out1, hz_out0, hz_out3, hz_out2, vec0, vec1);
DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
SRARI_H2_UH(tmp1, tmp2, FILTER_BITS);
- SAT_UH2_UH(tmp1, tmp2, 7);
PCKEV_ST_SB(tmp1, tmp2, dst);
dst += dst_stride;
@@ -510,7 +503,6 @@ static void common_hv_2ht_2vt_16w_msa(const uint8_t *src, int32_t src_stride,
ILVEV_B2_UB(hz_out0, hz_out1, hz_out2, hz_out3, vec0, vec1);
DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
SRARI_H2_UH(tmp1, tmp2, FILTER_BITS);
- SAT_UH2_UH(tmp1, tmp2, 7);
PCKEV_ST_SB(tmp1, tmp2, dst);
dst += dst_stride;
@@ -519,7 +511,6 @@ static void common_hv_2ht_2vt_16w_msa(const uint8_t *src, int32_t src_stride,
ILVEV_B2_UB(hz_out1, hz_out0, hz_out3, hz_out2, vec0, vec1);
DOTP_UB2_UH(vec0, vec1, filt_vt, filt_vt, tmp1, tmp2);
SRARI_H2_UH(tmp1, tmp2, FILTER_BITS);
- SAT_UH2_UH(tmp1, tmp2, 7);
PCKEV_ST_SB(tmp1, tmp2, dst);
dst += dst_stride;
}
@@ -558,20 +549,10 @@ void vpx_convolve8_msa(const uint8_t *src, ptrdiff_t src_stride,
int32_t w, int32_t h) {
int8_t cnt, filt_hor[8], filt_ver[8];
- if (16 != x_step_q4 || 16 != y_step_q4) {
- vpx_convolve8_c(src, src_stride, dst, dst_stride,
- filter_x, x_step_q4, filter_y, y_step_q4,
- w, h);
- return;
- }
-
- 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(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);
for (cnt = 0; cnt < 8; ++cnt) {
filt_hor[cnt] = filter_x[cnt];
« no previous file with comments | « source/libvpx/vpx_dsp/mips/vpx_convolve8_horiz_msa.c ('k') | source/libvpx/vpx_dsp/mips/vpx_convolve8_vert_dspr2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698