diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2017-03-23 11:29:26 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-30 00:15:53 -0700 |
commit | 4f298f9fd2801512199416bbbbb916777179c5b5 (patch) | |
tree | b1bc6b52490e3a06b0aac1ffdc275a4a6eb2eb8b /drv.h | |
parent | 102dcb88f9493817f7fd5b74551d53a1b664090a (diff) |
minigbm: add bytes per pixel function
We were using the drv_stride_from_format as a shorthand to calculate
bytes per pixel. This is incorrect with the addition of
DRM_FORMAT_YVU420_ANDROID, which always aligns to 16 bytes.
Let's have a separate bytes_per_pixel function to better express what
we want.
BUG=chromium:616275
TEST=android.media.cts.DecodeAccuracyTest
#testVP9GLViewLargerHeightVideoDecode
passes on veyron_minnie-cheets.
Change-Id: I2d740828d66031c3a032932c09d79dbce21b8986
Reviewed-on: https://chromium-review.googlesource.com/458978
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Diffstat (limited to 'drv.h')
-rw-r--r-- | drv.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -162,13 +162,13 @@ drv_bo_get_format(struct bo *bo); uint32_t drv_resolve_format(struct driver *drv, uint32_t format); -int -drv_stride_from_format(uint32_t format, uint32_t width, size_t plane); - size_t drv_num_planes_from_format(uint32_t format); uint32_t +drv_bytes_per_pixel(uint32_t format, size_t plane); + +uint32_t drv_size_from_format(uint32_t format, uint32_t stride, uint32_t height, size_t plane); |