aboutsummaryrefslogtreecommitdiff
path: root/unit_test
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2023-01-13 10:05:00 -0800
committerlibyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-13 19:20:12 +0000
commitd5aa3d4a76930cde9527f5be5bc89524b48fc069 (patch)
tree200e9c6b3c249e7e8efd07646a8b697bdfcd1409 /unit_test
parent010dea8ba4158896e5608a52dd4372ca7f57cdca (diff)
downloadlibyuv-d5aa3d4a76930cde9527f5be5bc89524b48fc069.tar.gz
P010ToI010 and P012ToI012 conversion functions
- Convert 10 and 12 bit biplanar formats to planar. - Shift 10 MSB to 10 LSB - P010 is similar to NV12 in layout, but uses 10 MSB of 16 bit values. - I010 is similar to I420 in layout, but uses 10 LSB of 16 bit values. Bug: libyuv:951 Change-Id: I16a1bc64239d0fa4f41810910da448bf5720935f Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4166560 Reviewed-by: Justin Green <greenjustin@google.com> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'unit_test')
-rw-r--r--unit_test/convert_test.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/unit_test/convert_test.cc b/unit_test/convert_test.cc
index 0d6df154..f94a7d31 100644
--- a/unit_test/convert_test.cc
+++ b/unit_test/convert_test.cc
@@ -48,6 +48,7 @@ namespace libyuv {
#define AR30ToAR30 ARGBCopy
#define ABGRToABGR ARGBCopy
+// subsample amount uses a divide.
#define SUBSAMPLE(v, a) ((((v) + (a)-1)) / (a))
// Planar test
@@ -649,6 +650,8 @@ TESTBPTOBP(MT2T, uint8_t, 10 / 8, 2, 2, P010, uint16_t, 2, 2, 2, 10, 16, 32)
TESTBPTOP(NV12, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 1, 1)
TESTBPTOP(NV21, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 1, 1)
TESTBPTOP(MM21, uint8_t, 1, 2, 2, I420, uint8_t, 1, 2, 2, 8, 16, 32)
+TESTBPTOP(P010, uint16_t, 2, 2, 2, I010, uint16_t, 2, 2, 2, 10, 1, 1)
+TESTBPTOP(P012, uint16_t, 2, 2, 2, I012, uint16_t, 2, 2, 2, 12, 1, 1)
// Provide matrix wrappers for full range bt.709
#define F420ToABGR(a, b, c, d, e, f, g, h, i, j) \