OSDN Git Service

minigbm: add bytes per pixel function
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 23 Mar 2017 18:29:26 +0000 (11:29 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 30 Mar 2017 07:15:53 +0000 (00:15 -0700)
commit4f298f9fd2801512199416bbbbb916777179c5b5
treeb1bc6b52490e3a06b0aac1ffdc275a4a6eb2eb8b
parent102dcb88f9493817f7fd5b74551d53a1b664090a
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>
cros_gralloc/cros_alloc_device.cc
drv.c
drv.h
helpers.c
helpers.h