Add PIXEL_FORMAT_MT21.
commitd9d4b9bb1bcb007db751a7473e00167ea9ffeb2f
authorwuchengli <wuchengli@chromium.org>
Mon, 14 Sep 2015 06:31:41 +0000 (13 23:31 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 14 Sep 2015 06:32:16 +0000 (14 06:32 +0000)
tree670e5cbb00609100f84c7d15fa55440e2f4d69aa
parent2f9680dd148dfb21b896e4db2266df32e602160e
Add PIXEL_FORMAT_MT21.

MT21 is a MediaTek proprietary format. MT21 is similar to NV21
except the memory layout and pixel layout (swizzles). YUV 4:2:0.
2x2 VU samples. 12 bits per pixel.

Each image contains two buffers, one for Y plane and one for
interleaved VU plane. Two planes can be non-contiguous in memory.

Suppose image dimension is (width, height)

Plane[0]: Y plane
Start address alignment = 4K bytes
Offset from Buffer[0] start address = 0
Row pitch = ((width+15)/16) * 16
Plane size = Row pitch * (((height+31)/32)*32)

Plane[1]: VU plane
Start address alignment = 4K bytes
Offset from Buffer[1] start address = 0
Row pitch = ((width+15)/16) * 16
Plane size = Row pitch * (((height+31)/32)*32)/2

BUG=chrome-os-partner:44784
TESTS=Play video and run apprtc loopback.

CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1326153002

Cr-Commit-Position: refs/heads/master@{#348575}
cc/resources/video_resource_updater.cc
content/browser/renderer_host/media/video_capture_device_client_unittest.cc
media/base/video_frame.cc
media/base/video_types.cc
media/base/video_types.h
media/blink/skcanvas_video_renderer.cc
media/blink/video_frame_compositor.cc
media/mojo/interfaces/media_types.mojom
media/mojo/services/media_type_converters.cc
media/video/gpu_memory_buffer_video_frame_pool.cc
tools/metrics/histograms/histograms.xml