avcdoec/huffyuvenc: optimize sub_left_prediction()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f70d7eb20c
commit
f9c7b14c04
@ -69,15 +69,22 @@ static inline int sub_left_prediction(HYuvContext *s, uint8_t *dst,
|
|||||||
} else {
|
} else {
|
||||||
const uint16_t *src16 = (const uint16_t *)src;
|
const uint16_t *src16 = (const uint16_t *)src;
|
||||||
uint16_t *dst16 = ( uint16_t *)dst;
|
uint16_t *dst16 = ( uint16_t *)dst;
|
||||||
|
if (w < 32) {
|
||||||
for (i = 0; i < w; i++) {
|
for (i = 0; i < w; i++) {
|
||||||
const int temp = src16[i];
|
const int temp = src16[i];
|
||||||
dst16[i] = temp - left;
|
dst16[i] = temp - left;
|
||||||
left = temp;
|
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user