Commit f9c7b14c authored by Michael Niedermayer's avatar Michael Niedermayer

avcdoec/huffyuvenc: optimize sub_left_prediction()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f70d7eb2
......@@ -69,15 +69,22 @@ static inline int sub_left_prediction(HYuvContext *s, uint8_t *dst,
} else {
const uint16_t *src16 = (const uint16_t *)src;
uint16_t *dst16 = ( uint16_t *)dst;
for (i = 0; i < w; i++) {
const int temp = src16[i];
dst16[i] = temp - left;
left = temp;
if (w < 32) {
for (i = 0; i < w; i++) {
const int temp = src16[i];
dst16[i] = temp - left;
left = temp;
}
return left;
} else {
for (i = 0; i < 16; i++) {
const int temp = src16[i];
dst16[i] = temp - left;
left = temp;
}
s->llviddsp.diff_int16(dst16 + 16, src16 + 16, src16 + 15, s->n - 1, w - 16);
return src16[w-1];
}
return left;
//FIXME optimize
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment