mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Merge changes I87544e92,I0bb6cda5
* changes: VP8LEncodeStream: add an assert VP8LColorCacheCopy: promote an int before shifting
This commit is contained in:
commit
4a82aab569
@ -1257,6 +1257,7 @@ WebPEncodingError VP8LEncodeStream(const WebPConfig* const config,
|
||||
int y;
|
||||
err = AllocateTransformBuffer(enc, width, height);
|
||||
if (err != VP8_ENC_OK) goto Error;
|
||||
assert(enc->argb_ != NULL);
|
||||
for (y = 0; y < height; ++y) {
|
||||
memcpy(enc->argb_ + y * width,
|
||||
picture->argb + y * picture->argb_stride,
|
||||
|
@ -45,5 +45,5 @@ void VP8LColorCacheCopy(const VP8LColorCache* const src,
|
||||
assert(dst != NULL);
|
||||
assert(src->hash_bits_ == dst->hash_bits_);
|
||||
memcpy(dst->colors_, src->colors_,
|
||||
(size_t)(1 << dst->hash_bits_) * sizeof(*dst->colors_));
|
||||
((size_t)1u << dst->hash_bits_) * sizeof(*dst->colors_));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user