mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
store prediction mode array as uint8_t[16], not int[16].
This allow faster copy and gives a little bit of speed-up Change-Id: I5f478229766098630b53b8a4982442fe29290ee6
This commit is contained in:
@ -294,15 +294,13 @@ void VP8SetIntra16Mode(const VP8EncIterator* const it, int mode) {
|
||||
it->mb_->type_ = 1;
|
||||
}
|
||||
|
||||
void VP8SetIntra4Mode(const VP8EncIterator* const it, int modes[16]) {
|
||||
void VP8SetIntra4Mode(const VP8EncIterator* const it, const uint8_t* modes) {
|
||||
uint8_t* preds = it->preds_;
|
||||
int y;
|
||||
for (y = 0; y < 4; ++y) {
|
||||
int x;
|
||||
for (x = 0; x < 4; ++x) {
|
||||
preds[x] = modes[x + y * 4];
|
||||
}
|
||||
for (y = 4; y > 0; --y) {
|
||||
memcpy(preds, modes, 4 * sizeof(*modes));
|
||||
preds += it->enc_->preds_w_;
|
||||
modes += 4;
|
||||
}
|
||||
it->mb_->type_ = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user