minigbm: add DRM_FORMAT_YVU420_ANDROID

YV12 in <system/graphics.h> in the Android tree defines the
HAL_PIXEL_FORMAT_YV12 as:

     * y_size = stride * height
     * c_stride = ALIGN(stride/2, 16)
     * c_size = c_stride * height/2
     * size = y_size + c_size * 2
     * cr_offset = y_size
     * cb_offset = y_size + c_size

Let's add a special format DRM_FORMAT_YVU420_ANDROID that adheres to these
requirements.

Previously, our y_size on Intel not adhere to the spec. We should
change drv_bo_from_format to calculate the size of plane not based on the
aligned height, but the height that outside world sees.

BUG=chromium:616275
TEST=
ImageReaderDecoderTest#testGoogH264ImageReader

passes on cyan. Run YT app.

Change-Id: I4906300a0775cf561c4b05bf6d973cf4e82470bc
Reviewed-on: https://chromium-review.googlesource.com/441913
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
9 files changed