diff options
author | Frank Barchard <fbarchard@google.com> | 2020-05-19 04:02:30 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-19 16:59:29 +0000 |
commit | d426247a3bf63c9c52d70e50693843d81c7eda59 (patch) | |
tree | 7e548d5b626b218da2960ed626d7e125d05ca1f4 /unit_test | |
parent | 84da59c1689d62d199c6586480e459e51315e14c (diff) | |
download | libyuv-d426247a3bf63c9c52d70e50693843d81c7eda59.tar.gz |
YUV to RGB Matrix functions for color space support
Make all Matrix versions of conversions public.
Bug: libyuv:861, b/156642185
Change-Id: Ida067c95dd041b612e2bab64dbface58b257038a
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2202748
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Chong Zhang <chz@google.com>
Diffstat (limited to 'unit_test')
-rw-r--r-- | unit_test/convert_test.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/unit_test/convert_test.cc b/unit_test/convert_test.cc index e8777433..27ea8850 100644 --- a/unit_test/convert_test.cc +++ b/unit_test/convert_test.cc @@ -787,6 +787,37 @@ TESTQPLANARTOB(I420Alpha, 2, 2, ABGR, 4, 4, 1) TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, FMT_C, BPP_B, \ benchmark_width_, _Opt, +, 0) +#define JNV12ToARGB(a, b, c, d, e, f, g, h) \ + NV12ToARGBMatrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) +#define JNV21ToARGB(a, b, c, d, e, f, g, h) \ + NV21ToARGBMatrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) +#define JNV12ToABGR(a, b, c, d, e, f, g, h) \ + NV21ToARGBMatrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) +#define JNV21ToABGR(a, b, c, d, e, f, g, h) \ + NV12ToARGBMatrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) +#define JNV12ToRGB24(a, b, c, d, e, f, g, h) \ + NV12ToRGB24Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) +#define JNV21ToRGB24(a, b, c, d, e, f, g, h) \ + NV21ToRGB24Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) +#define JNV12ToRAW(a, b, c, d, e, f, g, h) \ + NV21ToRGB24Matrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) +#define JNV21ToRAW(a, b, c, d, e, f, g, h) \ + NV12ToRGB24Matrix(a, b, c, d, e, f, &kYvuJPEGConstants, g, h) +#define JNV12ToRGB565(a, b, c, d, e, f, g, h) \ + NV12ToRGB565Matrix(a, b, c, d, e, f, &kYuvJPEGConstants, g, h) + +TESTBIPLANARTOB(JNV12, 2, 2, ARGB, ARGB, 4) +TESTBIPLANARTOB(JNV21, 2, 2, ARGB, ARGB, 4) +TESTBIPLANARTOB(JNV12, 2, 2, ABGR, ABGR, 4) +TESTBIPLANARTOB(JNV21, 2, 2, ABGR, ABGR, 4) +TESTBIPLANARTOB(JNV12, 2, 2, RGB24, RGB24, 3) +TESTBIPLANARTOB(JNV21, 2, 2, RGB24, RGB24, 3) +TESTBIPLANARTOB(JNV12, 2, 2, RAW, RAW, 3) +TESTBIPLANARTOB(JNV21, 2, 2, RAW, RAW, 3) +#ifdef LITTLE_ENDIAN_ONLY_TEST +TESTBIPLANARTOB(JNV12, 2, 2, RGB565, RGB565, 2) +#endif + TESTBIPLANARTOB(NV12, 2, 2, ARGB, ARGB, 4) TESTBIPLANARTOB(NV21, 2, 2, ARGB, ARGB, 4) TESTBIPLANARTOB(NV12, 2, 2, ABGR, ABGR, 4) |