mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 21:39:59 +02:00
MIPS: fix functions to use generic BPS istead of hardcoded value
Change-Id: I2d68abef886eff7f8df230f155b758dccd7d04fd
This commit is contained in:
@ -16,6 +16,8 @@
|
||||
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
|
||||
#include "./mips_macro.h"
|
||||
|
||||
static const int kC1 = 20091 + (1 << 16);
|
||||
static const int kC2 = 35468;
|
||||
|
||||
@ -389,7 +391,7 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"sra %[temp7], %[temp7], 3 \n\t"
|
||||
"sra %[temp4], %[temp4], 3 \n\t"
|
||||
"addiu %[temp6], $zero, 255 \n\t"
|
||||
"lbu %[temp1], 0(%[dst]) \n\t"
|
||||
"lbu %[temp1], 0+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"addu %[temp1], %[temp1], %[temp5] \n\t"
|
||||
"sra %[temp5], %[temp1], 8 \n\t"
|
||||
"sra %[temp18], %[temp1], 31 \n\t"
|
||||
@ -397,8 +399,8 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"xor %[temp1], %[temp1], %[temp1] \n\t"
|
||||
"movz %[temp1], %[temp6], %[temp18] \n\t"
|
||||
"1: \n\t"
|
||||
"lbu %[temp18], 1(%[dst]) \n\t"
|
||||
"sb %[temp1], 0(%[dst]) \n\t"
|
||||
"lbu %[temp18], 1+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp1], 0+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"addu %[temp18], %[temp18], %[temp11] \n\t"
|
||||
"sra %[temp11], %[temp18], 8 \n\t"
|
||||
"sra %[temp1], %[temp18], 31 \n\t"
|
||||
@ -406,8 +408,8 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"xor %[temp18], %[temp18], %[temp18] \n\t"
|
||||
"movz %[temp18], %[temp6], %[temp1] \n\t"
|
||||
"2: \n\t"
|
||||
"lbu %[temp1], 2(%[dst]) \n\t"
|
||||
"sb %[temp18], 1(%[dst]) \n\t"
|
||||
"lbu %[temp1], 2+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp18], 1+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"addu %[temp1], %[temp1], %[temp8] \n\t"
|
||||
"sra %[temp8], %[temp1], 8 \n\t"
|
||||
"sra %[temp18], %[temp1], 31 \n\t"
|
||||
@ -415,8 +417,8 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"xor %[temp1], %[temp1], %[temp1] \n\t"
|
||||
"movz %[temp1], %[temp6], %[temp18] \n\t"
|
||||
"3: \n\t"
|
||||
"lbu %[temp18], 3(%[dst]) \n\t"
|
||||
"sb %[temp1], 2(%[dst]) \n\t"
|
||||
"lbu %[temp18], 3+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp1], 2+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"addu %[temp18], %[temp18], %[temp16] \n\t"
|
||||
"sra %[temp16], %[temp18], 8 \n\t"
|
||||
"sra %[temp1], %[temp18], 31 \n\t"
|
||||
@ -424,11 +426,11 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"xor %[temp18], %[temp18], %[temp18] \n\t"
|
||||
"movz %[temp18], %[temp6], %[temp1] \n\t"
|
||||
"4: \n\t"
|
||||
"sb %[temp18], 3(%[dst]) \n\t"
|
||||
"lbu %[temp5], 32(%[dst]) \n\t"
|
||||
"lbu %[temp8], 33(%[dst]) \n\t"
|
||||
"lbu %[temp11], 34(%[dst]) \n\t"
|
||||
"lbu %[temp16], 35(%[dst]) \n\t"
|
||||
"sb %[temp18], 3+0*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp5], 0+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp8], 1+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp11], 2+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp16], 3+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"addu %[temp5], %[temp5], %[temp17] \n\t"
|
||||
"addu %[temp8], %[temp8], %[temp15] \n\t"
|
||||
"addu %[temp11], %[temp11], %[temp12] \n\t"
|
||||
@ -457,14 +459,14 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"xor %[temp16], %[temp16], %[temp16] \n\t"
|
||||
"movz %[temp16], %[temp6], %[temp15] \n\t"
|
||||
"8: \n\t"
|
||||
"sb %[temp5], 32(%[dst]) \n\t"
|
||||
"sb %[temp8], 33(%[dst]) \n\t"
|
||||
"sb %[temp11], 34(%[dst]) \n\t"
|
||||
"sb %[temp16], 35(%[dst]) \n\t"
|
||||
"lbu %[temp5], 64(%[dst]) \n\t"
|
||||
"lbu %[temp8], 65(%[dst]) \n\t"
|
||||
"lbu %[temp11], 66(%[dst]) \n\t"
|
||||
"lbu %[temp16], 67(%[dst]) \n\t"
|
||||
"sb %[temp5], 0+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp8], 1+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp11], 2+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp16], 3+1*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp5], 0+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp8], 1+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp11], 2+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp16], 3+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"addu %[temp5], %[temp5], %[temp9] \n\t"
|
||||
"addu %[temp8], %[temp8], %[temp3] \n\t"
|
||||
"addu %[temp11], %[temp11], %[temp0] \n\t"
|
||||
@ -493,14 +495,14 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"xor %[temp16], %[temp16], %[temp16] \n\t"
|
||||
"movz %[temp16], %[temp6], %[temp3] \n\t"
|
||||
"12: \n\t"
|
||||
"sb %[temp5], 64(%[dst]) \n\t"
|
||||
"sb %[temp8], 65(%[dst]) \n\t"
|
||||
"sb %[temp11], 66(%[dst]) \n\t"
|
||||
"sb %[temp16], 67(%[dst]) \n\t"
|
||||
"lbu %[temp5], 96(%[dst]) \n\t"
|
||||
"lbu %[temp8], 97(%[dst]) \n\t"
|
||||
"lbu %[temp11], 98(%[dst]) \n\t"
|
||||
"lbu %[temp16], 99(%[dst]) \n\t"
|
||||
"sb %[temp5], 0+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp8], 1+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp11], 2+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp16], 3+2*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp5], 0+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp8], 1+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp11], 2+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"lbu %[temp16], 3+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"addu %[temp5], %[temp5], %[temp13] \n\t"
|
||||
"addu %[temp8], %[temp8], %[temp7] \n\t"
|
||||
"addu %[temp11], %[temp11], %[temp4] \n\t"
|
||||
@ -529,10 +531,10 @@ static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
"xor %[temp16], %[temp16], %[temp16] \n\t"
|
||||
"movz %[temp16], %[temp6], %[temp3] \n\t"
|
||||
"16: \n\t"
|
||||
"sb %[temp5], 96(%[dst]) \n\t"
|
||||
"sb %[temp8], 97(%[dst]) \n\t"
|
||||
"sb %[temp11], 98(%[dst]) \n\t"
|
||||
"sb %[temp16], 99(%[dst]) \n\t"
|
||||
"sb %[temp5], 0+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp8], 1+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp11], 2+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
"sb %[temp16], 3+3*"XSTR(BPS)"(%[dst]) \n\t"
|
||||
|
||||
: [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2),
|
||||
[temp3]"=&r"(temp3), [temp4]"=&r"(temp4), [temp5]"=&r"(temp5),
|
||||
|
Reference in New Issue
Block a user