Граф коммитов

225 Коммитов

Автор SHA1 Сообщение Дата
Jeff Muizelaar c0c278d532 Bug 1677006 - Make compute_precache safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D96955
2020-11-13 02:10:39 +00:00
Jeff Muizelaar f616e5a1e9 Bug 1677004 - More propagating of [u8; 8192]. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D96954
2020-11-13 01:54:16 +00:00
Jeff Muizelaar d392268136 Bug 1676871 - Propagate [8; 8192] type to compute_precache. r=aosmond
Have compute_precache take &mut to an array of the right size.

Differential Revision: https://phabricator.services.mozilla.com/D96829
2020-11-12 16:26:34 +00:00
Jeff Muizelaar cd031ba211 Bug 1676649 - Remove an unneeded cast and make build_colorant_matrix safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D96717
2020-11-12 14:42:41 +00:00
Jeff Muizelaar 32c8aeeb94 Bug 1676555 - Use PRECACHE_OUTPUT_* in more places. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D96670
2020-11-11 14:10:07 +00:00
Jeff Muizelaar 1bc4554792 Bug 1675759 - Flesh out qcms/Cargo.toml. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D96181
2020-11-06 13:57:45 +00:00
Jeff Muizelaar 8084874c09 Bug 1675524 - Use symbolic PRECACHE constants. r=aosmond
This restores the use of PRECACHE constants that got replaced
during conversion to Rust.

Differential Revision: https://phabricator.services.mozilla.com/D96183
2020-11-06 13:56:02 +00:00
Jeff Muizelaar 5d4c355232 Bug 1675425 - Make build_output_lut safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D95959
2020-11-05 14:27:59 +00:00
Jeff Muizelaar c3b95f0135 Bug 1675080 - Make build_input_gamma_table safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D95763
2020-11-05 14:49:01 +00:00
Butkovits Atila a458bf18ff Backed out changeset 0cb7e54c81fd (bug 1675425) for bustages complaining about
calling unsafe function. CLOSED TREE
2020-11-05 16:22:51 +02:00
Jeff Muizelaar 5142f9112d Bug 1675425 - Make build_output_lut safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D95959
2020-11-05 13:54:09 +00:00
Jeff Muizelaar ff58e7d381 Bug 1674956 - Make lut_interp_linear safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D95653
2020-11-03 11:37:16 +00:00
Jeff Muizelaar 109c8f450a Bug 1674672 - qcms: Change input gamma table to a Option<Vec<f32>>. r=aosmond
All of the code that produces these tables is updated to operate
on Vecs.

Differential Revision: https://phabricator.services.mozilla.com/D95463
2020-11-02 13:32:07 +00:00
Jeff Muizelaar 0f61683211 Bug 1674656 - qcms: make lut_inverse_interp16 safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D95460
2020-11-01 20:06:06 +00:00
Jeff Muizelaar 7d71ab63f7 Bug 1674621 - qcms: change some *mut to *const. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D95459
2020-11-01 20:05:01 +00:00
Jeff Muizelaar 7b07725fe9 Bug 1672547 - qcms: Change some raw ptrs to references. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D94397
2020-11-01 01:54:48 +00:00
Jeff Muizelaar edcb500aaa Bug 1672309 - Port remaning gtests to Rust. r=aosmond
I've left the C++ ones for now.

Differential Revision: https://phabricator.services.mozilla.com/D94246
2020-10-31 21:55:20 +00:00
Razvan Maries 90372fb9cf Backed out changeset cef722eb6583 (bug 1672309) for Windows 2012 debug BR bustages. CLOSED TREE 2020-10-22 09:01:29 +03:00
Jeff Muizelaar 6df3bcb6d8 Bug 1672309 - Port remaning gtests to Rust. r=aosmond
I've left the C++ ones for now.

Differential Revision: https://phabricator.services.mozilla.com/D94246
2020-10-22 01:30:48 +00:00
Dorel Luca 03c2fad3dc Backed out changeset 02f6caf121bb (bug 1672309) for Backout conflicts with Bug 1654103. CLOSED TREE 2020-10-22 03:50:06 +03:00
Jeff Muizelaar 577c167863 Bug 1672309 - Port remaning gtests to Rust. r=aosmond
I've left the C++ ones for now.

