diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-02 00:52:57 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-02 00:52:57 +0200 |
| commit | 4a5609265010b702b0222620bde9f64f1ec7269e (patch) | |
| tree | ee417c06dc616d03fcf20d32f96d74b6f22465e8 /benchmark | |
| parent | 4e885dc225c5c12e11367602cc4bf429520d9b3b (diff) | |
Basically maybe-working float version of rgb_to_xyz using SSE/AVX2.
Diffstat (limited to 'benchmark')
| -rw-r--r-- | benchmark/rgb_to_xyz.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/rgb_to_xyz.cc b/benchmark/rgb_to_xyz.cc index 7b4400ec..bdd1e426 100644 --- a/benchmark/rgb_to_xyz.cc +++ b/benchmark/rgb_to_xyz.cc @@ -49,9 +49,9 @@ main () dcp::Size size(1998, 1080); - scoped_array<uint8_t> rgb (new uint8_t[size.width * size.height * 6]); + scoped_array<uint8_t> rgb (new uint8_t[size.width * size.height * 8]); for (int y = 0; y < size.height; ++y) { - uint16_t* p = reinterpret_cast<uint16_t*> (rgb.get() + y * size.width * 6); + uint16_t* p = reinterpret_cast<uint16_t*> (rgb.get() + y * size.width * 8); for (int x = 0; x < size.width; ++x) { for (int c = 0; c < 3; ++c) { *p = (rand() & 0xfff) << 4; @@ -62,7 +62,7 @@ main () shared_ptr<dcp::OpenJPEGImage> xyz; for (int i = 0; i < trials; ++i) { - xyz = dcp::rgb_to_xyz (rgb.get(), size, size.width * 6, dcp::ColourConversion::srgb_to_xyz()); + xyz = dcp::rgb_to_xyz (rgb.get(), size, size.width * 8, dcp::ColourConversion::srgb_to_xyz()); } } |
