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

386 Коммитов

Автор SHA1 Сообщение Дата
Jon Bauman 619acc91bb Bug 1729539 - Hit MOZ_CRASH(assertion failed: y2 > 1. / 12. && y2 <= 1.) at gfx/qcms/src/iccread.rs:1392. r=jrmuizel
The assertion is due to an inappropriate test of exact floating-point values.
build_trc_table() handles this saturating case, so there's no need to assert.
Add more test coverage to be certain no fuzzing inputs will lead to crashes.

Differential Revision: https://phabricator.services.mozilla.com/D125006
2021-09-17 17:41:26 +00:00
Butkovits Atila f2a5d438bb Backed out changeset d629f462a605 (bug 1729539) for causing Wd failures. CLOSED TREE 2021-09-16 02:50:35 +03:00
Jon Bauman 6d6715ba10 Bug 1729539 - Hit MOZ_CRASH(assertion failed: y2 > 1. / 12. && y2 <= 1.) at gfx/qcms/src/iccread.rs:1392. r=jrmuizel
The assertion is due to an inappropriate test of exact floating-point values.
build_trc_table() handles this saturating case, so there's no need to assert.
Add more test coverage to be certain no fuzzing inputs will lead to crashes.

Differential Revision: https://phabricator.services.mozilla.com/D125006
2021-09-15 19:57:15 +00:00
Marian-Vasile Laza 699488300d Backed out changeset bd23fb0c95cc (bug 1729539) for causing web platform failures. 2021-09-15 08:41:00 +03:00
Jon Bauman f5e56d8781 Bug 1729539 - Hit MOZ_CRASH(assertion failed: y2 > 1. / 12. && y2 <= 1.) at gfx/qcms/src/iccread.rs:1392. r=jrmuizel
The assertion is due to an inappropriate test of exact floating-point values.
build_trc_table() handles this saturating case, so there's no need to assert.
Add more test coverage to be certain no fuzzing inputs will lead to crashes.

Differential Revision: https://phabricator.services.mozilla.com/D125006
2021-09-14 23:14:41 +00:00
Cristian Tuns 3a65ad3358 Backed out changeset db3338456ae1 (bug 1729539) for causing multiple failures. CLOSED TREE 2021-09-14 15:02:43 -04:00
Jon Bauman cf0312ede2 Bug 1729539 - Hit MOZ_CRASH(assertion failed: y2 > 1. / 12. && y2 <= 1.) at gfx/qcms/src/iccread.rs:1392. r=jrmuizel
The assertion is due to an inappropriate test of exact floating-point values.
build_trc_table() handles this saturating case, so there's no need to assert.
Add more test coverage to be certain no fuzzing inputs will lead to crashes.

Differential Revision: https://phabricator.services.mozilla.com/D125006
2021-09-14 16:32:37 +00:00
Jon Bauman 6155249a72 Bug 1696045 - Add AVIF telemetry for unimplemented features and performance. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D123378
2021-08-24 22:34:32 +00:00
Sandor Molnar bb9a848857 Backed out changeset d0f659f7ea9b (bug 1696045) for causing gtest failures in image/decoders/nsAVIFDecoder. CLOSED TREE 2021-08-24 21:27:20 +03:00
Jon Bauman fc5f21743a Bug 1696045 - Add AVIF telemetry for unimplemented features and performance. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D123378
2021-08-24 17:20:02 +00:00
Jeff Muizelaar 1916934834 Bug 1725742. Validate tag offsets upfront to avoid weird overflow situations later on. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D122856
2021-08-19 16:33:03 +00:00
Jon Bauman bacfba2091 Bug 1725056 - qcms: avoid undefined behavior when handling CICP values. r=jrmuizel,tsmith
Differential Revision: https://phabricator.services.mozilla.com/D122318
2021-08-16 23:13:36 +00:00
Jon Bauman 1fbcf87b11 Bug 1634741 - AVIF (AV1 Image File Format): proper color space support. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D121764
2021-08-05 15:47:59 +00:00
Jon Bauman ad9d5759ea Bug 1723253 - qcms: Add CICP (Coding-independent code points) support. r=jrmuizel
Add CICP-specific functionality

Differential Revision: https://phabricator.services.mozilla.com/D121452
2021-08-05 05:10:37 +00:00
Jon Bauman bbd6119d94 Bug 1723253 - qcms: Clippy/costmetic changes. r=jrmuizel
Clippy/costmetic changes

Differential Revision: https://phabricator.services.mozilla.com/D121458
2021-08-05 05:10:37 +00:00
Jeff Muizelaar ee0926e1db Bug 1721596 - qcms: Rerun rustfmt. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D120466
2021-07-21 13:03:23 +00:00
Jeff Muizelaar 132a09618b Bug 1721515 - qcms: Remove some now unneeded unstable features. r=aosmond
These were used by our local NEON intrinsics implementation.
We don't need them anymore.

