diff options
author | Jerome Jiang <jianj@google.com> | 2018-11-09 13:27:39 -0800 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2018-11-09 22:45:24 -0800 |
commit | 2ac954dfd2e47afd0df2a6dece14d1689644e30c (patch) | |
tree | a681a69140514d96cb19f253eed27dd44c686919 /vpx_scale | |
parent | c66fe1a8930cf1ad43b38dd7cb88f8ae0139b0b2 (diff) | |
download | libvpx-2ac954dfd2e47afd0df2a6dece14d1689644e30c.tar.gz |
vp8: Init buffers and pred arrays for mt after allocation.
Buffers and arrays used for prediction are not initialized after
allocation.
BUG=902691
Change-Id: Ic727e5dab7456e91ec9d6c80694f60a1a3600640
Diffstat (limited to 'vpx_scale')
-rw-r--r-- | vpx_scale/generic/yv12config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vpx_scale/generic/yv12config.c b/vpx_scale/generic/yv12config.c index db1db37ce..287a5a098 100644 --- a/vpx_scale/generic/yv12config.c +++ b/vpx_scale/generic/yv12config.c @@ -61,6 +61,14 @@ int vp8_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, if (!ybf->buffer_alloc) { ybf->buffer_alloc = (uint8_t *)vpx_memalign(32, frame_size); +#if defined(__has_feature) +#if __has_feature(memory_sanitizer) + // This memset is needed for fixing the issue of using uninitialized + // value in msan test. It will cause a perf loss, so only do this for + // msan test. + memset(ybf->buffer_alloc, 0, frame_size); +#endif +#endif ybf->buffer_alloc_sz = frame_size; } |