diff options
author | trav90 <travawine@palemoon.org> | 2018-10-18 21:53:44 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-18 21:53:44 -0500 |
commit | ec910d81405c736a4490383a250299a7837c2e64 (patch) | |
tree | 4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/aom_dsp/mips | |
parent | 01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff) | |
download | UXP-ec910d81405c736a4490383a250299a7837c2e64.tar UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz UXP-ec910d81405c736a4490383a250299a7837c2e64.zip |
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/aom_dsp/mips')
-rw-r--r-- | third_party/aom/aom_dsp/mips/convolve8_avg_dspr2.c | 5 | ||||
-rw-r--r-- | third_party/aom/aom_dsp/mips/convolve8_dspr2.c | 7 | ||||
-rw-r--r-- | third_party/aom/aom_dsp/mips/intrapred16_dspr2.c | 2 | ||||
-rw-r--r-- | third_party/aom/aom_dsp/mips/intrapred4_dspr2.c | 145 | ||||
-rw-r--r-- | third_party/aom/aom_dsp/mips/intrapred8_dspr2.c | 455 | ||||
-rw-r--r-- | third_party/aom/aom_dsp/mips/intrapred_msa.c | 190 | ||||
-rw-r--r-- | third_party/aom/aom_dsp/mips/inv_txfm_dspr2.h | 4 |
7 files changed, 19 insertions, 789 deletions
diff --git a/third_party/aom/aom_dsp/mips/convolve8_avg_dspr2.c b/third_party/aom/aom_dsp/mips/convolve8_avg_dspr2.c index 298065adb..3574da19f 100644 --- a/third_party/aom/aom_dsp/mips/convolve8_avg_dspr2.c +++ b/third_party/aom/aom_dsp/mips/convolve8_avg_dspr2.c @@ -407,6 +407,11 @@ void aom_convolve_avg_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint32_t tp1, tp2, tn1; uint32_t tp3, tp4, tn2; + (void)filter_x; + (void)filter_x_stride; + (void)filter_y; + (void)filter_y_stride; + /* prefetch data to cache memory */ prefetch_load(src); prefetch_load(src + 32); diff --git a/third_party/aom/aom_dsp/mips/convolve8_dspr2.c b/third_party/aom/aom_dsp/mips/convolve8_dspr2.c index c871702f4..dd4bc821a 100644 --- a/third_party/aom/aom_dsp/mips/convolve8_dspr2.c +++ b/third_party/aom/aom_dsp/mips/convolve8_dspr2.c @@ -1304,6 +1304,8 @@ void aom_convolve8_dspr2(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, int32_t intermediate_height = ((h * y_step_q4) >> 4) + 7; uint32_t pos = 38; + (void)x_step_q4; + assert(x_step_q4 == 16); assert(y_step_q4 == 16); assert(((const int32_t *)filter_x)[1] != 0x800000); @@ -1400,6 +1402,11 @@ void aom_convolve_copy_dspr2(const uint8_t *src, ptrdiff_t src_stride, int w, int h) { int x, y; + (void)filter_x; + (void)filter_x_stride; + (void)filter_y; + (void)filter_y_stride; + /* prefetch data to cache memory */ prefetch_load(src); prefetch_load(src + 32); diff --git a/third_party/aom/aom_dsp/mips/intrapred16_dspr2.c b/third_party/aom/aom_dsp/mips/intrapred16_dspr2.c index dc8f20208..7c221ae89 100644 --- a/third_party/aom/aom_dsp/mips/intrapred16_dspr2.c +++ b/third_party/aom/aom_dsp/mips/intrapred16_dspr2.c @@ -17,6 +17,8 @@ void aom_h_predictor_16x16_dspr2(uint8_t *dst, ptrdiff_t stride, int32_t tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8; int32_t tmp9, tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + (void)above; + __asm__ __volatile__( "lb %[tmp1], (%[left]) \n\t" "lb %[tmp2], 1(%[left]) \n\t" diff --git a/third_party/aom/aom_dsp/mips/intrapred4_dspr2.c b/third_party/aom/aom_dsp/mips/intrapred4_dspr2.c index ea7c02810..0a21979c7 100644 --- a/third_party/aom/aom_dsp/mips/intrapred4_dspr2.c +++ b/third_party/aom/aom_dsp/mips/intrapred4_dspr2.c @@ -15,6 +15,7 @@ void aom_h_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t tmp1, tmp2, tmp3, tmp4; + (void)above; __asm__ __volatile__( "lb %[tmp1], (%[left]) \n\t" @@ -78,148 +79,4 @@ void aom_dc_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, : [above] "r"(above), [left] "r"(left), [dst] "r"(dst), [stride] "r"(stride)); } - -void aom_tm_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride, - const uint8_t *above, const uint8_t *left) { - int32_t abovel, abover; - int32_t left0, left1, left2, left3; - int32_t res0, res1; - int32_t resl; - int32_t resr; - int32_t top_left; - uint8_t *cm = aom_ff_cropTbl; - - __asm__ __volatile__( - "ulw %[resl], (%[above]) \n\t" - - "lbu %[left0], (%[left]) \n\t" - "lbu %[left1], 1(%[left]) \n\t" - "lbu %[left2], 2(%[left]) \n\t" - "lbu %[left3], 3(%[left]) \n\t" - - "lbu %[top_left], -1(%[above]) \n\t" - - "preceu.ph.qbl %[abovel], %[resl] \n\t" - "preceu.ph.qbr %[abover], %[resl] \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "replv.ph %[left1], %[left1] \n\t" - "replv.ph %[left2], %[left2] \n\t" - "replv.ph %[left3], %[left3] \n\t" - - "replv.ph %[top_left], %[top_left] \n\t" - - "addu.ph %[resl], %[abovel], %[left0] \n\t" - "subu.ph %[resl], %[resl], %[top_left] \n\t" - - "addu.ph %[resr], %[abover], %[left0] \n\t" - "subu.ph %[resr], %[resr], %[top_left] \n\t" - - "sll %[res0], %[resr], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - - "sra %[res1], %[resr], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "sb %[res0], (%[dst]) \n\t" - - "sll %[res0], %[resl], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - - "sra %[res1], %[resl], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - - "addu.ph %[resl], %[abovel], %[left1] \n\t" - "subu.ph %[resl], %[resl], %[top_left] \n\t" - - "addu.ph %[resr], %[abover], %[left1] \n\t" - "subu.ph %[resr], %[resr], %[top_left] \n\t" - - "sb %[res0], 2(%[dst]) \n\t" - "sb %[res1], 3(%[dst]) \n\t" - - "add %[dst], %[dst], %[stride] \n\t" - - "sll %[res0], %[resr], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - - "sra %[res1], %[resr], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "sb %[res0], (%[dst]) \n\t" - - "sll %[res0], %[resl], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - - "sb %[res1], 1(%[dst]) \n\t" - "sra %[res1], %[resl], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - - "addu.ph %[resl], %[abovel], %[left2] \n\t" - "subu.ph %[resl], %[resl], %[top_left] \n\t" - - "addu.ph %[resr], %[abover], %[left2] \n\t" - "subu.ph %[resr], %[resr], %[top_left] \n\t" - - "sb %[res0], 2(%[dst]) \n\t" - "sb %[res1], 3(%[dst]) \n\t" - - "add %[dst], %[dst], %[stride] \n\t" - - "sll %[res0], %[resr], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - - "sra %[res1], %[resr], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "sb %[res0], (%[dst]) \n\t" - - "sll %[res0], %[resl], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - - "sb %[res1], 1(%[dst]) \n\t" - "sra %[res1], %[resl], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - - "addu.ph %[resl], %[abovel], %[left3] \n\t" - "subu.ph %[resl], %[resl], %[top_left] \n\t" - - "addu.ph %[resr], %[abover], %[left3] \n\t" - "subu.ph %[resr], %[resr], %[top_left] \n\t" - - "sb %[res0], 2(%[dst]) \n\t" - "sb %[res1], 3(%[dst]) \n\t" - - "add %[dst], %[dst], %[stride] \n\t" - - "sll %[res0], %[resr], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - - "sra %[res1], %[resr], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "sb %[res0], (%[dst]) \n\t" - - "sll %[res0], %[resl], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "lbux %[res0], %[res0](%[cm]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - - "sra %[res1], %[resl], 16 \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - - "sb %[res0], 2(%[dst]) \n\t" - "sb %[res1], 3(%[dst]) \n\t" - - : [abovel] "=&r"(abovel), [abover] "=&r"(abover), [left0] "=&r"(left0), - [left1] "=&r"(left1), [left2] "=&r"(left2), [res0] "=&r"(res0), - [res1] "=&r"(res1), [left3] "=&r"(left3), [resl] "=&r"(resl), - [resr] "=&r"(resr), [top_left] "=&r"(top_left) - : [above] "r"(above), [left] "r"(left), [dst] "r"(dst), - [stride] "r"(stride), [cm] "r"(cm)); -} #endif // #if HAVE_DSPR2 diff --git a/third_party/aom/aom_dsp/mips/intrapred8_dspr2.c b/third_party/aom/aom_dsp/mips/intrapred8_dspr2.c index 1114fbc00..d42a77c80 100644 --- a/third_party/aom/aom_dsp/mips/intrapred8_dspr2.c +++ b/third_party/aom/aom_dsp/mips/intrapred8_dspr2.c @@ -15,6 +15,7 @@ void aom_h_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, const uint8_t *above, const uint8_t *left) { int32_t tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8; + (void)above; __asm__ __volatile__( "lb %[tmp1], (%[left]) \n\t" @@ -146,458 +147,4 @@ void aom_dc_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, : [above] "r"(above), [left] "r"(left), [dst] "r"(dst), [stride] "r"(stride)); } - -void aom_tm_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride, - const uint8_t *above, const uint8_t *left) { - int32_t abovel, abover; - int32_t abovel_1, abover_1; - int32_t left0; - int32_t res0, res1, res2, res3; - int32_t reshw; - int32_t top_left; - uint8_t *cm = aom_ff_cropTbl; - - __asm__ __volatile__( - "ulw %[reshw], (%[above]) \n\t" - "ulw %[top_left], 4(%[above]) \n\t" - - "lbu %[left0], (%[left]) \n\t" - - "preceu.ph.qbl %[abovel], %[reshw] \n\t" - "preceu.ph.qbr %[abover], %[reshw] \n\t" - "preceu.ph.qbl %[abovel_1], %[top_left] \n\t" - "preceu.ph.qbr %[abover_1], %[top_left] \n\t" - - "lbu %[top_left], -1(%[above]) \n\t" - "replv.ph %[left0], %[left0] \n\t" - - "replv.ph %[top_left], %[top_left] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbu %[left0], 1(%[left]) \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "add %[dst], %[dst], %[stride] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbu %[left0], 2(%[left]) \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "add %[dst], %[dst], %[stride] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbu %[left0], 3(%[left]) \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "add %[dst], %[dst], %[stride] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbu %[left0], 4(%[left]) \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "add %[dst], %[dst], %[stride] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbu %[left0], 5(%[left]) \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "add %[dst], %[dst], %[stride] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbu %[left0], 6(%[left]) \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "add %[dst], %[dst], %[stride] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbu %[left0], 7(%[left]) \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - "replv.ph %[left0], %[left0] \n\t" - "add %[dst], %[dst], %[stride] \n\t" - - "addu.ph %[reshw], %[abovel], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], (%[dst]) \n\t" - "sb %[res1], 1(%[dst]) \n\t" - "sb %[res2], 2(%[dst]) \n\t" - "sb %[res3], 3(%[dst]) \n\t" - - "addu.ph %[reshw], %[abovel_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res2], %[reshw], 16 \n\t" - "sra %[res2], %[res2], 16 \n\t" - "sra %[res3], %[reshw], 16 \n\t" - - "addu.ph %[reshw], %[abover_1], %[left0] \n\t" - "subu.ph %[reshw], %[reshw], %[top_left] \n\t" - - "sll %[res0], %[reshw], 16 \n\t" - "sra %[res0], %[res0], 16 \n\t" - "sra %[res1], %[reshw], 16 \n\t" - - "lbux %[res0], %[res0](%[cm]) \n\t" - "lbux %[res1], %[res1](%[cm]) \n\t" - "lbux %[res2], %[res2](%[cm]) \n\t" - "lbux %[res3], %[res3](%[cm]) \n\t" - - "sb %[res0], 4(%[dst]) \n\t" - "sb %[res1], 5(%[dst]) \n\t" - "sb %[res2], 6(%[dst]) \n\t" - "sb %[res3], 7(%[dst]) \n\t" - - : [abovel] "=&r"(abovel), [abover] "=&r"(abover), - [abovel_1] "=&r"(abovel_1), [abover_1] "=&r"(abover_1), - [left0] "=&r"(left0), [res2] "=&r"(res2), [res3] "=&r"(res3), - [res0] "=&r"(res0), [res1] "=&r"(res1), [reshw] "=&r"(reshw), - [top_left] "=&r"(top_left) - : [above] "r"(above), [left] "r"(left), [dst] "r"(dst), - [stride] "r"(stride), [cm] "r"(cm)); -} #endif // #if HAVE_DSPR2 diff --git a/third_party/aom/aom_dsp/mips/intrapred_msa.c b/third_party/aom/aom_dsp/mips/intrapred_msa.c index e8eaec7a9..bcb9c9df9 100644 --- a/third_party/aom/aom_dsp/mips/intrapred_msa.c +++ b/third_party/aom/aom_dsp/mips/intrapred_msa.c @@ -382,176 +382,6 @@ static void intra_predict_128dc_32x32_msa(uint8_t *dst, int32_t dst_stride) { } } -static void intra_predict_tm_4x4_msa(const uint8_t *src_top_ptr, - const uint8_t *src_left, uint8_t *dst, - int32_t dst_stride) { - uint32_t val; - uint8_t top_left = src_top_ptr[-1]; - v16i8 src_left0, src_left1, src_left2, src_left3, tmp0, tmp1, src_top = { 0 }; - v16u8 src0, src1, src2, src3; - v8u16 src_top_left, vec0, vec1, vec2, vec3; - - src_top_left = (v8u16)__msa_fill_h(top_left); - val = LW(src_top_ptr); - src_top = (v16i8)__msa_insert_w((v4i32)src_top, 0, val); - - src_left0 = __msa_fill_b(src_left[0]); - src_left1 = __msa_fill_b(src_left[1]); - src_left2 = __msa_fill_b(src_left[2]); - src_left3 = __msa_fill_b(src_left[3]); - - ILVR_B4_UB(src_left0, src_top, src_left1, src_top, src_left2, src_top, - src_left3, src_top, src0, src1, src2, src3); - HADD_UB4_UH(src0, src1, src2, src3, vec0, vec1, vec2, vec3); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, vec0, vec1); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, vec2, vec3); - SAT_UH4_UH(vec0, vec1, vec2, vec3, 7); - PCKEV_B2_SB(vec1, vec0, vec3, vec2, tmp0, tmp1); - ST4x4_UB(tmp0, tmp1, 0, 2, 0, 2, dst, dst_stride); -} - -static void intra_predict_tm_8x8_msa(const uint8_t *src_top_ptr, - const uint8_t *src_left, uint8_t *dst, - int32_t dst_stride) { - uint64_t val; - uint8_t top_left = src_top_ptr[-1]; - uint32_t loop_cnt; - v16i8 src_left0, src_left1, src_left2, src_left3, tmp0, tmp1, src_top = { 0 }; - v8u16 src_top_left, vec0, vec1, vec2, vec3; - v16u8 src0, src1, src2, src3; - - val = LD(src_top_ptr); - src_top = (v16i8)__msa_insert_d((v2i64)src_top, 0, val); - src_top_left = (v8u16)__msa_fill_h(top_left); - - for (loop_cnt = 2; loop_cnt--;) { - src_left0 = __msa_fill_b(src_left[0]); - src_left1 = __msa_fill_b(src_left[1]); - src_left2 = __msa_fill_b(src_left[2]); - src_left3 = __msa_fill_b(src_left[3]); - src_left += 4; - - ILVR_B4_UB(src_left0, src_top, src_left1, src_top, src_left2, src_top, - src_left3, src_top, src0, src1, src2, src3); - HADD_UB4_UH(src0, src1, src2, src3, vec0, vec1, vec2, vec3); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, vec0, vec1); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, vec2, vec3); - SAT_UH4_UH(vec0, vec1, vec2, vec3, 7); - PCKEV_B2_SB(vec1, vec0, vec3, vec2, tmp0, tmp1); - ST8x4_UB(tmp0, tmp1, dst, dst_stride); - dst += (4 * dst_stride); - } -} - -static void intra_predict_tm_16x16_msa(const uint8_t *src_top_ptr, - const uint8_t *src_left, uint8_t *dst, - int32_t dst_stride) { - uint8_t top_left = src_top_ptr[-1]; - uint32_t loop_cnt; - v16i8 src_top, src_left0, src_left1, src_left2, src_left3; - v8u16 src_top_left, res_r, res_l; - - src_top = LD_SB(src_top_ptr); - src_top_left = (v8u16)__msa_fill_h(top_left); - - for (loop_cnt = 4; loop_cnt--;) { - src_left0 = __msa_fill_b(src_left[0]); - src_left1 = __msa_fill_b(src_left[1]); - src_left2 = __msa_fill_b(src_left[2]); - src_left3 = __msa_fill_b(src_left[3]); - src_left += 4; - - ILVRL_B2_UH(src_left0, src_top, res_r, res_l); - HADD_UB2_UH(res_r, res_l, res_r, res_l); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r, res_l); - - SAT_UH2_UH(res_r, res_l, 7); - PCKEV_ST_SB(res_r, res_l, dst); - dst += dst_stride; - - ILVRL_B2_UH(src_left1, src_top, res_r, res_l); - HADD_UB2_UH(res_r, res_l, res_r, res_l); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r, res_l); - SAT_UH2_UH(res_r, res_l, 7); - PCKEV_ST_SB(res_r, res_l, dst); - dst += dst_stride; - - ILVRL_B2_UH(src_left2, src_top, res_r, res_l); - HADD_UB2_UH(res_r, res_l, res_r, res_l); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r, res_l); - SAT_UH2_UH(res_r, res_l, 7); - PCKEV_ST_SB(res_r, res_l, dst); - dst += dst_stride; - - ILVRL_B2_UH(src_left3, src_top, res_r, res_l); - HADD_UB2_UH(res_r, res_l, res_r, res_l); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r, res_l); - SAT_UH2_UH(res_r, res_l, 7); - PCKEV_ST_SB(res_r, res_l, dst); - dst += dst_stride; - } -} - -static void intra_predict_tm_32x32_msa(const uint8_t *src_top, - const uint8_t *src_left, uint8_t *dst, - int32_t dst_stride) { - uint8_t top_left = src_top[-1]; - uint32_t loop_cnt; - v16i8 src_top0, src_top1, src_left0, src_left1, src_left2, src_left3; - v8u16 src_top_left, res_r0, res_r1, res_l0, res_l1; - - LD_SB2(src_top, 16, src_top0, src_top1); - src_top_left = (v8u16)__msa_fill_h(top_left); - - for (loop_cnt = 8; loop_cnt--;) { - src_left0 = __msa_fill_b(src_left[0]); - src_left1 = __msa_fill_b(src_left[1]); - src_left2 = __msa_fill_b(src_left[2]); - src_left3 = __msa_fill_b(src_left[3]); - src_left += 4; - - ILVR_B2_UH(src_left0, src_top0, src_left0, src_top1, res_r0, res_r1); - ILVL_B2_UH(src_left0, src_top0, src_left0, src_top1, res_l0, res_l1); - HADD_UB4_UH(res_r0, res_l0, res_r1, res_l1, res_r0, res_l0, res_r1, res_l1); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r0, res_l0); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r1, res_l1); - SAT_UH4_UH(res_r0, res_l0, res_r1, res_l1, 7); - PCKEV_ST_SB(res_r0, res_l0, dst); - PCKEV_ST_SB(res_r1, res_l1, dst + 16); - dst += dst_stride; - - ILVR_B2_UH(src_left1, src_top0, src_left1, src_top1, res_r0, res_r1); - ILVL_B2_UH(src_left1, src_top0, src_left1, src_top1, res_l0, res_l1); - HADD_UB4_UH(res_r0, res_l0, res_r1, res_l1, res_r0, res_l0, res_r1, res_l1); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r0, res_l0); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r1, res_l1); - SAT_UH4_UH(res_r0, res_l0, res_r1, res_l1, 7); - PCKEV_ST_SB(res_r0, res_l0, dst); - PCKEV_ST_SB(res_r1, res_l1, dst + 16); - dst += dst_stride; - - ILVR_B2_UH(src_left2, src_top0, src_left2, src_top1, res_r0, res_r1); - ILVL_B2_UH(src_left2, src_top0, src_left2, src_top1, res_l0, res_l1); - HADD_UB4_UH(res_r0, res_l0, res_r1, res_l1, res_r0, res_l0, res_r1, res_l1); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r0, res_l0); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r1, res_l1); - SAT_UH4_UH(res_r0, res_l0, res_r1, res_l1, 7); - PCKEV_ST_SB(res_r0, res_l0, dst); - PCKEV_ST_SB(res_r1, res_l1, dst + 16); - dst += dst_stride; - - ILVR_B2_UH(src_left3, src_top0, src_left3, src_top1, res_r0, res_r1); - ILVL_B2_UH(src_left3, src_top0, src_left3, src_top1, res_l0, res_l1); - HADD_UB4_UH(res_r0, res_l0, res_r1, res_l1, res_r0, res_l0, res_r1, res_l1); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r0, res_l0); - IPRED_SUBS_UH2_UH(src_top_left, src_top_left, res_r1, res_l1); - SAT_UH4_UH(res_r0, res_l0, res_r1, res_l1, 7); - PCKEV_ST_SB(res_r0, res_l0, dst); - PCKEV_ST_SB(res_r1, res_l1, dst + 16); - dst += dst_stride; - } -} - void aom_v_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left) { (void)left; @@ -717,23 +547,3 @@ void aom_dc_128_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, intra_predict_128dc_32x32_msa(dst, y_stride); } - -void aom_tm_predictor_4x4_msa(uint8_t *dst, ptrdiff_t y_stride, - const uint8_t *above, const uint8_t *left) { - intra_predict_tm_4x4_msa(above, left, dst, y_stride); -} - -void aom_tm_predictor_8x8_msa(uint8_t *dst, ptrdiff_t y_stride, - const uint8_t *above, const uint8_t *left) { - intra_predict_tm_8x8_msa(above, left, dst, y_stride); -} - -void aom_tm_predictor_16x16_msa(uint8_t *dst, ptrdiff_t y_stride, - const uint8_t *above, const uint8_t *left) { - intra_predict_tm_16x16_msa(above, left, dst, y_stride); -} - -void aom_tm_predictor_32x32_msa(uint8_t *dst, ptrdiff_t y_stride, - const uint8_t *above, const uint8_t *left) { - intra_predict_tm_32x32_msa(above, left, dst, y_stride); -} diff --git a/third_party/aom/aom_dsp/mips/inv_txfm_dspr2.h b/third_party/aom/aom_dsp/mips/inv_txfm_dspr2.h index 8a85e26f3..c69835173 100644 --- a/third_party/aom/aom_dsp/mips/inv_txfm_dspr2.h +++ b/third_party/aom/aom_dsp/mips/inv_txfm_dspr2.h @@ -24,10 +24,12 @@ extern "C" { #endif #if HAVE_DSPR2 +/* Note: this macro expects a local int32_t named out to exist, and will write + * to that variable. */ #define DCT_CONST_ROUND_SHIFT_TWICE_COSPI_16_64(input) \ ({ \ \ - int32_t tmp, out; \ + int32_t tmp; \ int dct_cost_rounding = DCT_CONST_ROUNDING; \ int in = input; \ \ |