Commit 6502179e authored by Frank Barchard's avatar Frank Barchard Committed by Commit Bot

I210ToAR30 support for 422 10 bit to 10 bit RGB

BUG=960620, libyuv:845, b/129864744

Change-Id: I43b152568b7f297f81624d47e56a334c127be17b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1901465Reviewed-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
parent 1f129460
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 1740
Version: 1741
License: BSD
License File: LICENSE
......
......@@ -362,9 +362,22 @@ int I010ToARGB(const uint16_t* src_y,
int width,
int height);
// Convert I010 to ARGB.
// Convert I010 to ABGR.
LIBYUV_API
int I010ToARGB(const uint16_t* src_y,
int I010ToABGR(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_abgr,
int dst_stride_abgr,
int width,
int height);
// Convert H010 to ARGB.
LIBYUV_API
int H010ToARGB(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -375,9 +388,9 @@ int I010ToARGB(const uint16_t* src_y,
int width,
int height);
// Convert I010 to ABGR.
// Convert H010 to ABGR.
LIBYUV_API
int I010ToABGR(const uint16_t* src_y,
int H010ToABGR(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -388,9 +401,9 @@ int I010ToABGR(const uint16_t* src_y,
int width,
int height);
// Convert H010 to ARGB.
// Convert U010 to ARGB.
LIBYUV_API
int H010ToARGB(const uint16_t* src_y,
int U010ToARGB(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -401,9 +414,9 @@ int H010ToARGB(const uint16_t* src_y,
int width,
int height);
// Convert H010 to ABGR.
// Convert U010 to ABGR.
LIBYUV_API
int H010ToABGR(const uint16_t* src_y,
int U010ToABGR(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -414,9 +427,9 @@ int H010ToABGR(const uint16_t* src_y,
int width,
int height);
// Convert U010 to ARGB.
// Convert I210 to ARGB.
LIBYUV_API
int U010ToARGB(const uint16_t* src_y,
int I210ToARGB(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -427,9 +440,61 @@ int U010ToARGB(const uint16_t* src_y,
int width,
int height);
// Convert U010 to ABGR.
// Convert I210 to ABGR.
LIBYUV_API
int U010ToABGR(const uint16_t* src_y,
int I210ToABGR(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_abgr,
int dst_stride_abgr,
int width,
int height);
// Convert H210 to ARGB.
LIBYUV_API
int H210ToARGB(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_argb,
int dst_stride_argb,
int width,
int height);
// Convert H210 to ABGR.
LIBYUV_API
int H210ToABGR(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_abgr,
int dst_stride_abgr,
int width,
int height);
// Convert U210 to ARGB.
LIBYUV_API
int U210ToARGB(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_argb,
int dst_stride_argb,
int width,
int height);
// Convert U210 to ABGR.
LIBYUV_API
int U210ToABGR(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -439,6 +504,7 @@ int U010ToABGR(const uint16_t* src_y,
int dst_stride_abgr,
int width,
int height);
// Convert I420 with Alpha to preattenuated ARGB.
LIBYUV_API
int I420AlphaToARGB(const uint8_t* src_y,
......@@ -618,29 +684,29 @@ int UYVYToARGB(const uint8_t* src_uyvy,
int width,
int height);
// Convert H010 to ARGB.
// Convert I010 to AR30.
LIBYUV_API
int H010ToARGB(const uint16_t* src_y,
int I010ToAR30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_argb,
int dst_stride_argb,
uint8_t* dst_ar30,
int dst_stride_ar30,
int width,
int height);
// Convert I010 to AR30.
// Convert I010 to AB30.
LIBYUV_API
int I010ToAR30(const uint16_t* src_y,
int I010ToAB30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_ar30,
int dst_stride_ar30,
uint8_t* dst_ab30,
int dst_stride_ab30,
int width,
int height);
......@@ -657,6 +723,19 @@ int H010ToAR30(const uint16_t* src_y,
int width,
int height);
// Convert H010 to AB30.
LIBYUV_API
int H010ToAB30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_ab30,
int dst_stride_ab30,
int width,
int height);
// Convert U010 to AR30.
LIBYUV_API
int U010ToAR30(const uint16_t* src_y,
......@@ -670,9 +749,9 @@ int U010ToAR30(const uint16_t* src_y,
int width,
int height);
// Convert I010 to AB30.
// Convert U010 to AB30.
LIBYUV_API
int I010ToAB30(const uint16_t* src_y,
int U010ToAB30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -683,9 +762,22 @@ int I010ToAB30(const uint16_t* src_y,
int width,
int height);
// Convert H010 to AB30.
// Convert I210 to AR30.
LIBYUV_API
int H010ToAB30(const uint16_t* src_y,
int I210ToAR30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_ar30,
int dst_stride_ar30,
int width,
int height);
// Convert I210 to AB30.
LIBYUV_API
int I210ToAB30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......@@ -696,9 +788,48 @@ int H010ToAB30(const uint16_t* src_y,
int width,
int height);
// Convert U010 to AB30.
// Convert H210 to AR30.
LIBYUV_API
int U010ToAB30(const uint16_t* src_y,
int H210ToAR30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_ar30,
int dst_stride_ar30,
int width,
int height);
// Convert H210 to AB30.
LIBYUV_API
int H210ToAB30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_ab30,
int dst_stride_ab30,
int width,
int height);
// Convert U210 to AR30.
LIBYUV_API
int U210ToAR30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
const uint16_t* src_v,
int src_stride_v,
uint8_t* dst_ar30,
int dst_stride_ar30,
int width,
int height);
// Convert U210 to AB30.
LIBYUV_API
int U210ToAB30(const uint16_t* src_y,
int src_stride_y,
const uint16_t* src_u,
int src_stride_u,
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1740
#define LIBYUV_VERSION 1741
#endif // INCLUDE_LIBYUV_VERSION_H_
......@@ -59,9 +59,8 @@ enum FourCC {
FOURCC_NV12 = FOURCC('N', 'V', '1', '2'),
FOURCC_YUY2 = FOURCC('Y', 'U', 'Y', '2'),
FOURCC_UYVY = FOURCC('U', 'Y', 'V', 'Y'),
FOURCC_H010 = FOURCC('H', '0', '1', '0'), // unofficial fourcc. 10 bit lsb
FOURCC_U010 = FOURCC('U', '0', '1', '0'), // bt.2020, unofficial fourcc.
// 10 bit lsb
FOURCC_I010 = FOURCC('I', '0', '1', '0'), // bt.601 10 bit 420
FOURCC_I210 = FOURCC('I', '0', '1', '0'), // bt.601 10 bit 422
// 1 Secondary YUV format: row biplanar.
FOURCC_M420 = FOURCC('M', '4', '2', '0'),
......@@ -97,6 +96,10 @@ enum FourCC {
FOURCC_U420 = FOURCC('U', '4', '2', '0'), // bt.2020, unofficial fourcc
FOURCC_U422 = FOURCC('U', '4', '2', '2'), // bt.2020, unofficial fourcc
FOURCC_U444 = FOURCC('U', '4', '4', '4'), // bt.2020, unofficial fourcc
FOURCC_H010 = FOURCC('H', '0', '1', '0'), // bt.709 10 bit 420
FOURCC_U010 = FOURCC('U', '0', '1', '0'), // bt.2020 10 bit 420
FOURCC_H210 = FOURCC('H', '0', '1', '0'), // bt.709 10 bit 422
FOURCC_U210 = FOURCC('U', '0', '1', '0'), // bt.2020 10 bit 422
// 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc.
FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420.
......
This diff is collapsed.
......@@ -2923,6 +2923,12 @@ TESTPLANAR16TOB(H010, 2, 2, ARGB, 4, 4, 1, 2)
TESTPLANAR16TOB(H010, 2, 2, ABGR, 4, 4, 1, 2)
TESTPLANAR16TOB(U010, 2, 2, ARGB, 4, 4, 1, 2)
TESTPLANAR16TOB(U010, 2, 2, ABGR, 4, 4, 1, 2)
TESTPLANAR16TOB(I210, 2, 1, ARGB, 4, 4, 1, 2)
TESTPLANAR16TOB(I210, 2, 1, ABGR, 4, 4, 1, 2)
TESTPLANAR16TOB(H210, 2, 1, ARGB, 4, 4, 1, 2)
TESTPLANAR16TOB(H210, 2, 1, ABGR, 4, 4, 1, 2)
TESTPLANAR16TOB(U210, 2, 1, ARGB, 4, 4, 1, 2)
TESTPLANAR16TOB(U210, 2, 1, ABGR, 4, 4, 1, 2)
#ifdef LITTLE_ENDIAN_TEST
TESTPLANAR16TOB(I010, 2, 2, AR30, 4, 4, 1, 2)
TESTPLANAR16TOB(I010, 2, 2, AB30, 4, 4, 1, 2)
......@@ -2930,6 +2936,12 @@ TESTPLANAR16TOB(H010, 2, 2, AR30, 4, 4, 1, 2)
TESTPLANAR16TOB(H010, 2, 2, AB30, 4, 4, 1, 2)
TESTPLANAR16TOB(U010, 2, 2, AR30, 4, 4, 1, 2)
TESTPLANAR16TOB(U010, 2, 2, AB30, 4, 4, 1, 2)
TESTPLANAR16TOB(I210, 2, 1, AR30, 4, 4, 1, 2)
TESTPLANAR16TOB(I210, 2, 1, AB30, 4, 4, 1, 2)
TESTPLANAR16TOB(H210, 2, 1, AR30, 4, 4, 1, 2)
TESTPLANAR16TOB(H210, 2, 1, AB30, 4, 4, 1, 2)
TESTPLANAR16TOB(U210, 2, 1, AR30, 4, 4, 1, 2)
TESTPLANAR16TOB(U210, 2, 1, AB30, 4, 4, 1, 2)
#endif
static int Clamp(int y) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment