Skip to content

Subsample out->p.h correctly in dav1d_apply_grain

Wan-Teh Chang requested to merge (removed):wtc-master-patch-98474 into master

Subsample out->p.h correctly in dav1d_apply_grain

The height of the chroma planes should be calculated as (out->p.h + ss_ver) >> ss_ver, not out->p.h >> ss_ver.

This bug was reported in https://crbug.com/1201074. The bug can be detected by decoding an AVIF image of size 228x1 that has film grain synthesis under MemorySanitizer. MemorySanitizer reports a use-of-uninitialized-value error when we read the U plane at index 64.

Edited by Wan-Teh Chang

Merge request reports

Loading