Differential Revision: https://phabricator.services.mozilla.com/D94246
2020-10-22 00:05:08 +00:00
Jeff Muizelaar cc1de268e5 Bug 1671311 - qcms: Make a couple of functions safe. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D93625
2020-10-15 13:02:01 +00:00
Jeff Muizelaar 3fd8898736 Bug 1670404 - Cleanup profile_create_rgb_with_table. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D93156
2020-10-14 20:46:29 +00:00
Jeff Muizelaar 253ba9aba0 Bug 1668912 - Implement Default for qcms_transform. r=aosmond
Using Default::default() to initialize qcms_tranform
instead of zero will avoid us having to rely on the particular
representation of the members which makes things more
sane once the pointer members become Option<Vec<_>>s

Once all the members use Default::default() we can switch
to deriving Default instead of implementing it manually.

Differential Revision: https://phabricator.services.mozilla.com/D92285
2020-10-03 19:16:32 +00:00
Jeff Muizelaar c78d8d9811 Bug 1668967 - qcms: Make sure we read the entire output table. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D92315
2020-10-03 13:59:28 +00:00
Jeff Muizelaar 06840cd992 Bug 1668859 - Separate out the safe part of profile_create_rgb_with_table. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D92251
2020-10-02 19:00:59 +00:00
Jeff Muizelaar e53f994944 Bug 1668708 - Make build_sRGB_gamma_table safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D92169
2020-10-02 15:59:39 +00:00
Jeff Muizelaar 803305dab6 Bug 1668526 - qcms: Fix v4 profiles. r=aosmond
Using floor() instead of ceil() was a typo that was introduced while
converting from the libm functions to rust builtins.

This adds a test to prevent us from breaking it in the future.

Differential Revision: https://phabricator.services.mozilla.com/D92131
2020-10-01 19:09:37 +00:00
Jeff Muizelaar 62fa39d35f Bug 1668419 - Make icc profile parsing safe. r=aosmond
This makes qcms_profile_from_memory() a wrapper
around a safe profile_from_slice() function.

Differential Revision: https://phabricator.services.mozilla.com/D92012
2020-10-01 13:18:41 +00:00
Jeff Muizelaar 079948dafe Bug 1668418 - Rustify precache. r=aosmond
Change the *mut precache_output pointers to Option<Arc<precache_output>>
These are the last fields in qcms_profile that we interact with
unsafely.

Differential Revision: https://phabricator.services.mozilla.com/D92011
2020-10-01 12:48:23 +00:00
Jeff Muizelaar f82318cd6e Bug 1667921 - qcms: Make read_tag_lutmABType safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D91676
2020-09-29 02:38:02 +00:00
Jeff Muizelaar 6f690d3efc Bug 1667875. Make sure that we enable the instruction set that we're using. r=aosmond
Without this the intrinsics end up as calls instead of inline

Differential Revision: https://phabricator.services.mozilla.com/D91639
2020-09-28 21:04:30 +00:00
Jeff Muizelaar 8d848ca717 Bug 1667691 - qcms: Make lutType safe. r=aosmond
Instead of using a common buffer for all lookup tables
we just use individual Vecs for each.

Differential Revision: https://phabricator.services.mozilla.com/D91534
2020-09-28 00:34:15 +00:00
Jeff Muizelaar ac8e8a021c Bug 1667689 - Make set_rgb_colorants safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D91533
2020-09-27 22:56:03 +00:00
Jeff Muizelaar a6bc0ef436 Bug 1667689 - Make build_RGB_to_XYZ_transfer_matrix safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D91532
2020-09-27 22:55:56 +00:00
Jeff Muizelaar 8f56d5e521 Bug 1667689 - Make curve_from_table safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D91531
2020-09-27 22:54:37 +00:00
Jeff Muizelaar 23b9ed74a2 Bug 1667687 - qcms: Make read_nested safe. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D91530
2020-09-27 22:53:13 +00:00
Jeff Muizelaar 8daf0bd825 Bug 1667686 - Use ptr::write_unaligned to properly handle unaligned accesses. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D91529
2020-09-27 22:52:55 +00:00
Jeff Muizelaar b5a1244a00 Bug 1667374 - Make curveType more Rust like. r=aosmond
Turns curveType into a enum. The change is mostly mechanical fixing of
the the code to the new structure except that for Parametrics curves
we now store the result of COUNT_TO_LENGTH as the len.
This mostly affects compute_curve_gamma_table_type_parametric where we
use the post COUNT_TO_LENGTH instead of the pre COUNT_TO_LENGTH.

