ReadWebP: avoid conversion to ARGB if final format is YUVA

Adds ExUtilCopyPlane() in example_utils.[ch], borrowed from
src/util/utils.h

(removes a TODO)

Change-Id: Iadfc19da3914c9439608f296e86225d279263566
This commit is contained in:
Pascal Massimino
2016-05-24 22:54:57 -07:00
parent 2ec2de1450
commit ab8d669887
4 changed files with 56 additions and 22 deletions

View File

@ -268,3 +268,14 @@ VP8StatusCode ExUtilDecodeWebPIncremental(
}
// -----------------------------------------------------------------------------
void ExUtilCopyPlane(const uint8_t* src, int src_stride,
uint8_t* dst, int dst_stride, int width, int height) {
while (height-- > 0) {
memcpy(dst, src, width * sizeof(*dst));
src += src_stride;
dst += dst_stride;
}
}
// -----------------------------------------------------------------------------