mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
optimize predictor #1 in plain-C
For some reason, gcc has hard time inlining this one... Also optimize predictor #0 and #1 for encoding, so we don't have to call the generic pointers VP8LPredictors[...] Change-Id: I1ff31e3b83874b53f84fe23487f644619fd61db9
This commit is contained in:
@ -168,7 +168,15 @@ static uint32_t Predictor13(uint32_t left, const uint32_t* const top) {
|
||||
}
|
||||
|
||||
GENERATE_PREDICTOR_ADD(Predictor0, PredictorAdd0)
|
||||
GENERATE_PREDICTOR_ADD(Predictor1, PredictorAdd1)
|
||||
static void PredictorAdd1(const uint32_t* in, const uint32_t* upper,
|
||||
int num_pixels, uint32_t* out) {
|
||||
int i;
|
||||
uint32_t left = out[-1];
|
||||
for (i = 0; i < num_pixels; ++i) {
|
||||
out[i] = left = VP8LAddPixels(in[i], left);
|
||||
}
|
||||
(void)upper;
|
||||
}
|
||||
GENERATE_PREDICTOR_ADD(Predictor2, PredictorAdd2)
|
||||
GENERATE_PREDICTOR_ADD(Predictor3, PredictorAdd3)
|
||||
GENERATE_PREDICTOR_ADD(Predictor4, PredictorAdd4)
|
||||
|
Reference in New Issue
Block a user