Differential Revision: https://phabricator.services.mozilla.com/D120420
2021-07-21 01:42:38 +00:00
Jeff Muizelaar 6edd219c43 Bug 1721484 - qcms: Fix extra space. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D120395
2021-07-20 21:36:45 +00:00
Jeff Muizelaar ad5985aca6 Bug 1721483 - qcms: Remove unneeded vim modelines. r=aosmond
These were inherited from the C code and are wrong and unneeded in
Rust.

Differential Revision: https://phabricator.services.mozilla.com/D120394
2021-07-20 21:36:18 +00:00
Jeff Muizelaar 2ed71226c3 Bug 1697818 - Drop handrolled NEON SIMD wrappers. r=aosmond
We require Rust 1.50 now which is new enough to not need these
wrappers anymore.

Differential Revision: https://phabricator.services.mozilla.com/D108337
2021-07-20 21:29:01 +00:00
Jeff Muizelaar 62908eaa10 Bug 1713012. Only set RUSTC_BOOTSTRAP if it's not already set. r=aosmond
In bug 1670538 we started setting RUSTC_BOOTSTRAP for Rust 1.50+
Rust 1.50+ gives a warning if we set in build.rs so don't.

Differential Revision: https://phabricator.services.mozilla.com/D116131
2021-05-28 20:18:23 +00:00
Jeff Muizelaar 54a52e060a Bug 1710897 - Handle matrix inversion failing more gracefully. r=aosmond
Prior to making invert() return an Option we just gleefully
assumed that it succeeded here. Instead of panicing let's
fail to create the transform.

The problem was found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34216

Differential Revision: https://phabricator.services.mozilla.com/D114999
2021-05-12 20:52:53 +00:00
Jeff Muizelaar c92ee2a045 Bug 1710542 - Remove 'invalid' field from Matrix. r=aosmond
This changes to using Option<Matrix> instead of
having an 'invalid' field. This makes sure we check
when we need to and don't have to check otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D114808
2021-05-11 13:58:20 +00:00
Jeff Muizelaar 9b9ddc9cc2 Bug 1710450 - Pass a reference to read_tag_s15Fixed16ArrayType r=aosmond
This lets us avoid having to look up the tag again.

Differential Revision: https://phabricator.services.mozilla.com/D114751
2021-05-11 13:57:43 +00:00
Jeff Muizelaar 7c5d88731c Bug 1708805 - Reject output luts with channels != 3. r=aosmond
This problem was introduced by the CMYK support
patch not rejecting 4 channel LUTs at parse time.

The problem was caught by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33647

Differential Revision: https://phabricator.services.mozilla.com/D114014
2021-05-01 02:39:06 +00:00
Jeff Muizelaar db8307e53c Bug 1707794 - Add support for CMYK to the fuzzing target. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113460
2021-04-27 14:38:51 +00:00
Jeff Muizelaar cdd4899132 Bug 1555331. Add a test that parametric functions are properly inverted. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113227
2021-04-26 12:48:33 +00:00
Jeff Muizelaar 0fe884da2d Bug 1555331. Use parametric inversion when building an output_lut. r=aosmond
Previously we didn't invert at all which was causing over saturation.

Differential Revision: https://phabricator.services.mozilla.com/D113226
2021-04-26 12:48:33 +00:00
Jeff Muizelaar bf77763c5d Bug 1555331. Implement analytic inversion for parametric transfer functions. r=aosmond
This also adjusts the initialization of Param to make inversion better behaved.

Differential Revision: https://phabricator.services.mozilla.com/D113225
2021-04-26 12:48:32 +00:00
Jeff Muizelaar e98ff078aa Bug 1555331. Add a Param struct. r=aosmond
This makes our parsing of parametric transfer functions
more clear because you can see exactly what output variables
the input variables map to.

Differential Revision: https://phabricator.services.mozilla.com/D113224
2021-04-26 12:48:32 +00:00
Jeff Muizelaar 404d7d8cfe Bug 1706144 - Add support for CMYK. r=aosmond
This is not enabled in Gecko yet.

Differential Revision: https://phabricator.services.mozilla.com/D112643
2021-04-23 02:42:53 +00:00
Butkovits Atila 0a6b07942c Backed out changeset d87602a10873 (bug 1706144) for causing build bustages. CLOSED TREE 2021-04-23 04:59:43 +03:00
Jeff Muizelaar 33c441281c Bug 1706144 - Add support for CMYK. r=aosmond
This is not enabled in Gecko yet.

Differential Revision: https://phabricator.services.mozilla.com/D112643
2021-04-23 01:36:00 +00:00
Jeff Muizelaar 84dc71e689 Bug 1705950 - Add safe API for transforming with different formats. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D112489
2021-04-19 18:15:05 +00:00
Jeff Muizelaar d0d3ba387d Bug 1705847 - Use the input_gamma_table_gray as an array. r=aosmond
Cleaner, safer and just as fast.

