diff options
author | Frank Barchard <fbarchard@google.com> | 2021-04-30 09:54:44 -0700 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2021-04-30 18:14:57 +0000 |
commit | 49ebc996aa8c4bdf89c1b5ea461eb677234c61cc (patch) | |
tree | 8f02917133a54788294fa78e064fd254f3ea9c97 /source/row_common.cc | |
parent | 99cddd80513167b307d5d9b18c5a347fa8592c33 (diff) | |
download | libyuv-49ebc996aa8c4bdf89c1b5ea461eb677234c61cc.tar.gz |
Make 2 step transitive tests measure 2 step time.
Add tests of all macros used by libyuv public headers
When a 1 step conversion is added, a 2 step test can compare
the old 2 step method to the 1 step. A 1 step unittest is
also added which compares C to SIMD. Making the 2 step
conversions measure performance of the 2 steps allows the
old 2 step performance to be compared to 1 step.
All macros used in public headers are added to an ifdef test.
Showing them in a unittest allows some diagnostics when
a test is failing.
Bug: libyuv:901
Change-Id: I7ffa6ed0cb3b506fa1b7fd4b7b1b729658c3c266
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2857916
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/row_common.cc')
-rw-r--r-- | source/row_common.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/row_common.cc b/source/row_common.cc index 1abd8c00..c6e41241 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -1634,12 +1634,12 @@ MAKEYUVCONSTANTS(V2020, YG, YB, UB, UG, VG, VR) int g16 = y1 + bg - (u * ug + v * vg); \ int r16 = y1 + (v * vr) - br #else -#define LOAD_YUV_CONSTANTS \ - int ub = yuvconstants->kUVToB[0]; \ - int ug = yuvconstants->kUVToG[0]; \ - int vg = yuvconstants->kUVToG[1]; \ - int vr = yuvconstants->kUVToR[1]; \ - int yg = yuvconstants->kYToRgb[0]; \ +#define LOAD_YUV_CONSTANTS \ + int ub = yuvconstants->kUVToB[0]; \ + int ug = yuvconstants->kUVToG[0]; \ + int vg = yuvconstants->kUVToG[1]; \ + int vr = yuvconstants->kUVToR[1]; \ + int yg = yuvconstants->kYToRgb[0]; \ int yb = yuvconstants->kYBiasToRgb[0] #define CALC_RGB16 \ |