diff options
author | Frank Barchard <fbarchard@google.com> | 2021-03-04 12:33:02 -0800 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2021-03-05 01:09:37 +0000 |
commit | ba033a11e3948e4b361e0414caa57f793584b46e (patch) | |
tree | 1037b49cad50b9564db77c505aec9740f2bc88f6 /docs | |
parent | 95ff456c3335c2c541e2bc5038a2b01eea08cd33 (diff) | |
download | libyuv-ba033a11e3948e4b361e0414caa57f793584b46e.tar.gz |
Add 12 bit YUV to 10 bit RGB
Bug: libyuv:843
Change-Id: I0104c8fcaeed09e83d2fd654c6a5e7d41bcb74cf
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2727775
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/formats.md | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/docs/formats.md b/docs/formats.md index a29ed5c3..5fc19d45 100644 --- a/docs/formats.md +++ b/docs/formats.md @@ -4,7 +4,9 @@ Formats (FOURCC) supported by libyuv are detailed here. # Core Formats -There are 2 core formats supported by libyuv - I420 and ARGB. All YUV formats can be converted to/from I420. All RGB formats can be converted to/from ARGB. +There are 2 core formats supported by libyuv - I420 and ARGB. + All YUV formats can be converted to/from I420. + All RGB formats can be converted to/from ARGB. Filtering functions such as scaling and planar functions work on I420 and/or ARGB. @@ -109,6 +111,27 @@ The following is extracted from video_common.h as a complete list of formats sup I444, NV24 and NV42 are full width, full height I400 and J400 have no chroma channel. +# Color space + The YUV formats start with a letter to specify the color space. e.g. I420 + I = BT.601 limited range + J = BT.601 full range (J = JPEG that uses this) + H = BT.709 limited range (H for HD) + F = BT.709 full range (F for Full range) + U = BT.2020 limited range (U for UHD) + V = BT.2020 full range + For YUV to RGB conversions, a matrix can be passed. See also convert_argh.h + +# HDR formats + Planar formats with 10 or 12 bits use the following fourcc: + I010, I012, P010, P012 are half width, half height + I210, I212, P210, P212 are half width, full height + I410, I412, P410, P412 are full width, full height + where + I is the color space (see above) and 3 planes: Y, U and V. + P is a biplanar format, similar to NV12 but 16 bits, with the valid bits in the high bits. There is a Y plane and a UV plane. + 0, 2 or 4 is the last digit of subsampling: 4:2:0, 4:2:2, or 4:4:4 + 10 or 12 is the bits per channel. The bits are in the low bits of a 16 bit channel. + # The ARGB FOURCC There are 4 ARGB layouts - ARGB, BGRA, ABGR and RGBA. ARGB is most common by far, used for screen formats, and windows webcam drivers. |