Remove memcpy in lossless decoding.

Change-Id: Iba694b306486d67764e2fc5576c98a974c9b886c
This commit is contained in:
Vincent Rabaud
2016-11-24 17:45:22 +01:00
parent 7474d46e45
commit 71e2f5cadf
8 changed files with 151 additions and 112 deletions

View File

@ -712,13 +712,15 @@ static void ApplyInverseTransforms(VP8LDecoder* const dec, int num_rows,
uint32_t* const rows_out = dec->argb_cache_;
// Inverse transforms.
// TODO: most transforms only need to operate on the cropped region only.
memcpy(rows_out, rows_in, cache_pixs * sizeof(*rows_out));
while (n-- > 0) {
VP8LTransform* const transform = &dec->transforms_[n];
VP8LInverseTransform(transform, start_row, end_row, rows_in, rows_out);
rows_in = rows_out;
}
if (rows_in != rows_out) {
// No transform called, hence just copy.
memcpy(rows_out, rows_in, cache_pixs * sizeof(*rows_out));
}
}
// Processes (transforms, scales & color-converts) the rows decoded after the