Differential Revision: https://phabricator.services.mozilla.com/D91421
2020-09-27 18:57:50 +00:00
Jeff Muizelaar 70cb4bccd7 Bug 1666811. Make tag finding safe. r=aosmond
Change find_tag() to return an Option<&tag> instead of *const tag
and clean up all of the users.

Differential Revision: https://phabricator.services.mozilla.com/D91150
2020-09-25 11:45:04 +00:00
Jeff Muizelaar d679fe609a Bug 1666784. Fix qcms fuzz target. r=aosmond
qcms_profile_is_bogus() got changed to take a &mut instead of *mut
and the fuzz target never got updated

Differential Revision: https://phabricator.services.mozilla.com/D91141
2020-09-23 14:57:03 +00:00
Jeff Muizelaar a9b12a7d10 Bug 1666782. Fix GrayAlpha color conversion. r=aosmond
GrayAlpha::has_alpha was accidentally set to false.

Differential Revision: https://phabricator.services.mozilla.com/D91147
2020-09-23 14:52:19 +00:00
Jeff Muizelaar 0f0c9a9a0c Bug 1666057. Convert qcms to rust. r=aosmond
The conversion was done with c2rust and then manually cleaned up some.
There's still lots of unsafe code remaining but I'd rather do the rest
of the cleanup in-tree so that it's easier to catch and revert
regressions.

I've dropped support for SSE1 (Firefox requires SSE2) and Altivec
(not wanting to deal with fixing Rust's Altivec support).

transform_neon.rs manually implements a bunch of intrinsics, this
can be fixed when we can depend on Rust 1.48.

The fuzz target is changed to a cargo-fuzz target.

Some of the gtests are moved to Rust.

Differential Revision: https://phabricator.services.mozilla.com/D90782
2020-09-21 18:40:51 +00:00
Andrew Osmond 5ee82cb26c Bug 1615394 - Add color management support to the BMP decoder. r=tnikkel
This patch adds support for color management in BMPs added in
BITMAPV4HEADER and BITMAPV5HEADER. While display of BMPs is relatively
rare this comes in handy when interacting with the Windows clipboard.

Differential Revision: https://phabricator.services.mozilla.com/D64880

--HG--
extra : moz-landing-system : lando
2020-03-03 14:16:00 +00:00
Dorel Luca 284433eb29 Backed out changeset 388ac5609ceb (bug 1615394) for MinGW build bustage. CLOSED TREE
--HG--
extra : amend_source : cf3cec59ae1efd99b9de0d19b7a09c135138daf5
2020-03-03 13:02:04 +02:00
Andrew Osmond 97a2bca5b9 Bug 1615394 - Add color management support to the BMP decoder. r=tnikkel
This patch adds support for color management in BMPs added in
BITMAPV4HEADER and BITMAPV5HEADER. While display of BMPs is relatively
rare this comes in handy when interacting with the Windows clipboard.

Differential Revision: https://phabricator.services.mozilla.com/D64880

--HG--
extra : moz-landing-system : lando
2020-03-02 23:49:37 +00:00
Andrew Osmond bb4bf3f608 Bug 1600911 - Implement AVX variant of QCMS ICCv2 algorithm. r=jrmuizel
Our performance gtests indicate anywhere from 10-20% reduction in
execution time based on the SSE2 version. Where it fell in the range
depended on the platform, but presumably that is related to the hardware
selected by treeherder. llvm-mca suggested it should be closer to 20%
on modern hardware (skylake).

Differential Revision: https://phabricator.services.mozilla.com/D55642

--HG--
extra : moz-landing-system : lando
2019-12-17 19:22:36 +00:00
Csoregi Natalia c6abd544c4 Backed out changeset 5483da347be3 (bug 1600911) for bustage on transform-avx.cpp. CLOSED TREE 2019-12-13 21:39:14 +02:00
Andrew Osmond 9e59ec2b0d Bug 1600911 - Implement AVX variant of QCMS ICCv2 algorithm. r=jrmuizel
Our performance gtests indicate anywhere from 10-20% reduction in
execution time based on the SSE2 version. Where it fell in the range
depended on the platform, but presumably that is related to the hardware
selected by treeherder. llvm-mca suggested it should be closer to 20%
on modern hardware (skylake).

Differential Revision: https://phabricator.services.mozilla.com/D55642

--HG--
extra : moz-landing-system : lando
2019-12-13 18:26:22 +00:00
Andrew Osmond e6fe246634 Bug 1558883 - Add QCMS transform correctness and performance tests. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D34765
2019-06-25 09:45:56 -04:00