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>
5 files changed