OSDN Git Service

minigbm: Ensure DRM_FORMAT_YVU420_ANDROID meets Android requirements.
authorOwen Lin <owenlin@google.com>
Mon, 5 Jun 2017 06:33:08 +0000 (14:33 +0800)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 22 Jun 2017 10:34:49 +0000 (03:34 -0700)
commitbbb69fd4ab3dc87428451b218643419a7d273790
tree0182ed79980bc6172f99ce3ee52e2cfb69cc7893
parent3c5be5ae2ba591bd9cacfd82476b61734768be89
minigbm: Ensure DRM_FORMAT_YVU420_ANDROID meets Android requirements.

For HAL_PIXEL_FORMAT_YV12 (mapped to DRM_FORMAT_YVU420_ANDROID), it
needs to meet the following requirements:
 - The vertical stride must equal to the buffer's height.
 - The chroma stride is 16-byte aligned.

As a result, stop mapping DRM_FORMAT_FLEX_YCbCr_420_888 to
DRM_FORMAT_YVU420_ANDROID. The format is used for hardware decoding,
It has more restrictions on the alignments of the width or height.

Bug: b:31479749
Test: Run the testOtherVP8ImageReader and testGoogH264ImageReader of
      android.media.cts.ImageReaderDecoderTest.

Change-Id: Id37f51115ed8b1937ca7d6e48abd809235b43fe4
Reviewed-on: https://chromium-review.googlesource.com/526758
Commit-Ready: Owen Lin <owenlin@chromium.org>
Tested-by: Owen Lin <owenlin@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
cros_gralloc/cros_gralloc_module.cc
helpers.c
i915.c
mediatek.c
vgem.c
virtio_gpu.c