mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-19 02:12:52 +01:00
cosmetics:
* remove MIPS32 suffix from static function names * fix a long line in enc_neon.c Change-Id: Ia1294ae46f471b3eb1e9ba43c6aa1b29a7aeb447
This commit is contained in:
parent
953b074677
commit
fe9317c9bf
@ -117,44 +117,44 @@ static WEBP_INLINE void FilterLoop24(uint8_t* p,
|
||||
}
|
||||
|
||||
// on macroblock edges
|
||||
static void VFilter16MIPS32(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void VFilter16(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
FilterLoop26(p, stride, 1, 16, thresh, ithresh, hev_thresh);
|
||||
}
|
||||
|
||||
static void HFilter16MIPS32(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void HFilter16(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
FilterLoop26(p, 1, stride, 16, thresh, ithresh, hev_thresh);
|
||||
}
|
||||
|
||||
// 8-pixels wide variant, for chroma filtering
|
||||
static void VFilter8MIPS32(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void VFilter8(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
FilterLoop26(u, stride, 1, 8, thresh, ithresh, hev_thresh);
|
||||
FilterLoop26(v, stride, 1, 8, thresh, ithresh, hev_thresh);
|
||||
}
|
||||
|
||||
static void HFilter8MIPS32(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void HFilter8(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
FilterLoop26(u, 1, stride, 8, thresh, ithresh, hev_thresh);
|
||||
FilterLoop26(v, 1, stride, 8, thresh, ithresh, hev_thresh);
|
||||
}
|
||||
|
||||
static void VFilter8iMIPS32(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void VFilter8i(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
FilterLoop24(u + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh);
|
||||
FilterLoop24(v + 4 * stride, stride, 1, 8, thresh, ithresh, hev_thresh);
|
||||
}
|
||||
|
||||
static void HFilter8iMIPS32(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void HFilter8i(uint8_t* u, uint8_t* v, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
FilterLoop24(u + 4, 1, stride, 8, thresh, ithresh, hev_thresh);
|
||||
FilterLoop24(v + 4, 1, stride, 8, thresh, ithresh, hev_thresh);
|
||||
}
|
||||
|
||||
// on three inner edges
|
||||
static void VFilter16iMIPS32(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void VFilter16i(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
int k;
|
||||
for (k = 3; k > 0; --k) {
|
||||
p += 4 * stride;
|
||||
@ -162,8 +162,8 @@ static void VFilter16iMIPS32(uint8_t* p, int stride,
|
||||
}
|
||||
}
|
||||
|
||||
static void HFilter16iMIPS32(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
static void HFilter16i(uint8_t* p, int stride,
|
||||
int thresh, int ithresh, int hev_thresh) {
|
||||
int k;
|
||||
for (k = 3; k > 0; --k) {
|
||||
p += 4;
|
||||
@ -174,7 +174,7 @@ static void HFilter16iMIPS32(uint8_t* p, int stride,
|
||||
//------------------------------------------------------------------------------
|
||||
// Simple In-loop filtering (Paragraph 15.2)
|
||||
|
||||
static void SimpleVFilter16MIPS32(uint8_t* p, int stride, int thresh) {
|
||||
static void SimpleVFilter16(uint8_t* p, int stride, int thresh) {
|
||||
int i;
|
||||
for (i = 0; i < 16; ++i) {
|
||||
if (needs_filter(p + i, stride, thresh)) {
|
||||
@ -183,7 +183,7 @@ static void SimpleVFilter16MIPS32(uint8_t* p, int stride, int thresh) {
|
||||
}
|
||||
}
|
||||
|
||||
static void SimpleHFilter16MIPS32(uint8_t* p, int stride, int thresh) {
|
||||
static void SimpleHFilter16(uint8_t* p, int stride, int thresh) {
|
||||
int i;
|
||||
for (i = 0; i < 16; ++i) {
|
||||
if (needs_filter(p + i * stride, 1, thresh)) {
|
||||
@ -192,23 +192,23 @@ static void SimpleHFilter16MIPS32(uint8_t* p, int stride, int thresh) {
|
||||
}
|
||||
}
|
||||
|
||||
static void SimpleVFilter16iMIPS32(uint8_t* p, int stride, int thresh) {
|
||||
static void SimpleVFilter16i(uint8_t* p, int stride, int thresh) {
|
||||
int k;
|
||||
for (k = 3; k > 0; --k) {
|
||||
p += 4 * stride;
|
||||
SimpleVFilter16MIPS32(p, stride, thresh);
|
||||
SimpleVFilter16(p, stride, thresh);
|
||||
}
|
||||
}
|
||||
|
||||
static void SimpleHFilter16iMIPS32(uint8_t* p, int stride, int thresh) {
|
||||
static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) {
|
||||
int k;
|
||||
for (k = 3; k > 0; --k) {
|
||||
p += 4;
|
||||
SimpleHFilter16MIPS32(p, stride, thresh);
|
||||
SimpleHFilter16(p, stride, thresh);
|
||||
}
|
||||
}
|
||||
|
||||
static void TransformOneMIPS32(const int16_t* in, uint8_t* dst) {
|
||||
static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||
int temp0, temp1, temp2, temp3, temp4;
|
||||
int temp5, temp6, temp7, temp8, temp9;
|
||||
int temp10, temp11, temp12, temp13, temp14;
|
||||
@ -541,10 +541,10 @@ static void TransformOneMIPS32(const int16_t* in, uint8_t* dst) {
|
||||
);
|
||||
}
|
||||
|
||||
static void TransformTwoMIPS32(const int16_t* in, uint8_t* dst, int do_two) {
|
||||
TransformOneMIPS32(in, dst);
|
||||
static void TransformTwo(const int16_t* in, uint8_t* dst, int do_two) {
|
||||
TransformOne(in, dst);
|
||||
if (do_two) {
|
||||
TransformOneMIPS32(in + 16, dst + 4);
|
||||
TransformOne(in + 16, dst + 4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -559,20 +559,20 @@ void VP8DspInitMIPS32(void) {
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
VP8InitClipTables();
|
||||
|
||||
VP8Transform = TransformTwoMIPS32;
|
||||
VP8Transform = TransformTwo;
|
||||
|
||||
VP8VFilter16 = VFilter16MIPS32;
|
||||
VP8HFilter16 = HFilter16MIPS32;
|
||||
VP8VFilter8 = VFilter8MIPS32;
|
||||
VP8HFilter8 = HFilter8MIPS32;
|
||||
VP8VFilter16i = VFilter16iMIPS32;
|
||||
VP8HFilter16i = HFilter16iMIPS32;
|
||||
VP8VFilter8i = VFilter8iMIPS32;
|
||||
VP8HFilter8i = HFilter8iMIPS32;
|
||||
VP8VFilter16 = VFilter16;
|
||||
VP8HFilter16 = HFilter16;
|
||||
VP8VFilter8 = VFilter8;
|
||||
VP8HFilter8 = HFilter8;
|
||||
VP8VFilter16i = VFilter16i;
|
||||
VP8HFilter16i = HFilter16i;
|
||||
VP8VFilter8i = VFilter8i;
|
||||
VP8HFilter8i = HFilter8i;
|
||||
|
||||
VP8SimpleVFilter16 = SimpleVFilter16MIPS32;
|
||||
VP8SimpleHFilter16 = SimpleHFilter16MIPS32;
|
||||
VP8SimpleVFilter16i = SimpleVFilter16iMIPS32;
|
||||
VP8SimpleHFilter16i = SimpleHFilter16iMIPS32;
|
||||
VP8SimpleVFilter16 = SimpleVFilter16;
|
||||
VP8SimpleHFilter16 = SimpleHFilter16;
|
||||
VP8SimpleVFilter16i = SimpleVFilter16i;
|
||||
VP8SimpleHFilter16i = SimpleHFilter16i;
|
||||
#endif // WEBP_USE_MIPS32
|
||||
}
|
||||
|
@ -111,9 +111,8 @@ static const int kC2 = 35468;
|
||||
"sb %["#TEMP12"], "#D"(%[temp20]) \n\t"
|
||||
|
||||
// Does one or two inverse transforms.
|
||||
static WEBP_INLINE void ITransformOneMIPS32(const uint8_t* ref,
|
||||
const int16_t* in,
|
||||
uint8_t* dst) {
|
||||
static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in,
|
||||
uint8_t* dst) {
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5, temp6;
|
||||
int temp7, temp8, temp9, temp10, temp11, temp12, temp13;
|
||||
int temp14, temp15, temp16, temp17, temp18, temp19, temp20, temp21;
|
||||
@ -144,11 +143,11 @@ static WEBP_INLINE void ITransformOneMIPS32(const uint8_t* ref,
|
||||
);
|
||||
}
|
||||
|
||||
static void ITransformMIPS32(const uint8_t* ref, const int16_t* in,
|
||||
uint8_t* dst, int do_two) {
|
||||
ITransformOneMIPS32(ref, in, dst);
|
||||
static void ITransform(const uint8_t* ref, const int16_t* in,
|
||||
uint8_t* dst, int do_two) {
|
||||
ITransformOne(ref, in, dst);
|
||||
if (do_two) {
|
||||
ITransformOneMIPS32(ref + 4, in + 16, dst + 4);
|
||||
ITransformOne(ref + 4, in + 16, dst + 4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,8 +186,8 @@ static void ITransformMIPS32(const uint8_t* ref, const int16_t* in,
|
||||
"sh %[temp5], "#J"(%[ppin]) \n\t" \
|
||||
"sh %[level], "#N"(%[pout]) \n\t"
|
||||
|
||||
static int QuantizeBlockMIPS32(int16_t in[16], int16_t out[16],
|
||||
const VP8Matrix* const mtx) {
|
||||
static int QuantizeBlock(int16_t in[16], int16_t out[16],
|
||||
const VP8Matrix* const mtx) {
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5;
|
||||
int sign, coeff, level, i;
|
||||
int max_level = MAX_LEVEL;
|
||||
@ -353,8 +352,8 @@ static int QuantizeBlockMIPS32(int16_t in[16], int16_t out[16],
|
||||
"msub %[temp6], %[temp0] \n\t" \
|
||||
"msub %[temp7], %[temp1] \n\t"
|
||||
|
||||
static int Disto4x4MIPS32(const uint8_t* const a, const uint8_t* const b,
|
||||
const uint16_t* const w) {
|
||||
static int Disto4x4(const uint8_t* const a, const uint8_t* const b,
|
||||
const uint16_t* const w) {
|
||||
int tmp[32];
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8;
|
||||
|
||||
@ -388,13 +387,13 @@ static int Disto4x4MIPS32(const uint8_t* const a, const uint8_t* const b,
|
||||
#undef VERTICAL_PASS
|
||||
#undef HORIZONTAL_PASS
|
||||
|
||||
static int Disto16x16MIPS32(const uint8_t* const a, const uint8_t* const b,
|
||||
const uint16_t* const w) {
|
||||
static int Disto16x16(const uint8_t* const a, const uint8_t* const b,
|
||||
const uint16_t* const w) {
|
||||
int D = 0;
|
||||
int x, y;
|
||||
for (y = 0; y < 16 * BPS; y += 4 * BPS) {
|
||||
for (x = 0; x < 16; x += 4) {
|
||||
D += Disto4x4MIPS32(a + x + y, b + x + y, w);
|
||||
D += Disto4x4(a + x + y, b + x + y, w);
|
||||
}
|
||||
}
|
||||
return D;
|
||||
@ -470,8 +469,7 @@ static int Disto16x16MIPS32(const uint8_t* const a, const uint8_t* const b,
|
||||
"sh %["#TEMP8"], "#D"(%[temp20]) \n\t" \
|
||||
"sh %["#TEMP12"], "#B"(%[temp20]) \n\t"
|
||||
|
||||
static void FTransformMIPS32(const uint8_t* src, const uint8_t* ref,
|
||||
int16_t* out) {
|
||||
static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) {
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8;
|
||||
int temp9, temp10, temp11, temp12, temp13, temp14, temp15, temp16;
|
||||
int temp17, temp18, temp19, temp20;
|
||||
@ -643,7 +641,7 @@ int VP8GetResidualCostMIPS32(int ctx0, const VP8Residual* const res) {
|
||||
GET_SSE_INNER(C, C + 1, C + 2, C + 3) \
|
||||
GET_SSE_INNER(D, D + 1, D + 2, D + 3)
|
||||
|
||||
static int SSE16x16MIPS32(const uint8_t* a, const uint8_t* b) {
|
||||
static int SSE16x16(const uint8_t* a, const uint8_t* b) {
|
||||
int count;
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
|
||||
|
||||
@ -677,7 +675,7 @@ static int SSE16x16MIPS32(const uint8_t* a, const uint8_t* b) {
|
||||
return count;
|
||||
}
|
||||
|
||||
static int SSE16x8MIPS32(const uint8_t* a, const uint8_t* b) {
|
||||
static int SSE16x8(const uint8_t* a, const uint8_t* b) {
|
||||
int count;
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
|
||||
|
||||
@ -703,7 +701,7 @@ static int SSE16x8MIPS32(const uint8_t* a, const uint8_t* b) {
|
||||
return count;
|
||||
}
|
||||
|
||||
static int SSE8x8MIPS32(const uint8_t* a, const uint8_t* b) {
|
||||
static int SSE8x8(const uint8_t* a, const uint8_t* b) {
|
||||
int count;
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
|
||||
|
||||
@ -725,7 +723,7 @@ static int SSE8x8MIPS32(const uint8_t* a, const uint8_t* b) {
|
||||
return count;
|
||||
}
|
||||
|
||||
static int SSE4x4MIPS32(const uint8_t* a, const uint8_t* b) {
|
||||
static int SSE4x4(const uint8_t* a, const uint8_t* b) {
|
||||
int count;
|
||||
int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
|
||||
|
||||
@ -756,14 +754,14 @@ extern void VP8EncDspInitMIPS32(void);
|
||||
|
||||
void VP8EncDspInitMIPS32(void) {
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
VP8ITransform = ITransformMIPS32;
|
||||
VP8EncQuantizeBlock = QuantizeBlockMIPS32;
|
||||
VP8TDisto4x4 = Disto4x4MIPS32;
|
||||
VP8TDisto16x16 = Disto16x16MIPS32;
|
||||
VP8FTransform = FTransformMIPS32;
|
||||
VP8SSE16x16 = SSE16x16MIPS32;
|
||||
VP8SSE8x8 = SSE8x8MIPS32;
|
||||
VP8SSE16x8 = SSE16x8MIPS32;
|
||||
VP8SSE4x4 = SSE4x4MIPS32;
|
||||
VP8ITransform = ITransform;
|
||||
VP8EncQuantizeBlock = QuantizeBlock;
|
||||
VP8TDisto4x4 = Disto4x4;
|
||||
VP8TDisto16x16 = Disto16x16;
|
||||
VP8FTransform = FTransform;
|
||||
VP8SSE16x16 = SSE16x16;
|
||||
VP8SSE8x8 = SSE8x8;
|
||||
VP8SSE16x8 = SSE16x8;
|
||||
VP8SSE4x4 = SSE4x4;
|
||||
#endif // WEBP_USE_MIPS32
|
||||
}
|
||||
|
@ -878,7 +878,8 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Compilation with gcc-4.6.x is problematic for now. Disable this function then.
|
||||
// Compilation with gcc-4.6.x is problematic for now. Disable this function
|
||||
// in this case.
|
||||
#if (__GNUC__ <= 4 && __GNUC_MINOR__ < 8)
|
||||
#define SKIP_QUANTIZE
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@
|
||||
#define APPROX_LOG_MAX 4096
|
||||
#define LOG_2_RECIPROCAL 1.44269504088896338700465094007086
|
||||
|
||||
static float FastSLog2SlowMIPS32(int v) {
|
||||
static float FastSLog2Slow(int v) {
|
||||
assert(v >= LOG_LOOKUP_IDX_MAX);
|
||||
if (v < APPROX_LOG_WITH_CORRECTION_MAX) {
|
||||
int log_cnt, y, correction;
|
||||
@ -61,7 +61,7 @@ static float FastSLog2SlowMIPS32(int v) {
|
||||
}
|
||||
}
|
||||
|
||||
static float FastLog2SlowMIPS32(int v) {
|
||||
static float FastLog2Slow(int v) {
|
||||
assert(v >= LOG_LOOKUP_IDX_MAX);
|
||||
if (v < APPROX_LOG_WITH_CORRECTION_MAX) {
|
||||
int log_cnt, y;
|
||||
@ -106,7 +106,7 @@ static float FastLog2SlowMIPS32(int v) {
|
||||
// pop += 2;
|
||||
// }
|
||||
// return (double)cost;
|
||||
static double ExtraCostMIPS32(const int* const population, int length) {
|
||||
static double ExtraCost(const int* const population, int length) {
|
||||
int i, temp0, temp1;
|
||||
int* pop = (int*)&population[4];
|
||||
const int* LoopEnd = (int*)&population[length];
|
||||
@ -151,8 +151,8 @@ static double ExtraCostMIPS32(const int* const population, int length) {
|
||||
// pY += 2;
|
||||
// }
|
||||
// return (double)cost;
|
||||
static double ExtraCostCombinedMIPS32(const int* const X, const int* const Y,
|
||||
int length) {
|
||||
static double ExtraCostCombined(const int* const X, const int* const Y,
|
||||
int length) {
|
||||
int i, temp0, temp1, temp2, temp3;
|
||||
int* pX = (int*)&X[4];
|
||||
int* pY = (int*)&Y[4];
|
||||
@ -197,9 +197,9 @@ extern void VP8LDspInitMIPS32(void);
|
||||
|
||||
void VP8LDspInitMIPS32(void) {
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
VP8LFastSLog2Slow = FastSLog2SlowMIPS32;
|
||||
VP8LFastLog2Slow = FastLog2SlowMIPS32;
|
||||
VP8LExtraCost = ExtraCostMIPS32;
|
||||
VP8LExtraCostCombined = ExtraCostCombinedMIPS32;
|
||||
VP8LFastSLog2Slow = FastSLog2Slow;
|
||||
VP8LFastLog2Slow = FastLog2Slow;
|
||||
VP8LExtraCost = ExtraCost;
|
||||
VP8LExtraCostCombined = ExtraCostCombined;
|
||||
#endif // WEBP_USE_MIPS32
|
||||
}
|
||||
|
@ -103,10 +103,10 @@ static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \
|
||||
} \
|
||||
}
|
||||
|
||||
SAMPLE_FUNC_MIPS(SampleRgbLinePairMIPS, 3, 0, 1, 2, 0)
|
||||
SAMPLE_FUNC_MIPS(SampleRgbaLinePairMIPS, 4, 0, 1, 2, 3)
|
||||
SAMPLE_FUNC_MIPS(SampleBgrLinePairMIPS, 3, 2, 1, 0, 0)
|
||||
SAMPLE_FUNC_MIPS(SampleBgraLinePairMIPS, 4, 2, 1, 0, 3)
|
||||
SAMPLE_FUNC_MIPS(SampleRgbLinePair, 3, 0, 1, 2, 0)
|
||||
SAMPLE_FUNC_MIPS(SampleRgbaLinePair, 4, 0, 1, 2, 3)
|
||||
SAMPLE_FUNC_MIPS(SampleBgrLinePair, 3, 2, 1, 0, 0)
|
||||
SAMPLE_FUNC_MIPS(SampleBgraLinePair, 4, 2, 1, 0, 3)
|
||||
|
||||
#endif // WEBP_USE_MIPS32
|
||||
|
||||
@ -114,9 +114,9 @@ SAMPLE_FUNC_MIPS(SampleBgraLinePairMIPS, 4, 2, 1, 0, 3)
|
||||
|
||||
void WebPInitSamplersMIPS32(void) {
|
||||
#if defined(WEBP_USE_MIPS32)
|
||||
WebPSamplers[MODE_RGB] = SampleRgbLinePairMIPS;
|
||||
WebPSamplers[MODE_RGBA] = SampleRgbaLinePairMIPS;
|
||||
WebPSamplers[MODE_BGR] = SampleBgrLinePairMIPS;
|
||||
WebPSamplers[MODE_BGRA] = SampleBgraLinePairMIPS;
|
||||
WebPSamplers[MODE_RGB] = SampleRgbLinePair;
|
||||
WebPSamplers[MODE_RGBA] = SampleRgbaLinePair;
|
||||
WebPSamplers[MODE_BGR] = SampleBgrLinePair;
|
||||
WebPSamplers[MODE_BGRA] = SampleBgraLinePair;
|
||||
#endif // WEBP_USE_MIPS32
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user