Differential Revision: https://phabricator.services.mozilla.com/D112446
2021-04-19 18:14:47 +00:00
Jeff Muizelaar 1a31db3a4d Bug 1704909 - Use a Box<[f32; 256]> instead of a Vec. r=aosmond
This gives a known length at compile time at the cost of slightly
worse ergonomics. Knowing the length should let the compiler drop
some bounds checks and will make it easier to make some of the
transform functions safe.

Differential Revision: https://phabricator.services.mozilla.com/D111917
2021-04-16 22:34:13 +00:00
Jan-Erik Rediger 598f4a226a Bug 1705693 - Pass verifier callback as an option. r=aosmond
`ProduceVerifyOutput` takes an `transform_fn_t`, which is a type
definition for `Option<unsafe fn(...)>`.
So we need to pass `Some`. This code can never have worked correctly.

Differential Revision: https://phabricator.services.mozilla.com/D112341
2021-04-16 12:40:33 +00:00
Jeff Muizelaar 5f53667340 Bug 1704407 - Use a CLU helper like the original C++ code. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D111572
2021-04-14 01:09:37 +00:00
Jeff Muizelaar ad361a869e Bug 1703101 - Bump the version of libfuzzer-sys.
This fixes a build error on oss-fuzz

Differential Revision: https://phabricator.services.mozilla.com/D110862
2021-04-05 20:59:58 +00:00
Butkovits Atila 45016e9a4a Backed out changeset 1bba2e7410e1 (bug 1697818) as requested by Jeff. CLOSED TREE 2021-03-31 17:55:28 +03:00
Jeff Muizelaar 7bd7df3eeb Bug 1702080 - Make RUSTC_BOOTSTRAP usage conditional on 'neon' feature. r=aosmond
This makes it so our subversion to get NEON doesn't happen by default.

Differential Revision: https://phabricator.services.mozilla.com/D110348
2021-03-31 14:31:23 +00:00
Jeff Muizelaar 266a347d35 Bug 1702073 - Enable ICCv4 by default in the crate but disable it in Gecko. r=aosmond
This gives other users of the crate ICCv4 by default while
still giving Gecko the ability to enable it dynamically.

Differential Revision: https://phabricator.services.mozilla.com/D110344
2021-03-31 14:29:35 +00:00
Jeff Muizelaar 23af50ef79 Bug 1701758. Avoid identity sRGB transforms. r=aosmond
This avoids the performance cost and ensures the data remains unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D110289
2021-03-31 13:15:26 +00:00
Jeff Muizelaar ce00bef848 Bug 1701457 - Rewrite compute_curve_gamma_table_type_parametric. r=aosmond
This rewites the function to use slice patterns and make the computation
more closely follow the ICC spec. It also fixes a bug where we forgot to
divide X by 255 before applying the threshold.

Differential Revision: https://phabricator.services.mozilla.com/D110037
2021-03-29 16:41:09 +00:00
Jeff Muizelaar 4a6a749d05 Bug 1701125 - Remove the Option<> from build_lut_matrix. r=aosmond
We always pass Some(lut) to build_lut_matrix so we
don't need take an Option.

Differential Revision: https://phabricator.services.mozilla.com/D109839
2021-03-26 14:51:44 +00:00
Jeff Muizelaar 720be19554 Bug 1698363 - Use trait objects instead of home grown polymorphism. r=aosmond
This lets each ModularTransform contain only the data that needs
instead of all of the possible data and will allow for removing
some of the Option wrappers.

Differential Revision: https://phabricator.services.mozilla.com/D108357
2021-03-15 18:44:17 +00:00
Jeff Muizelaar 83e8eeb430 Bug 1698363 - Use a Vec instead of a list to store ModularTransforms. r=aosmond
This makes things a little simpler at the cost of the Vec<> allocation.
However, it lets us switch to using trait objects because we don't
need a common next_transform field.

Differential Revision: https://phabricator.services.mozilla.com/D108356
2021-03-15 18:44:17 +00:00
Jeff Muizelaar 4408cb9135 Bug 1698325 - Remove dead field. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D108341
2021-03-15 17:58:12 +00:00
Jeff Muizelaar c2592d4467 Bug 1698324 - Store an array of curves instead of explicit rgb ones. r=aosmond
This will make supporting CMYK easier.

Differential Revision: https://phabricator.services.mozilla.com/D108340
2021-03-15 17:05:26 +00:00
Jeff Muizelaar 812f96aeba Bug 1697818 - Drop handrolled NEON SIMD wrappers. r=aosmond
We require Rust 1.50 now which is new enough to not need these
wrappers anymore.

Differential Revision: https://phabricator.services.mozilla.com/D108337
2021-03-14 19:44:57 +00:00