We shouldn't round up to the nearest byte. This way we can represent
formats like Y41P. Makes no difference currently since
drv_bpp_from_format only returns numbers divisible by eight.
Change-Id: I57bcab383f1661ea11e9aa1d30e18750574143e2
Reviewed-on: https://chromium-review.googlesource.com/462478
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
*/
int drv_stride_from_format(uint32_t format, uint32_t width, size_t plane)
{
- int stride = width * DIV_ROUND_UP(drv_bpp_from_format(format, plane),
- 8);
+ int stride = DIV_ROUND_UP(width * drv_bpp_from_format(format, plane),
+ 8);
/*
* Only downsample for certain multiplanar formats which have horizontal