diff --git a/.cargo/config.in b/.cargo/config.in index ed972269ad4f..eb26f5e0771e 100644 --- a/.cargo/config.in +++ b/.cargo/config.in @@ -102,7 +102,7 @@ replace-with = "vendored-sources" [source."https://github.com/mozilla/mp4parse-rust"] git = "https://github.com/mozilla/mp4parse-rust" -rev = "3bfc47d9a571d0842676043ba60716318e946c06" +rev = "eb0b625bd7e888d05ebcfc7685e2501b34c3b374" replace-with = "vendored-sources" [source."https://github.com/mozilla/neqo"] diff --git a/Cargo.lock b/Cargo.lock index 39b456678685..45b70cf6e6f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e9dd62f37dea550caf48c77591dc50bd1a378ce08855be1a0c42a97b7550fb" dependencies = [ "android_log-sys", - "env_logger 0.9.3", + "env_logger", "log", "once_cell", ] @@ -1564,24 +1564,13 @@ dependencies = [ "syn", ] -[[package]] -name = "env_logger" -version = "0.8.999" -dependencies = [ - "env_logger 0.9.3", -] - [[package]] name = "env_logger" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" dependencies = [ - "atty", - "humantime", "log", - "regex", - "termcolor", ] [[package]] @@ -2068,7 +2057,7 @@ name = "gecko_logger" version = "0.1.0" dependencies = [ "app_services_logger", - "env_logger 0.9.3", + "env_logger", "lazy_static", "log", ] @@ -2327,7 +2316,7 @@ dependencies = [ "bincode", "chrono", "crossbeam-channel", - "env_logger 0.9.3", + "env_logger", "flate2", "log", "once_cell", @@ -2623,12 +2612,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.23" @@ -3599,12 +3582,11 @@ dependencies = [ [[package]] name = "mp4parse" -version = "0.13.0" -source = "git+https://github.com/mozilla/mp4parse-rust?rev=3bfc47d9a571d0842676043ba60716318e946c06#3bfc47d9a571d0842676043ba60716318e946c06" +version = "0.16.0" +source = "git+https://github.com/mozilla/mp4parse-rust?rev=eb0b625bd7e888d05ebcfc7685e2501b34c3b374#eb0b625bd7e888d05ebcfc7685e2501b34c3b374" dependencies = [ "bitreader", "byteorder", - "env_logger 0.8.999", "fallible_collections", "log", "num-traits", @@ -3617,8 +3599,8 @@ version = "0.1.0" [[package]] name = "mp4parse_capi" -version = "0.13.0" -source = "git+https://github.com/mozilla/mp4parse-rust?rev=3bfc47d9a571d0842676043ba60716318e946c06#3bfc47d9a571d0842676043ba60716318e946c06" +version = "0.16.0" +source = "git+https://github.com/mozilla/mp4parse-rust?rev=eb0b625bd7e888d05ebcfc7685e2501b34c3b374#eb0b625bd7e888d05ebcfc7685e2501b34c3b374" dependencies = [ "byteorder", "fallible_collections", @@ -3659,7 +3641,7 @@ version = "0.6.3" source = "git+https://github.com/mozilla/neqo?tag=v0.6.3#4fe628bb911e4437169d974baa628c159e96f879" dependencies = [ "chrono", - "env_logger 0.9.3", + "env_logger", "lazy_static", "log", "qlog", @@ -4000,7 +3982,7 @@ version = "0.1.4" dependencies = [ "byteorder", "core-foundation", - "env_logger 0.9.3", + "env_logger", "lazy_static", "libloading", "log", @@ -5020,7 +5002,7 @@ name = "smoosh" version = "0.1.0" dependencies = [ "bumpalo", - "env_logger 0.9.3", + "env_logger", "jsparagus", "log", ] diff --git a/Cargo.toml b/Cargo.toml index 1e3fad1da5e3..325e1f29ee44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,9 +104,6 @@ memmap2 = { path = "build/rust/memmap2" } # Patch getrandom 0.7 to 0.8 rand = { path = "build/rust/rand" } -# Patch env_logger 0.8 to 0.9 -env_logger = { path = "build/rust/env_logger" } - # Patch parking_lot 0.12 down to 0.11, which is compatible for most crates that use it, to avoid # dependencies on windows-sys. parking_lot = { path = "build/rust/parking_lot" } diff --git a/build/rust/env_logger/Cargo.toml b/build/rust/env_logger/Cargo.toml deleted file mode 100644 index 11e387b5a4f1..000000000000 --- a/build/rust/env_logger/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "env_logger" -version = "0.8.999" -edition = "2018" -license = "MPL-2.0" - -[lib] -path = "lib.rs" - -[dependencies.env_logger] -version = "0.9" -default-features = false - -[features] -default = ["env_logger/default"] -termcolor = ["env_logger/termcolor"] -atty = ["env_logger/atty"] -humantime = ["env_logger/humantime"] -regex = ["env_logger/regex"] diff --git a/build/rust/env_logger/lib.rs b/build/rust/env_logger/lib.rs deleted file mode 100644 index cd291d6351f2..000000000000 --- a/build/rust/env_logger/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -pub use env_logger::*; diff --git a/supply-chain/config.toml b/supply-chain/config.toml index 1545f377c89f..5904af63418a 100644 --- a/supply-chain/config.toml +++ b/supply-chain/config.toml @@ -671,10 +671,6 @@ criteria = "safe-to-run" version = "1.0.2" criteria = "safe-to-run" -[[exemptions.humantime]] -version = "2.1.0" -criteria = "safe-to-deploy" - [[exemptions.hyper]] version = "0.14.19" criteria = "safe-to-run" diff --git a/third_party/rust/humantime/.cargo-checksum.json b/third_party/rust/humantime/.cargo-checksum.json deleted file mode 100644 index 80dbdff4f914..000000000000 --- a/third_party/rust/humantime/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{"Cargo.toml":"c0d1443ae237dee3c09cb70185fa947d8d8cb660acfbcb8f650798bd4e0c019e","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"f6deca8261a8f4a3403dc74c725c46051157fd36c27cd4b100277eb1f303ad11","README.md":"e4bb65f28ddffb11d7eb337e9585947651f2fc11a5e4290f0ca126e21c582c1e","benches/datetime_format.rs":"ffe2e459e9b48e8fdbfb3686f6297257d66b29369ecd6750ae9fbba527ccc681","benches/datetime_parse.rs":"8039c4bd5f1795dbb54e1e39da5988f1d2df6c86c42d8fd378094fc78074d31e","bulk.yaml":"17c2548388e0cd3a63473021a2f1e4ddedee082d79d9167cb31ad06a1890d3fc","src/date.rs":"a8159494372ba8ec8a3a0a5b69c9b185f3e7ab007f283188bf96a6f071151f20","src/duration.rs":"4939ae2d1c3056424de421c4b124d0fb387e058d9abc82a21b83b38d66a40753","src/lib.rs":"ad4dbed28080d9a64ef0100c96b20ff4988d9dde908f56e28ece7252f5932990","src/wrapper.rs":"badc640e77379a42b2fcb728337d60a764b7f00a1b5b1d50c7372ddc20941967","vagga.yaml":"8396fe1510117c1c7bc3e896b62290dcf2dd300346071297018b0077ad9e45ce"},"package":"9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"} \ No newline at end of file diff --git a/third_party/rust/humantime/Cargo.toml b/third_party/rust/humantime/Cargo.toml deleted file mode 100644 index 950db73d35eb..000000000000 --- a/third_party/rust/humantime/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies -# -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) - -[package] -edition = "2018" -name = "humantime" -version = "2.1.0" -authors = ["Paul Colomiets "] -description = " A parser and formatter for std::time::{Duration, SystemTime}\n" -homepage = "https://github.com/tailhook/humantime" -documentation = "https://docs.rs/humantime" -readme = "README.md" -keywords = ["time", "human", "human-friendly", "parser", "duration"] -categories = ["date-and-time"] -license = "MIT/Apache-2.0" -repository = "https://github.com/tailhook/humantime" - -[lib] -name = "humantime" -path = "src/lib.rs" -[dev-dependencies.chrono] -version = "0.4" - -[dev-dependencies.rand] -version = "0.6" - -[dev-dependencies.time] -version = "0.1" diff --git a/third_party/rust/humantime/LICENSE-APACHE b/third_party/rust/humantime/LICENSE-APACHE deleted file mode 100644 index 8f71f43fee3f..000000000000 --- a/third_party/rust/humantime/LICENSE-APACHE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/third_party/rust/humantime/LICENSE-MIT b/third_party/rust/humantime/LICENSE-MIT deleted file mode 100644 index a099fbade45d..000000000000 --- a/third_party/rust/humantime/LICENSE-MIT +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2016 The humantime Developers - -Includes parts of http date with the following copyright: -Copyright (c) 2016 Pyfisch - -Includes portions of musl libc with the following copyright: -Copyright © 2005-2013 Rich Felker - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third_party/rust/humantime/README.md b/third_party/rust/humantime/README.md deleted file mode 100644 index 39156dcdc941..000000000000 --- a/third_party/rust/humantime/README.md +++ /dev/null @@ -1,68 +0,0 @@ -Human Time -========== - -**Status: stable** - -[Documentation](https://docs.rs/humantime) | -[Github](https://github.com/tailhook/humantime) | -[Crate](https://crates.io/crates/humantime) - - -Features: - -* Parses durations in free form like `15days 2min 2s` -* Formats durations in similar form `2years 2min 12us` -* Parses and formats timestamp in `rfc3339` format: `2018-01-01T12:53:00Z` -* Parses timestamps in a weaker format: `2018-01-01 12:53:00` - -Timestamp parsing/formatting is super-fast because format is basically -fixed. - -Here are some micro-benchmarks: - -``` -test result: ok. 0 passed; 0 failed; 26 ignored; 0 measured; 0 filtered out - - Running target/release/deps/datetime_format-8facb4ac832d9770 - -running 2 tests -test rfc3339_chrono ... bench: 737 ns/iter (+/- 37) -test rfc3339_humantime_seconds ... bench: 73 ns/iter (+/- 2) - -test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out - - Running target/release/deps/datetime_parse-342628f877d7867c - -running 6 tests -test datetime_utc_parse_millis ... bench: 228 ns/iter (+/- 11) -test datetime_utc_parse_nanos ... bench: 236 ns/iter (+/- 10) -test datetime_utc_parse_seconds ... bench: 204 ns/iter (+/- 18) -test rfc3339_humantime_millis ... bench: 28 ns/iter (+/- 1) -test rfc3339_humantime_nanos ... bench: 36 ns/iter (+/- 2) -test rfc3339_humantime_seconds ... bench: 24 ns/iter (+/- 1) - -test result: ok. 0 passed; 0 failed; 0 ignored; 6 measured; 0 filtered out -``` - -See [humantime-serde] for serde integration (previous crate [serde-humantime] looks unmaintained). - -[serde-humantime]: https://docs.rs/serde-humantime/0.1.1/serde_humantime/ -[humantime-serde]: https://docs.rs/humantime-serde - -License -======= - -Licensed under either of - -* Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) -* MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT) - -at your option. - -Contribution ------------- - -Unless you explicitly state otherwise, any contribution intentionally -submitted for inclusion in the work by you, as defined in the Apache-2.0 -license, shall be dual licensed as above, without any additional terms or -conditions. diff --git a/third_party/rust/humantime/benches/datetime_format.rs b/third_party/rust/humantime/benches/datetime_format.rs deleted file mode 100644 index 77d47667c089..000000000000 --- a/third_party/rust/humantime/benches/datetime_format.rs +++ /dev/null @@ -1,56 +0,0 @@ -#![feature(test)] -extern crate test; - -use std::io::Write; -use std::time::{Duration, UNIX_EPOCH}; - -use humantime::format_rfc3339; - -#[bench] -fn rfc3339_humantime_seconds(b: &mut test::Bencher) { - let time = UNIX_EPOCH + Duration::new(1_483_228_799, 0); - let mut buf = Vec::with_capacity(100); - b.iter(|| { - buf.truncate(0); - write!(&mut buf, "{}", format_rfc3339(time)).unwrap() - }); -} - -#[bench] -fn rfc3339_chrono(b: &mut test::Bencher) { - use chrono::{DateTime, NaiveDateTime, Utc}; - use chrono::format::Item; - use chrono::format::Item::*; - use chrono::format::Numeric::*; - use chrono::format::Fixed::*; - use chrono::format::Pad::*; - - let time = DateTime::::from_utc( - NaiveDateTime::from_timestamp(1_483_228_799, 0), Utc); - let mut buf = Vec::with_capacity(100); - - // formatting code from env_logger - const ITEMS: &[Item<'static>] = { - &[ - Numeric(Year, Zero), - Literal("-"), - Numeric(Month, Zero), - Literal("-"), - Numeric(Day, Zero), - Literal("T"), - Numeric(Hour, Zero), - Literal(":"), - Numeric(Minute, Zero), - Literal(":"), - Numeric(Second, Zero), - Fixed(TimezoneOffsetZ), - ] - }; - - - b.iter(|| { - buf.truncate(0); - write!(&mut buf, "{}", time.format_with_items(ITEMS.iter().cloned())) - .unwrap() - }); -} diff --git a/third_party/rust/humantime/benches/datetime_parse.rs b/third_party/rust/humantime/benches/datetime_parse.rs deleted file mode 100644 index 4248da281e60..000000000000 --- a/third_party/rust/humantime/benches/datetime_parse.rs +++ /dev/null @@ -1,47 +0,0 @@ -#![feature(test)] -extern crate test; - -use chrono::{DateTime}; -use humantime::parse_rfc3339; - -#[bench] -fn rfc3339_humantime_seconds(b: &mut test::Bencher) { - b.iter(|| { - parse_rfc3339("2018-02-13T23:08:32Z").unwrap() - }); -} - -#[bench] -fn datetime_utc_parse_seconds(b: &mut test::Bencher) { - b.iter(|| { - DateTime::parse_from_rfc3339("2018-02-13T23:08:32Z").unwrap() - }); -} - -#[bench] -fn rfc3339_humantime_millis(b: &mut test::Bencher) { - b.iter(|| { - parse_rfc3339("2018-02-13T23:08:32.123Z").unwrap() - }); -} - -#[bench] -fn datetime_utc_parse_millis(b: &mut test::Bencher) { - b.iter(|| { - DateTime::parse_from_rfc3339("2018-02-13T23:08:32.123Z").unwrap() - }); -} - -#[bench] -fn rfc3339_humantime_nanos(b: &mut test::Bencher) { - b.iter(|| { - parse_rfc3339("2018-02-13T23:08:32.123456983Z").unwrap() - }); -} - -#[bench] -fn datetime_utc_parse_nanos(b: &mut test::Bencher) { - b.iter(|| { - DateTime::parse_from_rfc3339("2018-02-13T23:08:32.123456983Z").unwrap() - }); -} diff --git a/third_party/rust/humantime/bulk.yaml b/third_party/rust/humantime/bulk.yaml deleted file mode 100644 index cdb9763b67d6..000000000000 --- a/third_party/rust/humantime/bulk.yaml +++ /dev/null @@ -1,8 +0,0 @@ -minimum-bulk: v0.4.5 - -versions: - -- file: Cargo.toml - block-start: ^\[package\] - block-end: ^\[.*\] - regex: ^version\s*=\s*"(\S+)" diff --git a/third_party/rust/humantime/src/date.rs b/third_party/rust/humantime/src/date.rs deleted file mode 100644 index 9d28ee7d0bda..000000000000 --- a/third_party/rust/humantime/src/date.rs +++ /dev/null @@ -1,623 +0,0 @@ -use std::error::Error as StdError; -use std::fmt; -use std::str; -use std::time::{SystemTime, Duration, UNIX_EPOCH}; - -#[cfg(target_os="cloudabi")] -mod max { - pub const SECONDS: u64 = ::std::u64::MAX / 1_000_000_000; - #[allow(unused)] - pub const TIMESTAMP: &'static str = "2554-07-21T23:34:33Z"; -} -#[cfg(all( - target_pointer_width="32", - not(target_os="cloudabi"), - not(target_os="windows"), - not(all(target_arch="wasm32", not(target_os="emscripten"))) -))] -mod max { - pub const SECONDS: u64 = ::std::i32::MAX as u64; - #[allow(unused)] - pub const TIMESTAMP: &'static str = "2038-01-19T03:14:07Z"; -} - -#[cfg(any( - target_pointer_width="64", - target_os="windows", - all(target_arch="wasm32", not(target_os="emscripten")), -))] -mod max { - pub const SECONDS: u64 = 253_402_300_800-1; // last second of year 9999 - #[allow(unused)] - pub const TIMESTAMP: &str = "9999-12-31T23:59:59Z"; -} - -/// Error parsing datetime (timestamp) -#[derive(Debug, PartialEq, Clone, Copy)] -pub enum Error { - /// Numeric component is out of range - OutOfRange, - /// Bad character where digit is expected - InvalidDigit, - /// Other formatting errors - InvalidFormat, -} - -impl StdError for Error {} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Error::OutOfRange => write!(f, "numeric component is out of range"), - Error::InvalidDigit => write!(f, "bad character where digit is expected"), - Error::InvalidFormat => write!(f, "timestamp format is invalid"), - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -enum Precision { - Smart, - Seconds, - Millis, - Micros, - Nanos, -} - -/// A wrapper type that allows you to Display a SystemTime -#[derive(Debug, Clone)] -pub struct Rfc3339Timestamp(SystemTime, Precision); - -#[inline] -fn two_digits(b1: u8, b2: u8) -> Result { - if b1 < b'0' || b2 < b'0' || b1 > b'9' || b2 > b'9' { - return Err(Error::InvalidDigit); - } - Ok(((b1 - b'0')*10 + (b2 - b'0')) as u64) -} - -/// Parse RFC3339 timestamp `2018-02-14T00:28:07Z` -/// -/// Supported feature: any precision of fractional -/// digits `2018-02-14T00:28:07.133Z`. -/// -/// Unsupported feature: localized timestamps. Only UTC is supported. -pub fn parse_rfc3339(s: &str) -> Result { - if s.len() < "2018-02-14T00:28:07Z".len() { - return Err(Error::InvalidFormat); - } - let b = s.as_bytes(); - if b[10] != b'T' || b[b.len()-1] != b'Z' { - return Err(Error::InvalidFormat); - } - parse_rfc3339_weak(s) -} - -/// Parse RFC3339-like timestamp `2018-02-14 00:28:07` -/// -/// Supported features: -/// -/// 1. Any precision of fractional digits `2018-02-14 00:28:07.133`. -/// 2. Supports timestamp with or without either of `T` or `Z` -/// 3. Anything valid for `parse_3339` is valid for this function -/// -/// Unsupported feature: localized timestamps. Only UTC is supported, even if -/// `Z` is not specified. -/// -/// This function is intended to use for parsing human input. Whereas -/// `parse_rfc3339` is for strings generated programmatically. -pub fn parse_rfc3339_weak(s: &str) -> Result { - if s.len() < "2018-02-14T00:28:07".len() { - return Err(Error::InvalidFormat); - } - let b = s.as_bytes(); // for careless slicing - if b[4] != b'-' || b[7] != b'-' || (b[10] != b'T' && b[10] != b' ') || - b[13] != b':' || b[16] != b':' - { - return Err(Error::InvalidFormat); - } - let year = two_digits(b[0], b[1])? * 100 + two_digits(b[2], b[3])?; - let month = two_digits(b[5], b[6])?; - let day = two_digits(b[8], b[9])?; - let hour = two_digits(b[11], b[12])?; - let minute = two_digits(b[14], b[15])?; - let mut second = two_digits(b[17], b[18])?; - - if year < 1970 || hour > 23 || minute > 59 || second > 60 { - return Err(Error::OutOfRange); - } - // TODO(tailhook) should we check that leaps second is only on midnight ? - if second == 60 { - second = 59 - }; - let leap_years = ((year - 1) - 1968) / 4 - ((year - 1) - 1900) / 100 + - ((year - 1) - 1600) / 400; - let leap = is_leap_year(year); - let (mut ydays, mdays) = match month { - 1 => (0, 31), - 2 if leap => (31, 29), - 2 => (31, 28), - 3 => (59, 31), - 4 => (90, 30), - 5 => (120, 31), - 6 => (151, 30), - 7 => (181, 31), - 8 => (212, 31), - 9 => (243, 30), - 10 => (273, 31), - 11 => (304, 30), - 12 => (334, 31), - _ => return Err(Error::OutOfRange), - }; - if day > mdays || day == 0 { - return Err(Error::OutOfRange); - } - ydays += day - 1; - if leap && month > 2 { - ydays += 1; - } - let days = (year - 1970) * 365 + leap_years + ydays; - - let time = second + minute * 60 + hour * 3600; - - let mut nanos = 0; - let mut mult = 100_000_000; - if b.get(19) == Some(&b'.') { - for idx in 20..b.len() { - if b[idx] == b'Z' { - if idx == b.len()-1 { - break; - } else { - return Err(Error::InvalidDigit); - } - } - if b[idx] < b'0' || b[idx] > b'9' { - return Err(Error::InvalidDigit); - } - nanos += mult * (b[idx] - b'0') as u32; - mult /= 10; - } - } else if b.len() != 19 && (b.len() > 20 || b[19] != b'Z') { - return Err(Error::InvalidFormat); - } - - let total_seconds = time + days * 86400; - if total_seconds > max::SECONDS { - return Err(Error::OutOfRange); - } - - Ok(UNIX_EPOCH + Duration::new(total_seconds, nanos)) -} - -fn is_leap_year(y: u64) -> bool { - y % 4 == 0 && (y % 100 != 0 || y % 400 == 0) -} - -/// Format an RFC3339 timestamp `2018-02-14T00:28:07Z` -/// -/// This function formats timestamp with smart precision: i.e. if it has no -/// fractional seconds, they aren't written at all. And up to nine digits if -/// they are. -/// -/// The value is always UTC and ignores system timezone. -pub fn format_rfc3339(system_time: SystemTime) -> Rfc3339Timestamp { - Rfc3339Timestamp(system_time, Precision::Smart) -} - -/// Format an RFC3339 timestamp `2018-02-14T00:28:07Z` -/// -/// This format always shows timestamp without fractional seconds. -/// -/// The value is always UTC and ignores system timezone. -pub fn format_rfc3339_seconds(system_time: SystemTime) -> Rfc3339Timestamp { - Rfc3339Timestamp(system_time, Precision::Seconds) -} - -/// Format an RFC3339 timestamp `2018-02-14T00:28:07.000Z` -/// -/// This format always shows milliseconds even if millisecond value is zero. -/// -/// The value is always UTC and ignores system timezone. -pub fn format_rfc3339_millis(system_time: SystemTime) -> Rfc3339Timestamp { - Rfc3339Timestamp(system_time, Precision::Millis) -} - -/// Format an RFC3339 timestamp `2018-02-14T00:28:07.000000Z` -/// -/// This format always shows microseconds even if microsecond value is zero. -/// -/// The value is always UTC and ignores system timezone. -pub fn format_rfc3339_micros(system_time: SystemTime) -> Rfc3339Timestamp { - Rfc3339Timestamp(system_time, Precision::Micros) -} - -/// Format an RFC3339 timestamp `2018-02-14T00:28:07.000000000Z` -/// -/// This format always shows nanoseconds even if nanosecond value is zero. -/// -/// The value is always UTC and ignores system timezone. -pub fn format_rfc3339_nanos(system_time: SystemTime) -> Rfc3339Timestamp { - Rfc3339Timestamp(system_time, Precision::Nanos) -} - -impl Rfc3339Timestamp { - /// Returns a reference to the [`SystemTime`][] that is being formatted. - pub fn get_ref(&self) -> &SystemTime { - &self.0 - } -} - -impl fmt::Display for Rfc3339Timestamp { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - use self::Precision::*; - - let dur = self.0.duration_since(UNIX_EPOCH) - .expect("all times should be after the epoch"); - let secs_since_epoch = dur.as_secs(); - let nanos = dur.subsec_nanos(); - - if secs_since_epoch >= 253_402_300_800 { // year 9999 - return Err(fmt::Error); - } - - /* 2000-03-01 (mod 400 year, immediately after feb29 */ - const LEAPOCH: i64 = 11017; - const DAYS_PER_400Y: i64 = 365*400 + 97; - const DAYS_PER_100Y: i64 = 365*100 + 24; - const DAYS_PER_4Y: i64 = 365*4 + 1; - - let days = (secs_since_epoch / 86400) as i64 - LEAPOCH; - let secs_of_day = secs_since_epoch % 86400; - - let mut qc_cycles = days / DAYS_PER_400Y; - let mut remdays = days % DAYS_PER_400Y; - - if remdays < 0 { - remdays += DAYS_PER_400Y; - qc_cycles -= 1; - } - - let mut c_cycles = remdays / DAYS_PER_100Y; - if c_cycles == 4 { c_cycles -= 1; } - remdays -= c_cycles * DAYS_PER_100Y; - - let mut q_cycles = remdays / DAYS_PER_4Y; - if q_cycles == 25 { q_cycles -= 1; } - remdays -= q_cycles * DAYS_PER_4Y; - - let mut remyears = remdays / 365; - if remyears == 4 { remyears -= 1; } - remdays -= remyears * 365; - - let mut year = 2000 + - remyears + 4*q_cycles + 100*c_cycles + 400*qc_cycles; - - let months = [31,30,31,30,31,31,30,31,30,31,31,29]; - let mut mon = 0; - for mon_len in months.iter() { - mon += 1; - if remdays < *mon_len { - break; - } - remdays -= *mon_len; - } - let mday = remdays+1; - let mon = if mon + 2 > 12 { - year += 1; - mon - 10 - } else { - mon + 2 - }; - - let mut buf: [u8; 30] = [ - // Too long to write as: b"0000-00-00T00:00:00.000000000Z" - b'0', b'0', b'0', b'0', b'-', b'0', b'0', b'-', b'0', b'0', b'T', - b'0', b'0', b':', b'0', b'0', b':', b'0', b'0', - b'.', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'Z', - ]; - buf[0] = b'0' + (year / 1000) as u8; - buf[1] = b'0' + (year / 100 % 10) as u8; - buf[2] = b'0' + (year / 10 % 10) as u8; - buf[3] = b'0' + (year % 10) as u8; - buf[5] = b'0' + (mon / 10) as u8; - buf[6] = b'0' + (mon % 10) as u8; - buf[8] = b'0' + (mday / 10) as u8; - buf[9] = b'0' + (mday % 10) as u8; - buf[11] = b'0' + (secs_of_day / 3600 / 10) as u8; - buf[12] = b'0' + (secs_of_day / 3600 % 10) as u8; - buf[14] = b'0' + (secs_of_day / 60 / 10 % 6) as u8; - buf[15] = b'0' + (secs_of_day / 60 % 10) as u8; - buf[17] = b'0' + (secs_of_day / 10 % 6) as u8; - buf[18] = b'0' + (secs_of_day % 10) as u8; - - let offset = if self.1 == Seconds || nanos == 0 && self.1 == Smart { - buf[19] = b'Z'; - 19 - } else if self.1 == Millis { - buf[20] = b'0' + (nanos / 100_000_000) as u8; - buf[21] = b'0' + (nanos / 10_000_000 % 10) as u8; - buf[22] = b'0' + (nanos / 1_000_000 % 10) as u8; - buf[23] = b'Z'; - 23 - } else if self.1 == Micros { - buf[20] = b'0' + (nanos / 100_000_000) as u8; - buf[21] = b'0' + (nanos / 10_000_000 % 10) as u8; - buf[22] = b'0' + (nanos / 1_000_000 % 10) as u8; - buf[23] = b'0' + (nanos / 100_000 % 10) as u8; - buf[24] = b'0' + (nanos / 10_000 % 10) as u8; - buf[25] = b'0' + (nanos / 1_000 % 10) as u8; - buf[26] = b'Z'; - 26 - } else { - buf[20] = b'0' + (nanos / 100_000_000) as u8; - buf[21] = b'0' + (nanos / 10_000_000 % 10) as u8; - buf[22] = b'0' + (nanos / 1_000_000 % 10) as u8; - buf[23] = b'0' + (nanos / 100_000 % 10) as u8; - buf[24] = b'0' + (nanos / 10_000 % 10) as u8; - buf[25] = b'0' + (nanos / 1_000 % 10) as u8; - buf[26] = b'0' + (nanos / 100 % 10) as u8; - buf[27] = b'0' + (nanos / 10 % 10) as u8; - buf[28] = b'0' + (nanos / 1 % 10) as u8; - // 29th is 'Z' - 29 - }; - - // we know our chars are all ascii - f.write_str(str::from_utf8(&buf[..=offset]).expect("Conversion to utf8 failed")) - } -} - -#[cfg(test)] -mod test { - use std::str::from_utf8; - use std::time::{UNIX_EPOCH, SystemTime, Duration}; - - use rand::Rng; - - use super::{parse_rfc3339, parse_rfc3339_weak, format_rfc3339}; - use super::{format_rfc3339_millis, format_rfc3339_micros}; - use super::{format_rfc3339_nanos}; - use super::max; - - fn from_sec(sec: u64) -> (String, SystemTime) { - let s = time::at_utc(time::Timespec { sec: sec as i64, nsec: 0 }) - .rfc3339().to_string(); - let time = UNIX_EPOCH + Duration::new(sec, 0); - (s, time) - } - - #[test] - #[cfg(all(target_pointer_width="32", target_os="linux"))] - fn year_after_2038_fails_gracefully() { - // next second - assert_eq!(parse_rfc3339("2038-01-19T03:14:08Z").unwrap_err(), - super::Error::OutOfRange); - assert_eq!(parse_rfc3339("9999-12-31T23:59:59Z").unwrap_err(), - super::Error::OutOfRange); - } - - #[test] - fn smoke_tests_parse() { - assert_eq!(parse_rfc3339("1970-01-01T00:00:00Z").unwrap(), - UNIX_EPOCH + Duration::new(0, 0)); - assert_eq!(parse_rfc3339("1970-01-01T00:00:01Z").unwrap(), - UNIX_EPOCH + Duration::new(1, 0)); - assert_eq!(parse_rfc3339("2018-02-13T23:08:32Z").unwrap(), - UNIX_EPOCH + Duration::new(1_518_563_312, 0)); - assert_eq!(parse_rfc3339("2012-01-01T00:00:00Z").unwrap(), - UNIX_EPOCH + Duration::new(1_325_376_000, 0)); - } - - #[test] - fn smoke_tests_format() { - assert_eq!( - format_rfc3339(UNIX_EPOCH + Duration::new(0, 0)).to_string(), - "1970-01-01T00:00:00Z"); - assert_eq!( - format_rfc3339(UNIX_EPOCH + Duration::new(1, 0)).to_string(), - "1970-01-01T00:00:01Z"); - assert_eq!( - format_rfc3339(UNIX_EPOCH + Duration::new(1_518_563_312, 0)).to_string(), - "2018-02-13T23:08:32Z"); - assert_eq!( - format_rfc3339(UNIX_EPOCH + Duration::new(1_325_376_000, 0)).to_string(), - "2012-01-01T00:00:00Z"); - } - - #[test] - fn smoke_tests_format_millis() { - assert_eq!( - format_rfc3339_millis(UNIX_EPOCH + - Duration::new(0, 0)).to_string(), - "1970-01-01T00:00:00.000Z"); - assert_eq!( - format_rfc3339_millis(UNIX_EPOCH + - Duration::new(1_518_563_312, 123_000_000)).to_string(), - "2018-02-13T23:08:32.123Z"); - } - - #[test] - fn smoke_tests_format_micros() { - assert_eq!( - format_rfc3339_micros(UNIX_EPOCH + - Duration::new(0, 0)).to_string(), - "1970-01-01T00:00:00.000000Z"); - assert_eq!( - format_rfc3339_micros(UNIX_EPOCH + - Duration::new(1_518_563_312, 123_000_000)).to_string(), - "2018-02-13T23:08:32.123000Z"); - assert_eq!( - format_rfc3339_micros(UNIX_EPOCH + - Duration::new(1_518_563_312, 456_123_000)).to_string(), - "2018-02-13T23:08:32.456123Z"); - } - - #[test] - fn smoke_tests_format_nanos() { - assert_eq!( - format_rfc3339_nanos(UNIX_EPOCH + - Duration::new(0, 0)).to_string(), - "1970-01-01T00:00:00.000000000Z"); - assert_eq!( - format_rfc3339_nanos(UNIX_EPOCH + - Duration::new(1_518_563_312, 123_000_000)).to_string(), - "2018-02-13T23:08:32.123000000Z"); - assert_eq!( - format_rfc3339_nanos(UNIX_EPOCH + - Duration::new(1_518_563_312, 789_456_123)).to_string(), - "2018-02-13T23:08:32.789456123Z"); - } - - #[test] - fn upper_bound() { - let max = UNIX_EPOCH + Duration::new(max::SECONDS, 0); - assert_eq!(parse_rfc3339(&max::TIMESTAMP).unwrap(), max); - assert_eq!(format_rfc3339(max).to_string(), max::TIMESTAMP); - } - - #[test] - fn leap_second() { - assert_eq!(parse_rfc3339("2016-12-31T23:59:60Z").unwrap(), - UNIX_EPOCH + Duration::new(1_483_228_799, 0)); - } - - #[test] - fn first_731_days() { - let year_start = 0; // 1970 - for day in 0..= 365 * 2 { // scan leap year and non-leap year - let (s, time) = from_sec(year_start + day * 86400); - assert_eq!(parse_rfc3339(&s).unwrap(), time); - assert_eq!(format_rfc3339(time).to_string(), s); - } - } - - #[test] - fn the_731_consecutive_days() { - let year_start = 1_325_376_000; // 2012 - for day in 0..= 365 * 2 { // scan leap year and non-leap year - let (s, time) = from_sec(year_start + day * 86400); - assert_eq!(parse_rfc3339(&s).unwrap(), time); - assert_eq!(format_rfc3339(time).to_string(), s); - } - } - - #[test] - fn all_86400_seconds() { - let day_start = 1_325_376_000; - for second in 0..86400 { // scan leap year and non-leap year - let (s, time) = from_sec(day_start + second); - assert_eq!(parse_rfc3339(&s).unwrap(), time); - assert_eq!(format_rfc3339(time).to_string(), s); - } - } - - #[test] - fn random_past() { - let upper = SystemTime::now().duration_since(UNIX_EPOCH).unwrap() - .as_secs(); - for _ in 0..10000 { - let sec = rand::thread_rng().gen_range(0, upper); - let (s, time) = from_sec(sec); - assert_eq!(parse_rfc3339(&s).unwrap(), time); - assert_eq!(format_rfc3339(time).to_string(), s); - } - } - - #[test] - fn random_wide_range() { - for _ in 0..100_000 { - let sec = rand::thread_rng().gen_range(0, max::SECONDS); - let (s, time) = from_sec(sec); - assert_eq!(parse_rfc3339(&s).unwrap(), time); - assert_eq!(format_rfc3339(time).to_string(), s); - } - } - - #[test] - fn milliseconds() { - assert_eq!(parse_rfc3339("1970-01-01T00:00:00.123Z").unwrap(), - UNIX_EPOCH + Duration::new(0, 123_000_000)); - assert_eq!(format_rfc3339(UNIX_EPOCH + Duration::new(0, 123_000_000)) - .to_string(), "1970-01-01T00:00:00.123000000Z"); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn zero_month() { - parse_rfc3339("1970-00-01T00:00:00Z").unwrap(); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn big_month() { - parse_rfc3339("1970-32-01T00:00:00Z").unwrap(); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn zero_day() { - parse_rfc3339("1970-01-00T00:00:00Z").unwrap(); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn big_day() { - parse_rfc3339("1970-12-35T00:00:00Z").unwrap(); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn big_day2() { - parse_rfc3339("1970-02-30T00:00:00Z").unwrap(); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn big_second() { - parse_rfc3339("1970-12-30T00:00:78Z").unwrap(); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn big_minute() { - parse_rfc3339("1970-12-30T00:78:00Z").unwrap(); - } - - #[test] - #[should_panic(expected="OutOfRange")] - fn big_hour() { - parse_rfc3339("1970-12-30T24:00:00Z").unwrap(); - } - - #[test] - fn break_data() { - for pos in 0.."2016-12-31T23:59:60Z".len() { - let mut s = b"2016-12-31T23:59:60Z".to_vec(); - s[pos] = b'x'; - parse_rfc3339(from_utf8(&s).unwrap()).unwrap_err(); - } - } - - #[test] - fn weak_smoke_tests() { - assert_eq!(parse_rfc3339_weak("1970-01-01 00:00:00").unwrap(), - UNIX_EPOCH + Duration::new(0, 0)); - parse_rfc3339("1970-01-01 00:00:00").unwrap_err(); - - assert_eq!(parse_rfc3339_weak("1970-01-01 00:00:00.000123").unwrap(), - UNIX_EPOCH + Duration::new(0, 123_000)); - parse_rfc3339("1970-01-01 00:00:00.000123").unwrap_err(); - - assert_eq!(parse_rfc3339_weak("1970-01-01T00:00:00.000123").unwrap(), - UNIX_EPOCH + Duration::new(0, 123_000)); - parse_rfc3339("1970-01-01T00:00:00.000123").unwrap_err(); - - assert_eq!(parse_rfc3339_weak("1970-01-01 00:00:00.000123Z").unwrap(), - UNIX_EPOCH + Duration::new(0, 123_000)); - parse_rfc3339("1970-01-01 00:00:00.000123Z").unwrap_err(); - - assert_eq!(parse_rfc3339_weak("1970-01-01 00:00:00Z").unwrap(), - UNIX_EPOCH + Duration::new(0, 0)); - parse_rfc3339("1970-01-01 00:00:00Z").unwrap_err(); - } -} diff --git a/third_party/rust/humantime/src/duration.rs b/third_party/rust/humantime/src/duration.rs deleted file mode 100644 index a4a46ebb3915..000000000000 --- a/third_party/rust/humantime/src/duration.rs +++ /dev/null @@ -1,456 +0,0 @@ -use std::error::Error as StdError; -use std::fmt; -use std::str::Chars; -use std::time::Duration; - -/// Error parsing human-friendly duration -#[derive(Debug, PartialEq, Clone)] -pub enum Error { - /// Invalid character during parsing - /// - /// More specifically anything that is not alphanumeric is prohibited - /// - /// The field is an byte offset of the character in the string. - InvalidCharacter(usize), - /// Non-numeric value where number is expected - /// - /// This usually means that either time unit is broken into words, - /// e.g. `m sec` instead of `msec`, or just number is omitted, - /// for example `2 hours min` instead of `2 hours 1 min` - /// - /// The field is an byte offset of the errorneous character - /// in the string. - NumberExpected(usize), - /// Unit in the number is not one of allowed units - /// - /// See documentation of `parse_duration` for the list of supported - /// time units. - /// - /// The two fields are start and end (exclusive) of the slice from - /// the original string, containing errorneous value - UnknownUnit { - /// Start of the invalid unit inside the original string - start: usize, - /// End of the invalid unit inside the original string - end: usize, - /// The unit verbatim - unit: String, - /// A number associated with the unit - value: u64, - }, - /// The numeric value is too large - /// - /// Usually this means value is too large to be useful. If user writes - /// data in subsecond units, then the maximum is about 3k years. When - /// using seconds, or larger units, the limit is even larger. - NumberOverflow, - /// The value was an empty string (or consists only whitespace) - Empty, -} - -impl StdError for Error {} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - Error::InvalidCharacter(offset) => write!(f, "invalid character at {}", offset), - Error::NumberExpected(offset) => write!(f, "expected number at {}", offset), - Error::UnknownUnit { unit, value, .. } if &unit == &"" => { - write!(f, - "time unit needed, for example {0}sec or {0}ms", - value, - ) - } - Error::UnknownUnit { unit, .. } => { - write!( - f, - "unknown time unit {:?}, \ - supported units: ns, us, ms, sec, min, hours, days, \ - weeks, months, years (and few variations)", - unit - ) - } - Error::NumberOverflow => write!(f, "number is too large"), - Error::Empty => write!(f, "value was empty"), - } - } -} - -/// A wrapper type that allows you to Display a Duration -#[derive(Debug, Clone)] -pub struct FormattedDuration(Duration); - -trait OverflowOp: Sized { - fn mul(self, other: Self) -> Result; - fn add(self, other: Self) -> Result; -} - -impl OverflowOp for u64 { - fn mul(self, other: Self) -> Result { - self.checked_mul(other).ok_or(Error::NumberOverflow) - } - fn add(self, other: Self) -> Result { - self.checked_add(other).ok_or(Error::NumberOverflow) - } -} - -struct Parser<'a> { - iter: Chars<'a>, - src: &'a str, - current: (u64, u64), -} - -impl<'a> Parser<'a> { - fn off(&self) -> usize { - self.src.len() - self.iter.as_str().len() - } - - fn parse_first_char(&mut self) -> Result, Error> { - let off = self.off(); - for c in self.iter.by_ref() { - match c { - '0'..='9' => { - return Ok(Some(c as u64 - '0' as u64)); - } - c if c.is_whitespace() => continue, - _ => { - return Err(Error::NumberExpected(off)); - } - } - } - Ok(None) - } - fn parse_unit(&mut self, n: u64, start: usize, end: usize) - -> Result<(), Error> - { - let (mut sec, nsec) = match &self.src[start..end] { - "nanos" | "nsec" | "ns" => (0u64, n), - "usec" | "us" => (0u64, n.mul(1000)?), - "millis" | "msec" | "ms" => (0u64, n.mul(1_000_000)?), - "seconds" | "second" | "secs" | "sec" | "s" => (n, 0), - "minutes" | "minute" | "min" | "mins" | "m" - => (n.mul(60)?, 0), - "hours" | "hour" | "hr" | "hrs" | "h" => (n.mul(3600)?, 0), - "days" | "day" | "d" => (n.mul(86400)?, 0), - "weeks" | "week" | "w" => (n.mul(86400*7)?, 0), - "months" | "month" | "M" => (n.mul(2_630_016)?, 0), // 30.44d - "years" | "year" | "y" => (n.mul(31_557_600)?, 0), // 365.25d - _ => { - return Err(Error::UnknownUnit { - start, end, - unit: self.src[start..end].to_string(), - value: n, - }); - } - }; - let mut nsec = self.current.1.add(nsec)?; - if nsec > 1_000_000_000 { - sec = sec.add(nsec / 1_000_000_000)?; - nsec %= 1_000_000_000; - } - sec = self.current.0.add(sec)?; - self.current = (sec, nsec); - Ok(()) - } - - fn parse(mut self) -> Result { - let mut n = self.parse_first_char()?.ok_or(Error::Empty)?; - 'outer: loop { - let mut off = self.off(); - while let Some(c) = self.iter.next() { - match c { - '0'..='9' => { - n = n.checked_mul(10) - .and_then(|x| x.checked_add(c as u64 - '0' as u64)) - .ok_or(Error::NumberOverflow)?; - } - c if c.is_whitespace() => {} - 'a'..='z' | 'A'..='Z' => { - break; - } - _ => { - return Err(Error::InvalidCharacter(off)); - } - } - off = self.off(); - } - let start = off; - let mut off = self.off(); - while let Some(c) = self.iter.next() { - match c { - '0'..='9' => { - self.parse_unit(n, start, off)?; - n = c as u64 - '0' as u64; - continue 'outer; - } - c if c.is_whitespace() => break, - 'a'..='z' | 'A'..='Z' => {} - _ => { - return Err(Error::InvalidCharacter(off)); - } - } - off = self.off(); - } - self.parse_unit(n, start, off)?; - n = match self.parse_first_char()? { - Some(n) => n, - None => return Ok( - Duration::new(self.current.0, self.current.1 as u32)), - }; - } - } - -} - -/// Parse duration object `1hour 12min 5s` -/// -/// The duration object is a concatenation of time spans. Where each time -/// span is an integer number and a suffix. Supported suffixes: -/// -/// * `nsec`, `ns` -- nanoseconds -/// * `usec`, `us` -- microseconds -/// * `msec`, `ms` -- milliseconds -/// * `seconds`, `second`, `sec`, `s` -/// * `minutes`, `minute`, `min`, `m` -/// * `hours`, `hour`, `hr`, `h` -/// * `days`, `day`, `d` -/// * `weeks`, `week`, `w` -/// * `months`, `month`, `M` -- defined as 30.44 days -/// * `years`, `year`, `y` -- defined as 365.25 days -/// -/// # Examples -/// -/// ``` -/// use std::time::Duration; -/// use humantime::parse_duration; -/// -/// assert_eq!(parse_duration("2h 37min"), Ok(Duration::new(9420, 0))); -/// assert_eq!(parse_duration("32ms"), Ok(Duration::new(0, 32_000_000))); -/// ``` -pub fn parse_duration(s: &str) -> Result { - Parser { - iter: s.chars(), - src: s, - current: (0, 0), - }.parse() -} - -/// Formats duration into a human-readable string -/// -/// Note: this format is guaranteed to have same value when using -/// parse_duration, but we can change some details of the exact composition -/// of the value. -/// -/// # Examples -/// -/// ``` -/// use std::time::Duration; -/// use humantime::format_duration; -/// -/// let val1 = Duration::new(9420, 0); -/// assert_eq!(format_duration(val1).to_string(), "2h 37m"); -/// let val2 = Duration::new(0, 32_000_000); -/// assert_eq!(format_duration(val2).to_string(), "32ms"); -/// ``` -pub fn format_duration(val: Duration) -> FormattedDuration { - FormattedDuration(val) -} - -fn item_plural(f: &mut fmt::Formatter, started: &mut bool, - name: &str, value: u64) - -> fmt::Result -{ - if value > 0 { - if *started { - f.write_str(" ")?; - } - write!(f, "{}{}", value, name)?; - if value > 1 { - f.write_str("s")?; - } - *started = true; - } - Ok(()) -} -fn item(f: &mut fmt::Formatter, started: &mut bool, name: &str, value: u32) - -> fmt::Result -{ - if value > 0 { - if *started { - f.write_str(" ")?; - } - write!(f, "{}{}", value, name)?; - *started = true; - } - Ok(()) -} - -impl FormattedDuration { - /// Returns a reference to the [`Duration`][] that is being formatted. - pub fn get_ref(&self) -> &Duration { - &self.0 - } -} - -impl fmt::Display for FormattedDuration { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - let secs = self.0.as_secs(); - let nanos = self.0.subsec_nanos(); - - if secs == 0 && nanos == 0 { - f.write_str("0s")?; - return Ok(()); - } - - let years = secs / 31_557_600; // 365.25d - let ydays = secs % 31_557_600; - let months = ydays / 2_630_016; // 30.44d - let mdays = ydays % 2_630_016; - let days = mdays / 86400; - let day_secs = mdays % 86400; - let hours = day_secs / 3600; - let minutes = day_secs % 3600 / 60; - let seconds = day_secs % 60; - - let millis = nanos / 1_000_000; - let micros = nanos / 1000 % 1000; - let nanosec = nanos % 1000; - - let ref mut started = false; - item_plural(f, started, "year", years)?; - item_plural(f, started, "month", months)?; - item_plural(f, started, "day", days)?; - item(f, started, "h", hours as u32)?; - item(f, started, "m", minutes as u32)?; - item(f, started, "s", seconds as u32)?; - item(f, started, "ms", millis)?; - item(f, started, "us", micros)?; - item(f, started, "ns", nanosec)?; - Ok(()) - } -} - -#[cfg(test)] -mod test { - use std::time::Duration; - - use rand::Rng; - - use super::{parse_duration, format_duration}; - use super::Error; - - #[test] - #[allow(clippy::cognitive_complexity)] - fn test_units() { - assert_eq!(parse_duration("17nsec"), Ok(Duration::new(0, 17))); - assert_eq!(parse_duration("17nanos"), Ok(Duration::new(0, 17))); - assert_eq!(parse_duration("33ns"), Ok(Duration::new(0, 33))); - assert_eq!(parse_duration("3usec"), Ok(Duration::new(0, 3000))); - assert_eq!(parse_duration("78us"), Ok(Duration::new(0, 78000))); - assert_eq!(parse_duration("31msec"), Ok(Duration::new(0, 31_000_000))); - assert_eq!(parse_duration("31millis"), Ok(Duration::new(0, 31_000_000))); - assert_eq!(parse_duration("6ms"), Ok(Duration::new(0, 6_000_000))); - assert_eq!(parse_duration("3000s"), Ok(Duration::new(3000, 0))); - assert_eq!(parse_duration("300sec"), Ok(Duration::new(300, 0))); - assert_eq!(parse_duration("300secs"), Ok(Duration::new(300, 0))); - assert_eq!(parse_duration("50seconds"), Ok(Duration::new(50, 0))); - assert_eq!(parse_duration("1second"), Ok(Duration::new(1, 0))); - assert_eq!(parse_duration("100m"), Ok(Duration::new(6000, 0))); - assert_eq!(parse_duration("12min"), Ok(Duration::new(720, 0))); - assert_eq!(parse_duration("12mins"), Ok(Duration::new(720, 0))); - assert_eq!(parse_duration("1minute"), Ok(Duration::new(60, 0))); - assert_eq!(parse_duration("7minutes"), Ok(Duration::new(420, 0))); - assert_eq!(parse_duration("2h"), Ok(Duration::new(7200, 0))); - assert_eq!(parse_duration("7hr"), Ok(Duration::new(25200, 0))); - assert_eq!(parse_duration("7hrs"), Ok(Duration::new(25200, 0))); - assert_eq!(parse_duration("1hour"), Ok(Duration::new(3600, 0))); - assert_eq!(parse_duration("24hours"), Ok(Duration::new(86400, 0))); - assert_eq!(parse_duration("1day"), Ok(Duration::new(86400, 0))); - assert_eq!(parse_duration("2days"), Ok(Duration::new(172_800, 0))); - assert_eq!(parse_duration("365d"), Ok(Duration::new(31_536_000, 0))); - assert_eq!(parse_duration("1week"), Ok(Duration::new(604_800, 0))); - assert_eq!(parse_duration("7weeks"), Ok(Duration::new(4_233_600, 0))); - assert_eq!(parse_duration("52w"), Ok(Duration::new(31_449_600, 0))); - assert_eq!(parse_duration("1month"), Ok(Duration::new(2_630_016, 0))); - assert_eq!(parse_duration("3months"), Ok(Duration::new(3*2_630_016, 0))); - assert_eq!(parse_duration("12M"), Ok(Duration::new(31_560_192, 0))); - assert_eq!(parse_duration("1year"), Ok(Duration::new(31_557_600, 0))); - assert_eq!(parse_duration("7years"), Ok(Duration::new(7*31_557_600, 0))); - assert_eq!(parse_duration("17y"), Ok(Duration::new(536_479_200, 0))); - } - - #[test] - fn test_combo() { - assert_eq!(parse_duration("20 min 17 nsec "), Ok(Duration::new(1200, 17))); - assert_eq!(parse_duration("2h 15m"), Ok(Duration::new(8100, 0))); - } - - #[test] - fn all_86400_seconds() { - for second in 0..86400 { // scan leap year and non-leap year - let d = Duration::new(second, 0); - assert_eq!(d, - parse_duration(&format_duration(d).to_string()).unwrap()); - } - } - - #[test] - fn random_second() { - for _ in 0..10000 { - let sec = rand::thread_rng().gen_range(0, 253_370_764_800); - let d = Duration::new(sec, 0); - assert_eq!(d, - parse_duration(&format_duration(d).to_string()).unwrap()); - } - } - - #[test] - fn random_any() { - for _ in 0..10000 { - let sec = rand::thread_rng().gen_range(0, 253_370_764_800); - let nanos = rand::thread_rng().gen_range(0, 1_000_000_000); - let d = Duration::new(sec, nanos); - assert_eq!(d, - parse_duration(&format_duration(d).to_string()).unwrap()); - } - } - - #[test] - fn test_overlow() { - // Overflow on subseconds is earlier because of how we do conversion - // we could fix it, but I don't see any good reason for this - assert_eq!(parse_duration("100000000000000000000ns"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("100000000000000000us"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("100000000000000ms"), - Err(Error::NumberOverflow)); - - assert_eq!(parse_duration("100000000000000000000s"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("10000000000000000000m"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("1000000000000000000h"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("100000000000000000d"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("10000000000000000w"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("1000000000000000M"), - Err(Error::NumberOverflow)); - assert_eq!(parse_duration("10000000000000y"), - Err(Error::NumberOverflow)); - } - - #[test] - fn test_nice_error_message() { - assert_eq!(parse_duration("123").unwrap_err().to_string(), - "time unit needed, for example 123sec or 123ms"); - assert_eq!(parse_duration("10 months 1").unwrap_err().to_string(), - "time unit needed, for example 1sec or 1ms"); - assert_eq!(parse_duration("10nights").unwrap_err().to_string(), - "unknown time unit \"nights\", supported units: \ - ns, us, ms, sec, min, hours, days, weeks, months, \ - years (and few variations)"); - } -} diff --git a/third_party/rust/humantime/src/lib.rs b/third_party/rust/humantime/src/lib.rs deleted file mode 100644 index 9be6f2285263..000000000000 --- a/third_party/rust/humantime/src/lib.rs +++ /dev/null @@ -1,34 +0,0 @@ -//! Human-friendly time parser and formatter -//! -//! Features: -//! -//! * Parses durations in free form like `15days 2min 2s` -//! * Formats durations in similar form `2years 2min 12us` -//! * Parses and formats timestamp in `rfc3339` format: `2018-01-01T12:53:00Z` -//! * Parses timestamps in a weaker format: `2018-01-01 12:53:00` -//! -//! Timestamp parsing/formatting is super-fast because format is basically -//! fixed. -//! -//! See [humantime-serde] for serde integration (previous crate [serde-humantime] looks unmaintained). -//! -//! [serde-humantime]: https://docs.rs/serde-humantime/0.1.1/serde_humantime/ -//! [humantime-serde]: https://docs.rs/humantime-serde - -#![forbid(unsafe_code)] -#![warn(missing_debug_implementations)] -#![warn(missing_docs)] - -mod duration; -mod wrapper; -mod date; - -pub use self::duration::{parse_duration, Error as DurationError}; -pub use self::duration::{format_duration, FormattedDuration}; -pub use self::wrapper::{Duration, Timestamp}; -pub use self::date::{parse_rfc3339, parse_rfc3339_weak, Error as TimestampError}; -pub use self::date::{ - format_rfc3339, format_rfc3339_micros, format_rfc3339_millis, format_rfc3339_nanos, - format_rfc3339_seconds, -}; -pub use self::date::{Rfc3339Timestamp}; diff --git a/third_party/rust/humantime/src/wrapper.rs b/third_party/rust/humantime/src/wrapper.rs deleted file mode 100644 index 99af6502ae8a..000000000000 --- a/third_party/rust/humantime/src/wrapper.rs +++ /dev/null @@ -1,107 +0,0 @@ -use std::str::FromStr; -use std::ops::Deref; -use std::fmt; -use std::time::{Duration as StdDuration, SystemTime}; - -use crate::duration::{self, parse_duration, format_duration}; -use crate::date::{self, parse_rfc3339_weak, format_rfc3339}; - -/// A wrapper for duration that has `FromStr` implementation -/// -/// This is useful if you want to use it somewhere where `FromStr` is -/// expected. -/// -/// See `parse_duration` for the description of the format. -/// -/// # Example -/// -/// ``` -/// use std::time::Duration; -/// let x: Duration; -/// x = "12h 5min 2ns".parse::().unwrap().into(); -/// assert_eq!(x, Duration::new(12*3600 + 5*60, 2)) -/// ``` -/// -#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] -pub struct Duration(StdDuration); - -/// A wrapper for SystemTime that has `FromStr` implementation -/// -/// This is useful if you want to use it somewhere where `FromStr` is -/// expected. -/// -/// See `parse_rfc3339_weak` for the description of the format. The "weak" -/// format is used as it's more pemissive for human input as this is the -/// expected use of the type (e.g. command-line parsing). -/// -/// # Example -/// -/// ``` -/// use std::time::SystemTime; -/// let x: SystemTime; -/// x = "2018-02-16T00:31:37Z".parse::().unwrap().into(); -/// assert_eq!(humantime::format_rfc3339(x).to_string(), "2018-02-16T00:31:37Z"); -/// ``` -/// -#[derive(Debug, PartialEq, Eq, Clone)] -pub struct Timestamp(SystemTime); - -impl AsRef for Duration { - fn as_ref(&self) -> &StdDuration { &self.0 } -} - -impl Deref for Duration { - type Target = StdDuration; - fn deref(&self) -> &StdDuration { &self.0 } -} - -impl Into for Duration { - fn into(self) -> StdDuration { self.0 } -} - -impl From for Duration { - fn from(dur: StdDuration) -> Duration { Duration(dur) } -} - -impl FromStr for Duration { - type Err = duration::Error; - fn from_str(s: &str) -> Result { - parse_duration(s).map(Duration) - } -} - -impl fmt::Display for Duration { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - format_duration(self.0).fmt(f) - } -} - -impl AsRef for Timestamp { - fn as_ref(&self) -> &SystemTime { &self.0 } -} - -impl Deref for Timestamp { - type Target = SystemTime; - fn deref(&self) -> &SystemTime { &self.0 } -} - -impl Into for Timestamp { - fn into(self) -> SystemTime { self.0 } -} - -impl From for Timestamp { - fn from(dur: SystemTime) -> Timestamp { Timestamp(dur) } -} - -impl FromStr for Timestamp { - type Err = date::Error; - fn from_str(s: &str) -> Result { - parse_rfc3339_weak(s).map(Timestamp) - } -} - -impl fmt::Display for Timestamp { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - format_rfc3339(self.0).fmt(f) - } -} diff --git a/third_party/rust/humantime/vagga.yaml b/third_party/rust/humantime/vagga.yaml deleted file mode 100644 index 8a6b5847e07e..000000000000 --- a/third_party/rust/humantime/vagga.yaml +++ /dev/null @@ -1,92 +0,0 @@ -commands: - - cargo: !Command - description: Run any cargo command - container: ubuntu - run: [cargo] - - make: !Command - description: Build the library - container: ubuntu - run: [cargo, build] - - test64: !Command - description: Test the 64bit library - container: ubuntu - environ: { RUST_BACKTRACE: 1 } - run: [cargo, test] - - test32: !Command - description: Test the 32bit library - container: ubuntu32 - environ: { RUST_BACKTRACE: 1 } - run: [cargo, test] - - test: !Command - description: Test the 64bit library - container: ubuntu - environ: { RUST_BACKTRACE: 1 } - prerequisites: [test64, test32] - run: [echo, okay] - - bench: !Command - description: Run benchmarks - container: bench - environ: { RUST_BACKTRACE: 1 } - run: [cargo, bench] - - _bulk: !Command - description: Run `bulk` command (for version bookkeeping) - container: ubuntu - run: [bulk] - -containers: - - ubuntu: - setup: - - !Ubuntu xenial - - !UbuntuUniverse - - !Install [ca-certificates, build-essential, vim] - - - !TarInstall - url: "https://static.rust-lang.org/dist/rust-1.31.0-x86_64-unknown-linux-gnu.tar.gz" - script: "./install.sh --prefix=/usr \ - --components=rustc,rust-std-x86_64-unknown-linux-gnu,cargo" - - &bulk !Tar - url: "https://github.com/tailhook/bulk/releases/download/v0.4.10/bulk-v0.4.10.tar.gz" - sha256: 481513f8a0306a9857d045497fb5b50b50a51e9ff748909ecf7d2bda1de275ab - path: / - - environ: - HOME: /work/target - USER: pc - - ubuntu32: - setup: - - !UbuntuRelease - codename: xenial - arch: i386 - - !UbuntuUniverse - - !Install [ca-certificates, build-essential, vim] - - - !TarInstall - url: "https://static.rust-lang.org/dist/rust-1.31.0-i686-unknown-linux-gnu.tar.gz" - script: "./install.sh --prefix=/usr \ - --components=rustc,rust-std-i686-unknown-linux-gnu,cargo" - - environ: - HOME: /work/target - USER: pc - - bench: - setup: - - !Ubuntu xenial - - !Install [ca-certificates, wget, build-essential] - - !TarInstall - url: https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz - script: | - ./install.sh --prefix=/usr \ - --components=rustc,rust-std-x86_64-unknown-linux-gnu,cargo - environ: - HOME: /work/target - USER: pc diff --git a/third_party/rust/mp4parse/.cargo-checksum.json b/third_party/rust/mp4parse/.cargo-checksum.json index eff7dfbf0d9c..0a8608f6cd6e 100644 --- a/third_party/rust/mp4parse/.cargo-checksum.json +++ b/third_party/rust/mp4parse/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"f283fc1597f492cd1e03cd08b9c77f042ae4494fc96b4dcb566ec0abbda65efc","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"86cb40854b93f988e3a63ce6fe39d2ce95367f8ca301a5ba50676ff98a0ad791","benches/avif_benchmark.rs":"cd99c0dde025ab40d2cd860f53dc697a1587a48c164c3e5c8adfd40add29d772","link-u-avif-sample-images/.github/workflows/encode-and-decode-daily.yml":"84b787f721024a100ce09ac5714a1d78a4811893861e89495313f435b9d02359","link-u-avif-sample-images/.gitignore":"ac16d40779ab2d608843a3cb1b0418a1ffdc0e71a06c4d140386fadf007a54a7","link-u-avif-sample-images/LICENSE.txt":"da89f9867822be4b8adb1e601d9e9226c195016c6508015eb7593e68ead0c98a","link-u-avif-sample-images/Makefile":"b5697e8685d2a9ce0f4b4c976a5f707022ed113782d16dc59ae280d3a8ce77b1","link-u-avif-sample-images/README.md":"d249fb7bef4f21359cfc4f2977e1b2f2c6e6dd6e57cb1cdc1da1f0edd8aa55d0","link-u-avif-sample-images/fox.jpg":"927997a90ae88ead007283bf9c1392159d0acd2e9890522146211fda2112a2d9","link-u-avif-sample-images/fox.odd-height.png":"6136247772bd1c0edd50426bca4f3485473ac25a784e5ec8777f7491598e96db","link-u-avif-sample-images/fox.odd-width.odd-height.png":"6f91dc21c137f318d0443ce28bbf3f74d5502180c254327b46e41040a33f1363","link-u-avif-sample-images/fox.odd-width.png":"a8b2328c8700c16280c5ab40a34147edac598d4d48ca101bef649e468ae1492e","link-u-avif-sample-images/fox.png":"c45bfb5780843c70a37426340020e3e7ff41d7cf1df9fec614a5cf429d078573","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.avif":"811af5e96631309030a14cbc30c3bacfaa667f2e36e16a4f30434b8f5a23310c","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.avif":"e35713343e9ee04c51ab9cfdc99a0c7d126a1917cb83f5b9a23c71ed59269be2","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.odd-height.avif":"485623f7838d8f442c47348c6492765e6aafbc3d5ccd8e90efc9c812ff15e265","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.odd-width.avif":"8e75b9a8975267359d827e4cbc6877b1674aa31b87f88f222dde03263f9254df","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif":"1fff5915a332d6aaa85d668f3f338bda6fad9c6ec1f380f2c46737d536cea5de","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.odd-height.avif":"cca9785f14c74d865453518c0962dabd6d1b92d2c6c5f5ac67efdbf5606acb83","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.odd-width.avif":"de3399d8b56431f0ed34e2f14200f31dd54544fddbb12f39b4d55449d5660c56","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.odd-width.odd-height.avif":"07507744cb76b74a3586b93fc3b273a98f998d75f7687db3e9cb3725d7b1fb9d","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.avif":"cb884c82ac7b6d4fa03b1f687e9e20abc346107095473e9c1d422aaf0de14eaf","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.avif":"15d84077066c47fdbe2a7b8ed583a17017d09a033144ac1b31486d6c8f6f5c82","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.odd-height.avif":"365439d2ee2fe5229e066362c03a73a182c7f6626772ecf5345b22752d32e681","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.odd-width.avif":"c623b9943123d6c47d3300444f7255cbdfebfe2b47a670287f2baeb717fac42b","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif":"dd069f3c3c4f7589f5f7ef1d7b6a91b8cb975d32663a4a92b6d75219edd72954","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.odd-height.avif":"75628450288ace3386651725411c8f0ffff7eb95f82c5307b0faa3350f09f50e","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.odd-width.avif":"f91b6f455412adabc5094011362eaaa1f6a9d5740de0b8a1be42a96c16e7617f","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.odd-width.odd-height.avif":"bb8695cacacaf8f2e13a739de75e5e8a9d970d68c3acdfb7d82171a9bac2f01e","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.avif":"a10de8204aee73ba1786daca6390546bd7aa6b069aaa644012219a1c11246a43","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.odd-height.avif":"734a5badc59a8bed19e8eb476911048ddb011ca7c9eac31b7a7ed20e0135ac2c","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.odd-width.avif":"68d15d76d95f268e810dfd87bbf96d8c3197580afce2d30b50bb1f07865077f3","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.odd-width.odd-height.avif":"01e469b33bacb7e07e15e23b2997907bbcf02d8fcc99885a027494d31c45547c","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.avif":"a0cdc981a6b056c8af2d177a1438c332d630040dacbfd1c89bb5e3e381ba5822","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.odd-height.avif":"77e0510def73213c00ebcf051cf45fa63cf27d7c69340cc145ab6d44ec77bb07","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.odd-width.avif":"12787042364bd13be01830f988cb714220bde340a3329baa808df27a269b83f8","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.odd-width.odd-height.avif":"fad3b6dd9cb99e6925858f69aafae3f68c861845f2c3d4a6d1c51c6161490134","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.avif":"e34f3bab5df802be2d422c685824464eb5f7e182b235ca99bde11c4c34ff3ac2","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.avif":"05804752621e2fd7a9d85b01e2995a50e3efd30693efd934152560622d66e841","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.odd-height.avif":"ef041f2efa0424d3a6dcfc5f0c3f619aea0e197aaeb5a050a2d877a457513921","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.odd-width.avif":"b711b321b8a4d3a41e08f80a17c2203b839458cb6346aff6fff3f8d7699032e6","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif":"e3f40aad0ddd6c04ffacf4a754a0525986c89d519119d37655282551e3ea3a59","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.odd-height.avif":"4ef74c37712b41d6e5269d939f9d52031bc10746f7c8c029db618c5935aff9a6","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.odd-width.avif":"4cf6c849f4a48a639217ad9a1e0d027f4fc804d524c03e6707ec9714a252532f","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.odd-width.odd-height.avif":"3d3978e8e8d07270f82a877d3535f9483b88fce93a1c4accb658b494452b1d36","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.avif":"626d73272e59722084c528b27b72a0920bec462a10749b3e87036e42bf8a24e5","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.avif":"caf50c467242b3fa0b895a2af131fa0d03dd7b34989f2b1a51d25b2246c98fab","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.odd-height.avif":"1e88b92df592c02af53ff5258fa898ac8fe1d71954e9a440500ef7879b8a1c46","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.odd-width.avif":"466efdd269f3be3b1c88afc093c839e50ba5eaf6bd0c2425e157000d02a3c21a","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif":"36014509d0688cb307e0ffcdb5b4c16ff6e6c79772c7fbbeea33b4d483a1566f","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.odd-height.avif":"d1786723a5d6ea1e1764b0045dc3f669fe3905ffc2913011a2b1b424d2393397","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.odd-width.avif":"a2d9178cc5622e28472a735650d9c4deaec6d27d69830110911f4158f9d4a04e","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.odd-width.odd-height.avif":"89a9fc7598d72251b903e0c7088ab3e7a7f316b5e02b85f8c69e51f8eb0c7e69","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.avif":"51476b8471e1c0a5ebbd1e7545709495bef619cc96c02d277aad32b1deff8ea9","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.avif":"caf50c467242b3fa0b895a2af131fa0d03dd7b34989f2b1a51d25b2246c98fab","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.odd-height.avif":"1e88b92df592c02af53ff5258fa898ac8fe1d71954e9a440500ef7879b8a1c46","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.odd-width.avif":"466efdd269f3be3b1c88afc093c839e50ba5eaf6bd0c2425e157000d02a3c21a","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif":"36014509d0688cb307e0ffcdb5b4c16ff6e6c79772c7fbbeea33b4d483a1566f","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.odd-height.avif":"4808960cdcd1207b29eb6ef5b4db81ae5e63c5d40ef92f7a1e8f4430e765bde4","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.odd-width.avif":"71f3c73737bc04c23d93ea2c61a8a07408f604192fe53fe12c65050927dacb4e","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.odd-width.odd-height.avif":"8f9649384fa09c70af0c2e9e0d94ecd17492c702e015d9d6290d3aefc57c548c","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.avif":"ed96eca6ed79863eaf91e4d666e4e220b5fa4e5a6cb1696477ba901ac12f5dde","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.avif":"caf50c467242b3fa0b895a2af131fa0d03dd7b34989f2b1a51d25b2246c98fab","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.odd-height.avif":"1e88b92df592c02af53ff5258fa898ac8fe1d71954e9a440500ef7879b8a1c46","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.odd-width.avif":"466efdd269f3be3b1c88afc093c839e50ba5eaf6bd0c2425e157000d02a3c21a","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif":"36014509d0688cb307e0ffcdb5b4c16ff6e6c79772c7fbbeea33b4d483a1566f","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.odd-height.avif":"c43b4c607e301e34eb953770133d89d15e77d63be8d6421a80d6212fbbbf3453","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.odd-width.avif":"0e6218ce250ee7f84a621f3af73286fd4dabea19e9898d3575c20c5955aa427d","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.odd-width.odd-height.avif":"9f19846d884ac7d161ac2ca15811bb22ff7f3847bc1ad5d7713971ea024631aa","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.avif":"2cb363d30f83bff58ee049874b1808b37cb1d35342edf16b3ce25cb243c9ea55","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.avif":"8217b88f350c5d3812d7f863fe9d710c4c1b846b0be8df29ce6b3eb30d2b8d8f","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.odd-height.avif":"51eccd8c1368ddec9bc1f3a7631dadb00682e985fbfea66c0a2f533f6a73b67e","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.odd-width.avif":"83fe4593ab839cf296a2ccb8a146daf826d1d602f4f239cb63ee020f2cc326f6","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif":"4e63b84a980a81adde586314a94d8f834ec763749d8797c286471415b6b75647","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.odd-height.avif":"efc70882aacbb533c0e833a4401949d152dceb364846442cdccca5048ad17a60","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.odd-width.avif":"c07575c88ef400c1725c9260a19439e0e784da41c7db3867059019ddbdb3bebe","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.odd-width.odd-height.avif":"86aee64fd7b11b9834537ea14b2eff234c062c98d32fab51ff14aba262d5b106","link-u-avif-sample-images/hato.16bpc.png":"53b550c587cd1d19a1997184e47f4a3ff2a05cedf7cb4e42a9466a6d6cb60d8d","link-u-avif-sample-images/hato.jpg":"6d4804e5e4adf36a6b138544c81b743ed7abdd9a495a43e883ec77689ca28943","link-u-avif-sample-images/hato.png":"313880f4cc51160fec522d78f1fb7f06df70fe1929a731fc86c68ecefd312277","link-u-avif-sample-images/hato.profile0.10bpc.yuv420.avif":"1e84598c94bc795c55a551bdf6f283b4eed4997bda15e5c4bb2e29d0dc70897b","link-u-avif-sample-images/hato.profile0.10bpc.yuv420.monochrome.avif":"25c19a187d10eac963bb51b3fae1ffe50f3ccbc7ad02e51948dc7467b397ce61","link-u-avif-sample-images/hato.profile0.8bpc.yuv420.avif":"07cd454de19dd638354f75d9e97aab08bc8a04dd45c4f7531cb62a1a5656c8c9","link-u-avif-sample-images/hato.profile0.8bpc.yuv420.monochrome.avif":"120a3f26f3d6cde80869fb52bdb8fdd55b443882c98070ea938575e4790982ff","link-u-avif-sample-images/hato.profile2.10bpc.yuv422.avif":"d54251d4bc023f2e53624a46cb18e56cbc45768bd1bd50394de191c2a42106e8","link-u-avif-sample-images/hato.profile2.10bpc.yuv422.monochrome.avif":"ed33dfdb5e663b3394298b6921f9b19b129e14788dead776430eee2f14780a73","link-u-avif-sample-images/hato.profile2.12bpc.yuv422.avif":"ad361ac7d94fbc6af7ef30cbd3601ff366bc360c304480387a58a4c6fecee9b6","link-u-avif-sample-images/hato.profile2.12bpc.yuv422.monochrome.avif":"e28b4cacda95750e465e205fbfcba6a6af1d8418dac649838730c555ff7d828f","link-u-avif-sample-images/hato.profile2.8bpc.yuv422.avif":"69c353c482c2eb3d3671bb55f7ccfc932e4d781c714a72116e9138ffc6f6c720","link-u-avif-sample-images/hato.profile2.8bpc.yuv422.monochrome.avif":"e7d6f7d42a8519e1482f225fe447b5642d19a54ee830529223eac114a0dec189","link-u-avif-sample-images/images.html":"9e18453dfe5b205600f158282c6896265281e3b04b2fbc332804fab1dbdb3faf","link-u-avif-sample-images/kimono.avif":"63412e0f67f37c8b6fcf0e8269a2afae0a017fa6a3a99d37d055c590b0be52d3","link-u-avif-sample-images/kimono.crop.avif":"f175dcd9c64813b759da185fa67076fb772b76059845b2aad3ddcfab257f75ad","link-u-avif-sample-images/kimono.crop.png":"0d5605bae0ec9d39aad9dc8e1a371d0327c6a224643983e3ee1f4d44cb00f19d","link-u-avif-sample-images/kimono.jpg":"a6ad58e3cea437ee0c841115ba67ae7354de7af734de50de9d0853dd4e571577","link-u-avif-sample-images/kimono.mirror-horizontal.avif":"2bbc004d91145488610158a5acdb4d706495a2b15511db20ff57bb9efd80885c","link-u-avif-sample-images/kimono.mirror-horizontal.png":"9af9e839fe6bf6342831970c20291f619570d2fc687951ae00cd81ea766f53fe","link-u-avif-sample-images/kimono.mirror-vertical.avif":"f10eb04791fcca3409868b367128649f32e6b6fffcf02484cdefa57909f6bb74","link-u-avif-sample-images/kimono.mirror-vertical.png":"4ed003c5868fd2e78c7b2dcbd54a67a0e7593dabb3ac82b1c9e5e2dbdf09b8ec","link-u-avif-sample-images/kimono.mirror-vertical.rotate270.avif":"33c36ec2274b00ac6f81c9f61e55c20cbfce1649ad27520afe635310f516ead1","link-u-avif-sample-images/kimono.mirror-vertical.rotate270.crop.avif":"90ca48f657455b8f8e4a4e1769a05af90a3e34dca11a8b3c32552daf378ee956","link-u-avif-sample-images/kimono.mirror-vertical.rotate270.png":"74b9b7ffa8955761f747a0e6e81d5b7ecb5e325383546110e1b6aa9986728035","link-u-avif-sample-images/kimono.png":"84fd6cfb97a27739608e21779f874b4ae7e80342b2588e8b0b092dee2d57c881","link-u-avif-sample-images/kimono.rotate270.avif":"79a99a0415276cc11f2e871d070a9df84df3385888a2f2fa3534320f6bed98ed","link-u-avif-sample-images/kimono.rotate270.png":"1918a47c02b378945a705301abd4250ddc65bb95afce9424572ffd0fdd1f45ef","link-u-avif-sample-images/kimono.rotate90.avif":"bd1157d8c840713c82b907b9d3ae80bc3817849e11c323d875f8016e035bd3cc","link-u-avif-sample-images/kimono.rotate90.png":"1a73c61692abe96d0a7a9accdb36a83d51bceac79bbb83a00571570f494cca49","link-u-avif-sample-images/plum-blossom-large.png":"af6ea005b726ca39f342e946aa53bed88e5a140413ce896d166bb35ab0aa3b4f","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif":"cf8e15ec4b210235f3d68332a1adeb64e35c41b8d8e1e7586ae38b6d9cd8926c","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif":"b413440309d5669a7aefa06f291f72de0d0c09972e3da9a385e6016d6a1c5562","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif":"64f6f2b1fda594af5c9e2d6e4bc752b55e8121000cdcedc0066018e53f76de40","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif":"2b175a600aed64c1c1de4b2d661fb405437b1ff000b964d4be6ac437ce73136f","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif":"21ebb3732186bf7c6c13cf7197155b64201e674b9c79cf613b6e5718bde14c2a","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif":"65917797e511c9033b3e225eb5d84f3c0440b7a496d4b8ab5674e123ad68aab7","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif":"f4809df9188fa46ed100f63c78c4cf42559d90a98351a8f69e177385920672b4","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif":"dffc213dc36f0b5ff3d86254f5185c2d1fb03380918a8fa39d186fb59cbba7cc","link-u-avif-sample-images/plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif":"0a615cfb673ab45e37da3582c17dd36f86d5da3d81246a32951d1db4ed90149d","link-u-avif-sample-images/plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif":"d1cc6a0db116a68e229676b289e8ced84d42a9f0e8d3ccd760fc92dbeb932547","link-u-avif-sample-images/plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif":"8626cf0b2c60fee51cf1df7fe4d8a18081b72e3604f7d3ff14cc5a35581927d9","link-u-avif-sample-images/plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif":"56bf18e4bcbfbea460c306ab900fc506169854d2b91690e1a48156a86fff3264","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif":"b56f3c33797e4c5bb80418ae25f6f2c6fc88ddc1f6965d82abc44059f052f36c","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif":"c3c6db4ce801c68e2afd7bfb72abacc13287cc2e247917a817ff5632bd4b18fb","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif":"095f57fff1dc037a6414c60263415dcfa86b10d81f58e8e4c3aef17cffae0e5f","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif":"ba3035a69296d12f47d1c450f2de8cc0c9059ebbf27bb8b0996ff6d1ab1132a1","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif":"a9551e1963049b874216b40aaf9be45bc44dc11887770712b77240862c6c08a9","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif":"a8a0ba881cd0aef45a5874f412e97812ca457eaf12e56b34bac2ba051e142828","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif":"6891b5bdbed7f541c673c66cec4584b191bb737a49b37cca16ae069830890b42","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif":"67e66826637e349e1c3c46316c7048d152aed8453d8cdd00c6b786f87fe176d8","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif":"a466503110f60dcadaafe78c2cb0a8ca58334c22868efe428c7ac12b69407c95","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif":"a8a0ba881cd0aef45a5874f412e97812ca457eaf12e56b34bac2ba051e142828","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif":"061b4c70707e7fc8866580656cca7ca2da2263645829a564dbf8f205d639f058","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif":"67e66826637e349e1c3c46316c7048d152aed8453d8cdd00c6b786f87fe176d8","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif":"4a03c8bcfcaadccdeb07432ed80680b06aba5ae5e616fc370b376acb478f6cd1","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif":"a8a0ba881cd0aef45a5874f412e97812ca457eaf12e56b34bac2ba051e142828","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif":"376625ce4e7ec3b57344a9f2185a34975fe380774c9f8e0dd4ef61c46da94fca","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif":"67e66826637e349e1c3c46316c7048d152aed8453d8cdd00c6b786f87fe176d8","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif":"1e17b7dd8e351cb667bc6ec0b81fdebca9fd30ad5e588b3eac57bf9f90a9b58b","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif":"f77588d2ff39e4461869a95ca236efdf4a3fdc17b8a6e3907e63b417e56c81b5","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif":"f2eabd3fc2db07b361d55b5af63023d28b5bdd0047a665e9d0685651ce9db94b","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif":"dd88c377b253d689bfd4600d7c3007448df0ed92f679b661d5d51e051a6916d8","link-u-avif-sample-images/plum-blossom-small.png":"c859fd97b647e494461f65835b9c1c3476807aee77076599adf18a832b3617a4","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif":"fe3379620f983e5da4210b0f7c5d164e86208b34106d6b11d56e2b52beee5dfe","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif":"9e6234686053dba2e44bb32192c641074095a61e45aa1bede85bb83751e6e157","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif":"60ffa59dd007aea3bb596cfb03853b3dad490b1ffd10471ad4fe1901ec819907","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif":"58abfa027525aca7339a705f311bc30b000aef9822c7c50b232894ece1ba9cb1","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif":"541ca66a11b1430d11f77b74a13f859239a3bd9f44976b8dfe163c5d7595a69f","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif":"6d7852c63c27a77bef94443e178ecf6b6a3da8cc846f9f0c1adc17f7fc35e1f3","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif":"3712216ffc7edb95a976b68469ead533fda6fe9f3d2e8cb09cbdb0d01d9c094b","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif":"59672af536b169ebf7e48129167dc91cb253925517c37db28b64539f7afba5d3","link-u-avif-sample-images/plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif":"561d5158425ad39425916a3be048b0202e82efef44cf1a9f711db57192d2ff01","link-u-avif-sample-images/plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif":"88336f29457c1dc4ae0b754ef14b791de4d8c337f2b44d7960aafcca08a5586e","link-u-avif-sample-images/plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif":"245a3dad6371dc702f29eb7e9735f843b63c525da871859728bedbe5bb274985","link-u-avif-sample-images/plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif":"490c216b5850c670f6088ee72c7fd906102b2dd0c8432c01a517b3328db27c75","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif":"0d0bbbcb0c9ade1c827317a6409ce6ba25027b36da1b6752379a5f5d4c8af056","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif":"418a9d4b7dcbc1f67fc4b95ccb2e7946c446fddd35a79f0d587b3f2165cb3f14","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif":"a41dcfabb3795ed93a05881a91bf4d1c5d1b9b0e5d0db728f12684b12613e0c9","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif":"4b6a18f4f608d1b00598e67c1c91a4e8f4943ae5acf0166ae0121cc21f3b7437","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif":"5e6b83adee3aeac4bba3f38e854e2ed7585aa1557a74b5fa66596098c53e26f2","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif":"fb0937564c08f4e1c22ebbde426a0eff6a1d388434c30148bc7e5582dc378caa","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif":"f42e780bff644167e27525fee65b23e70814f7665ea19b6d693eb127c5eeebd8","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif":"d41ead1d69d33d0cf5f6fe575beb5f60d9565300c535f9042113dd8a748c1d31","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif":"c6ee9234ee7783d0203f9512e3cc8fe76a694675bcf03c320ff8bab4684bd4e9","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif":"fb0937564c08f4e1c22ebbde426a0eff6a1d388434c30148bc7e5582dc378caa","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif":"21e1e51fc6da66e090e12e1df5aeabf1f478df64bcb8151caaa687ad262bdd9d","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif":"d41ead1d69d33d0cf5f6fe575beb5f60d9565300c535f9042113dd8a748c1d31","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif":"dfed73d646d7159d3ee4f9ce95ea628fdd33bf8bf1bb02a83d88302d088f4d97","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif":"fb0937564c08f4e1c22ebbde426a0eff6a1d388434c30148bc7e5582dc378caa","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif":"5539cd575256772ba31d6e87cb0136d5f465f84b041a4677b1023cfd6bee9956","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif":"d41ead1d69d33d0cf5f6fe575beb5f60d9565300c535f9042113dd8a748c1d31","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif":"f205cf2c05265b84e45ceb723e9a3707fd8749130166d4797e64c8c62b497f8c","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif":"ad2244cb7b2ac487a5104d6e5a07270f9ceb2550e4d56d3662fcc1868910ced5","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif":"7ef9468effdc970e4e6e8cc7533d66dc967686e357dda3dda186c021f9e6156b","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif":"3dd34d854ff83b6e27a2bf98301380a6cac272084ed863735285ab5dc8acda00","link-u-avif-sample-images/plum-blossom.svg":"be1f03dd05f63292c85a96b1c48fb06727283610cc69b1e116d547bab27b171d","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-10bpc.avif":"5842951d81118d256962384e08a986816e8ade6b05530269f0208c6b69cedb3b","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-12bpc.avif":"1f0c9f36d69b9aa13eff3897ada3e78b81099c613b329a402c27e09453e7e261","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-8bpc.avif":"3e6f2f4016e66e3c94707eaa8373e6f582321e005964cd35b64bc183e1bf10ea","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-lossy.avif":"79483242f2dca12c4ec18bd33ff8099216b3094fb55a26a909f046b2f9b4ce58","link-u-avif-sample-images/red-at-12-oclock-with-color-profile.jpg":"d56f809ea5eda74578af57e2f80b41856a1fe2ff436c741aa58757387af998bd","link-u-avif-sample-images/red-at-12-oclock-with-color-profile.png":"4eab95e358eb48e052c7b8c94d30a8c6cb1c9c3c2dfd9845240281dd5dd7b800","link-u-avif-sample-images/scripts/compare.sh":"0562689bcd40e9fc1322bf037d6f999aa4406a2229f19e74b96cc450e370e429","link-u-avif-sample-images/star-10bpc-with-alpha.avifs":"5643ac1f235ae6599186dd66c66507db6fa46a17b2b18e82ea9344870eb98a9b","link-u-avif-sample-images/star-10bpc.avifs":"c61d899a59dbd8c7b2f7bcfca9069a0e13ff1606899af227938a28502e6cbf88","link-u-avif-sample-images/star-12bpc-with-alpha.avifs":"88a350c3550ce36c1777fe7eb1e906c6829d3ed8b241aa1e0e46f1a4e2567c4b","link-u-avif-sample-images/star-12bpc.avifs":"c1a59db6f180208a3177d77c7f9ab08290e903c7bdaf929331b807a510f8c619","link-u-avif-sample-images/star-8bpc-with-alpha.avifs":"13a12908cb162a855cccc9221a5f9f736e8ea07902ffbdcf007f8fde5ed255f2","link-u-avif-sample-images/star-8bpc.avifs":"ae35b161de67a5afeb195ee401f369c34990f0ff8662f70ab4065bc6931f0a66","link-u-avif-sample-images/star.gif":"389cdd02efbdce4f0205cae6e91c1f64e34fa0ca1fe02351da1b37e16cbb642a","link-u-avif-sample-images/star.input.txt":"970163b942843618616f42233abe91d40fb68f6f5451860db259551711867b55","link-u-avif-sample-images/star.png":"18569167cf7ebd265ab6973d071d259aacfbb46c0408b7d4874c8cc9df9bb1ad","link-u-avif-sample-images/star.svg":"13089d0986b31b87919029fa69f2b68981af4023306bf0f79922f6772396008a","link-u-avif-sample-images/star180.png":"21bc11be2b51334fe4589634507612e7edce96d36e6a99219d029e440164e8b8","link-u-avif-sample-images/star270.png":"5c93f538dcdc70840b9925b4089083acc9c25e95265b3f3dea18d695451b441e","link-u-avif-sample-images/star90.png":"2defc5d21e70447653fec5dc14a697d9dd555d7a0c14e79cb2d9f80796a51a6d","src/boxes.rs":"270a3e3bf90279bfc83f95acadaba9611c25243280bca71dfa9c044d5441cf15","src/lib.rs":"73114a5c28472e77082ad259113ffafb418ed602c1741f26da3e10278b0bf93e","src/macros.rs":"76c840f9299797527fe71aa5b378ffb01312767372b45cc62deddb19775400ae","src/tests.rs":"75fe5467109242b2cc7991f8228e2e2ad1de5be2f29272a4a7f08c4e21ab5fa4","src/unstable.rs":"c2cef9a3b2b08a4da66fa0305fce7a117bd99c9b8d57b0a044e1d99dbda6faf5","tests/1x1-black-alpha-50pct-premultiplied.avif":"31a8c235bf2cf601a593a7bc33f7f2779f2d5b2e0cd145897b931fce94b0c0b8","tests/a1lx.avif":"81a784c568e7619bd47c4e7153181e9a86c8a03221097aa63979f97affd7efbb","tests/a1op.avif":"184e50efd3ad226800c610da7bc470d29b548d9fa942fd1fd1848ed02e2e5f0a","tests/alpha_video_avif_major_avis_compatible.avif":"81771981248c4e0d708f0828eadb20e9e37e7c21280efe5726666958f899c237","tests/alpha_video_fixed.avif":"67051d1a4ccf9f3e38d4514d8a6b3a2e07f1beb979369cabdc60881a698a36ac","tests/alpha_video_no_avis.avif":"a95f0e7c818bc5bf646143cf43474b70722e17669d4f2a32874c125936207d6a","tests/amr_nb_1f.3gp":"d1423e3414ad06b69f8b58d5c916ec353ba2d0402d99dec9f1c88acc33b6a127","tests/amr_wb_1f.3gp":"be635b24097e8757b0c04d70ab28e00417ca113e86108b6c269b79b64b89bcd5","tests/av1C-missing-essential.avif":"a1501254c4071847b2269fe40b81409c389ff14e91cf7c0005a47e6ea97a6803","tests/bad-ipma-flags.avif":"ecde7997b97db1910b9dcc7ca8e3c8957da0e83681ea9008c66dc9f12b78ad19","tests/bad-ipma-version.avif":"7f9a1a0b4ebbf8d800d22eaae5ff78970cc6b811317db6c1467c6883952b7c9b","tests/bbb_sunflower_QCIF_30fps_h263_noaudio_1f.3gp":"03e5b1264d0a188d77b9e676ba3ce23a801b17aaa11c0343dfd851d6ea4e3a40","tests/clap-basic-1_3x3-to-1x1.avif":"83af9c8196fa93b2475163585a23d0eb5a8f8015d0db8da7a5d6de61adfb1876","tests/clap-missing-essential.avif":"4d61aacd2327661a456abc76d3d490e5ddd2b6f8cbfa52922a6c541c9d983193","tests/clusterfuzz-testcase-minimized-mp4-6093954524250112":"af7044a470732d4e7e34ac7ab5ff038c58b66f09702cbcd774931d7766bbfd35","tests/corrupt/a1lx-marked-essential.avif":"0d481240222450827ea335ae9a1a300777a0db4f9b0f4c17ed77c758c5133fa3","tests/corrupt/a1op-missing-essential.avif":"33c24d54f43f1a7be7a8334718881c8a0de24730c997c7842b9d7140e75017ea","tests/corrupt/alpha_video_moov_is_moop.avif":"89e0091edd6efc2c5b163525553c5abc56263fe1b3b885184bb07b9ea4bf346d","tests/corrupt/bug-1655846.avif":"e0a5a06225800fadf05f5352503a4cec11af73eef705c43b4acab5f4a99dea50","tests/corrupt/bug-1661347.avif":"31c26561e1d9eafb60f7c5968b82a0859d203d73f17f26b29276256acee12966","tests/corrupt/clusterfuzz-testcase-minimized-avif-4914209301856256.avif":"34a142c7916e314881f3fb6394add1c543fac0e5b45109e3a425eeb4c68998d0","tests/corrupt/hdlr-not-first.avif":"2c29308af077209b9c984921b7e36f8fb7ca7cf379cf8eba4c7a91f65bc7a304","tests/corrupt/hdlr-not-pict.avif":"9fe37619606645a95725300a9e34fada9190d1e0b3919881db84353941ca9291","tests/corrupt/imir-before-clap.avif":"22d6b5dacf0ef0be59053beba7564b08037fed859ada2885e3476e0ff0d19c95","tests/corrupt/invalid-avif-colr-multiple-nclx.avif":"7990a995855120dc4f724a6098816595becc35077fcd9e0de8c68300b49c4f1f","tests/corrupt/invalid-avif-colr-multiple-prof.avif":"b077a6b58e3a13ad743ee3f19fbae53b521eab8727606e0dba9bf06384f3121c","tests/corrupt/invalid-avif-colr-multiple-rICC.avif":"88b24d4d588744b9f2cdc03944f28283e9315eb3de7d7d57773a0541137f6529","tests/corrupt/invalid-avif-colr-multiple.zip":"9abddcbc47fde6da20263a29b770c6a9e76c8ab8dc785ef8512f35d9cb3206ed","tests/corrupt/ipma-duplicate-item_id.avif":"ca8c5275b0b8b79c1068489a52d0a5c8f0b4453463971e72b694189f11c10745","tests/corrupt/ipma-duplicate-version-and-flags.avif":"cf8e15ec4b210235f3d68332a1adeb64e35c41b8d8e1e7586ae38b6d9cd8926c","tests/corrupt/ipma-invalid-property-index.avif":"2480e773fa716d22883032d05fd4cf2c6b00fba8796cf4ff286a5d1ba26adff6","tests/corrupt/lsel-missing-essential.avif":"43c3b1e4c4acecd7559a9a7197a7befd43c71705748f0f8c063bca3be1c6d074","tests/corrupt/no-alpha-av1C.avif":"ad3d34d6331db7d9bea0c5f37efb88923520e33e08e7c636a5df435a4575eae7","tests/corrupt/no-av1C.avif":"eeb4fc50930c91465999f787c4a2a3b12de20556da0857be72da5a1a9eaa3f01","tests/corrupt/no-ftyp.avif":"74b431f32b2e2761e77df7fdb260f623b4e8f7e3f4c8af8a42d6826911706d7b","tests/corrupt/no-hdlr.avif":"91a1eb70c7b6adf2104e471d7deeeb98084a591d64ce09ba106c27edfbc3a409","tests/corrupt/no-ispe.avif":"4b6edfd8c9b40c25dc40305a6057e32b5e65f40da4a9d810c58dbff53254113f","tests/corrupt/no-pitm.avif":"7960eeb9e6e5140fbe5eb6d281e6974efd6c3c0147562f3dcf06f6b009dc540a","tests/corrupt/no-pixi-for-alpha.avif":"f8adc3573c79ee25bf6d4dd2693c61661469b28f86a5c7b1d9e41b0e8d2d53bb","tests/corrupt/no-pixi.avif":"4b1776def440dc8b913c170e4479772ee6bbb299b8679f7c564704bd03c9597e","tests/hdlr-nonzero-reserved.avif":"b872dcd7b4f49c6808d6da109cf4fedc26a237c42e8529c5aa8f7130abaf40a9","tests/imir-missing-essential.avif":"b1226e4b1358528befbd3f1126b5caf0c5051b4354777b87e71f6001f3829f87","tests/invalid-avif-hdlr-name-multiple-nul.avif":"0d3e4a6ce42154ee288c18339c2b59ff2104fd890cd2d616e5dbf26375a90e98","tests/irot-missing-essential.avif":"b7da1fc1d1b45bb1b7ca3494476e052f711d794a6d010df6870872ed8b9da10e","tests/lsel.avif":"ef8ba6827709f48cd45f749efb580129162d9599ea98f3363d2140957502d806","tests/multiple-extents.avif":"b5549ac68793e155a726d754e565cea0da03fa17833d3545f45c79e13f4c9360","tests/no-mif1.avif":"1442aa6ffaeb9512724287768bfd1850d3aa29a651ef05abb33e5dec2b3ee5c2","tests/overflow.rs":"16b591d8def1a155b3b997622f6ea255536870d99c3d8f97c51755b77a50de3c","tests/public.rs":"8918d5190a36c697445aa4b140a31cd3032582f1e504b4c2527f75a2155f80ae","tests/valid-alpha.avif":"9d417a35b9b62ad3ff66ffbc55f16552aacf821a092aa5ef4adff7e746bd4c2f","tests/valid-avif-colr-nclx-and-prof-and-rICC.avif":"ab6f5e786d26f8bcade5993f8b9cca3cd004a3d7fcec76e829f5d0f98cb18e7b","tests/valid-avif-colr-nclx-and-prof.avif":"0e982818de61869fcb85a2a4c2b7b8aeecb3053cbfdc6276987f91204998eefb","tests/valid-avif-colr-nclx-and-rICC.avif":"8530ef1305ff956a0c2912d0b3d1e0fc3a68cf3103e70b04cc2574530389b030","tests/valid-avif-colr-nclx.avif":"345ab58b7b1cb48aba2e21eb8dc5ab0a751a78a752ce1896c59b4bf361992f38","tests/valid-avif-colr-prof-and-rICC.avif":"1f0f085141106885bda78b0879c768818420d8196b39440a36578456a7d50a6c","tests/valid-avif-colr-prof.avif":"5d7aaefb5204ebe1cc296456866b8e46e023748b921a38ee56fd6c776a9733ff","tests/valid-avif-colr-rICC.avif":"e1c7b49bfad5904b484bd5118e6b33b78e2dc708a31a10fcbb0e4a373ed8dbb7","tests/valid.avif":"f0b33e09bf01232e0877df325f47986c0bee7764f2a81c9c908ae109e7dc63c4"},"package":null} \ No newline at end of file +{"files":{"Cargo.toml":"44d439e9f1564a6edd3aefa181fd218701fbf42ae12afe8428320c1700260923","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"86cb40854b93f988e3a63ce6fe39d2ce95367f8ca301a5ba50676ff98a0ad791","benches/avif_benchmark.rs":"17105ee0ec4ff0e3eec90699252939101edd5323514ceb404f367e67ef16cf95","link-u-avif-sample-images/.github/workflows/encode-and-decode-daily.yml":"ddf6cc5ceb39796f29a4f1a5e8ed0f346f860501a75585d65ff1e55dadb49eb3","link-u-avif-sample-images/.gitignore":"49a848a0328071e168b24fec43f09ae21663ad78d9be4d54eba9e5c53b3824d3","link-u-avif-sample-images/LICENSE.txt":"670e1c60f680d6bdbf512e35ae3034650328102eb37f67c666f86206ab93b0e8","link-u-avif-sample-images/Makefile":"ad8a0c46fd5ce4d4d8bc83370834974a7b10da2e1f57bed3af00c101da90cda2","link-u-avif-sample-images/README.md":"83128989413b87012a2602ab04bec62fd450c8039f39d650d1a6517bb9778a5e","link-u-avif-sample-images/fox.jpg":"927997a90ae88ead007283bf9c1392159d0acd2e9890522146211fda2112a2d9","link-u-avif-sample-images/fox.odd-height.png":"6136247772bd1c0edd50426bca4f3485473ac25a784e5ec8777f7491598e96db","link-u-avif-sample-images/fox.odd-width.odd-height.png":"6f91dc21c137f318d0443ce28bbf3f74d5502180c254327b46e41040a33f1363","link-u-avif-sample-images/fox.odd-width.png":"a8b2328c8700c16280c5ab40a34147edac598d4d48ca101bef649e468ae1492e","link-u-avif-sample-images/fox.png":"c45bfb5780843c70a37426340020e3e7ff41d7cf1df9fec614a5cf429d078573","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.avif":"811af5e96631309030a14cbc30c3bacfaa667f2e36e16a4f30434b8f5a23310c","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.avif":"e35713343e9ee04c51ab9cfdc99a0c7d126a1917cb83f5b9a23c71ed59269be2","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.odd-height.avif":"485623f7838d8f442c47348c6492765e6aafbc3d5ccd8e90efc9c812ff15e265","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.odd-width.avif":"8e75b9a8975267359d827e4cbc6877b1674aa31b87f88f222dde03263f9254df","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif":"1fff5915a332d6aaa85d668f3f338bda6fad9c6ec1f380f2c46737d536cea5de","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.odd-height.avif":"cca9785f14c74d865453518c0962dabd6d1b92d2c6c5f5ac67efdbf5606acb83","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.odd-width.avif":"de3399d8b56431f0ed34e2f14200f31dd54544fddbb12f39b4d55449d5660c56","link-u-avif-sample-images/fox.profile0.10bpc.yuv420.odd-width.odd-height.avif":"07507744cb76b74a3586b93fc3b273a98f998d75f7687db3e9cb3725d7b1fb9d","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.avif":"cb884c82ac7b6d4fa03b1f687e9e20abc346107095473e9c1d422aaf0de14eaf","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.avif":"15d84077066c47fdbe2a7b8ed583a17017d09a033144ac1b31486d6c8f6f5c82","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.odd-height.avif":"365439d2ee2fe5229e066362c03a73a182c7f6626772ecf5345b22752d32e681","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.odd-width.avif":"c623b9943123d6c47d3300444f7255cbdfebfe2b47a670287f2baeb717fac42b","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif":"dd069f3c3c4f7589f5f7ef1d7b6a91b8cb975d32663a4a92b6d75219edd72954","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.odd-height.avif":"75628450288ace3386651725411c8f0ffff7eb95f82c5307b0faa3350f09f50e","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.odd-width.avif":"f91b6f455412adabc5094011362eaaa1f6a9d5740de0b8a1be42a96c16e7617f","link-u-avif-sample-images/fox.profile0.8bpc.yuv420.odd-width.odd-height.avif":"bb8695cacacaf8f2e13a739de75e5e8a9d970d68c3acdfb7d82171a9bac2f01e","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.avif":"a10de8204aee73ba1786daca6390546bd7aa6b069aaa644012219a1c11246a43","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.odd-height.avif":"734a5badc59a8bed19e8eb476911048ddb011ca7c9eac31b7a7ed20e0135ac2c","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.odd-width.avif":"68d15d76d95f268e810dfd87bbf96d8c3197580afce2d30b50bb1f07865077f3","link-u-avif-sample-images/fox.profile1.10bpc.yuv444.odd-width.odd-height.avif":"01e469b33bacb7e07e15e23b2997907bbcf02d8fcc99885a027494d31c45547c","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.avif":"a0cdc981a6b056c8af2d177a1438c332d630040dacbfd1c89bb5e3e381ba5822","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.odd-height.avif":"77e0510def73213c00ebcf051cf45fa63cf27d7c69340cc145ab6d44ec77bb07","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.odd-width.avif":"12787042364bd13be01830f988cb714220bde340a3329baa808df27a269b83f8","link-u-avif-sample-images/fox.profile1.8bpc.yuv444.odd-width.odd-height.avif":"fad3b6dd9cb99e6925858f69aafae3f68c861845f2c3d4a6d1c51c6161490134","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.avif":"e34f3bab5df802be2d422c685824464eb5f7e182b235ca99bde11c4c34ff3ac2","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.avif":"05804752621e2fd7a9d85b01e2995a50e3efd30693efd934152560622d66e841","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.odd-height.avif":"ef041f2efa0424d3a6dcfc5f0c3f619aea0e197aaeb5a050a2d877a457513921","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.odd-width.avif":"b711b321b8a4d3a41e08f80a17c2203b839458cb6346aff6fff3f8d7699032e6","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif":"e3f40aad0ddd6c04ffacf4a754a0525986c89d519119d37655282551e3ea3a59","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.odd-height.avif":"4ef74c37712b41d6e5269d939f9d52031bc10746f7c8c029db618c5935aff9a6","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.odd-width.avif":"4cf6c849f4a48a639217ad9a1e0d027f4fc804d524c03e6707ec9714a252532f","link-u-avif-sample-images/fox.profile2.10bpc.yuv422.odd-width.odd-height.avif":"3d3978e8e8d07270f82a877d3535f9483b88fce93a1c4accb658b494452b1d36","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.avif":"626d73272e59722084c528b27b72a0920bec462a10749b3e87036e42bf8a24e5","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.avif":"caf50c467242b3fa0b895a2af131fa0d03dd7b34989f2b1a51d25b2246c98fab","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.odd-height.avif":"1e88b92df592c02af53ff5258fa898ac8fe1d71954e9a440500ef7879b8a1c46","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.odd-width.avif":"466efdd269f3be3b1c88afc093c839e50ba5eaf6bd0c2425e157000d02a3c21a","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif":"36014509d0688cb307e0ffcdb5b4c16ff6e6c79772c7fbbeea33b4d483a1566f","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.odd-height.avif":"d1786723a5d6ea1e1764b0045dc3f669fe3905ffc2913011a2b1b424d2393397","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.odd-width.avif":"a2d9178cc5622e28472a735650d9c4deaec6d27d69830110911f4158f9d4a04e","link-u-avif-sample-images/fox.profile2.12bpc.yuv420.odd-width.odd-height.avif":"89a9fc7598d72251b903e0c7088ab3e7a7f316b5e02b85f8c69e51f8eb0c7e69","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.avif":"51476b8471e1c0a5ebbd1e7545709495bef619cc96c02d277aad32b1deff8ea9","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.avif":"caf50c467242b3fa0b895a2af131fa0d03dd7b34989f2b1a51d25b2246c98fab","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.odd-height.avif":"1e88b92df592c02af53ff5258fa898ac8fe1d71954e9a440500ef7879b8a1c46","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.odd-width.avif":"466efdd269f3be3b1c88afc093c839e50ba5eaf6bd0c2425e157000d02a3c21a","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif":"36014509d0688cb307e0ffcdb5b4c16ff6e6c79772c7fbbeea33b4d483a1566f","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.odd-height.avif":"4808960cdcd1207b29eb6ef5b4db81ae5e63c5d40ef92f7a1e8f4430e765bde4","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.odd-width.avif":"71f3c73737bc04c23d93ea2c61a8a07408f604192fe53fe12c65050927dacb4e","link-u-avif-sample-images/fox.profile2.12bpc.yuv422.odd-width.odd-height.avif":"8f9649384fa09c70af0c2e9e0d94ecd17492c702e015d9d6290d3aefc57c548c","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.avif":"ed96eca6ed79863eaf91e4d666e4e220b5fa4e5a6cb1696477ba901ac12f5dde","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.avif":"caf50c467242b3fa0b895a2af131fa0d03dd7b34989f2b1a51d25b2246c98fab","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.odd-height.avif":"1e88b92df592c02af53ff5258fa898ac8fe1d71954e9a440500ef7879b8a1c46","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.odd-width.avif":"466efdd269f3be3b1c88afc093c839e50ba5eaf6bd0c2425e157000d02a3c21a","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif":"36014509d0688cb307e0ffcdb5b4c16ff6e6c79772c7fbbeea33b4d483a1566f","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.odd-height.avif":"c43b4c607e301e34eb953770133d89d15e77d63be8d6421a80d6212fbbbf3453","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.odd-width.avif":"0e6218ce250ee7f84a621f3af73286fd4dabea19e9898d3575c20c5955aa427d","link-u-avif-sample-images/fox.profile2.12bpc.yuv444.odd-width.odd-height.avif":"9f19846d884ac7d161ac2ca15811bb22ff7f3847bc1ad5d7713971ea024631aa","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.avif":"2cb363d30f83bff58ee049874b1808b37cb1d35342edf16b3ce25cb243c9ea55","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.avif":"8217b88f350c5d3812d7f863fe9d710c4c1b846b0be8df29ce6b3eb30d2b8d8f","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.odd-height.avif":"51eccd8c1368ddec9bc1f3a7631dadb00682e985fbfea66c0a2f533f6a73b67e","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.odd-width.avif":"83fe4593ab839cf296a2ccb8a146daf826d1d602f4f239cb63ee020f2cc326f6","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif":"4e63b84a980a81adde586314a94d8f834ec763749d8797c286471415b6b75647","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.odd-height.avif":"efc70882aacbb533c0e833a4401949d152dceb364846442cdccca5048ad17a60","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.odd-width.avif":"c07575c88ef400c1725c9260a19439e0e784da41c7db3867059019ddbdb3bebe","link-u-avif-sample-images/fox.profile2.8bpc.yuv422.odd-width.odd-height.avif":"86aee64fd7b11b9834537ea14b2eff234c062c98d32fab51ff14aba262d5b106","link-u-avif-sample-images/hato.16bpc.png":"53b550c587cd1d19a1997184e47f4a3ff2a05cedf7cb4e42a9466a6d6cb60d8d","link-u-avif-sample-images/hato.jpg":"6d4804e5e4adf36a6b138544c81b743ed7abdd9a495a43e883ec77689ca28943","link-u-avif-sample-images/hato.png":"313880f4cc51160fec522d78f1fb7f06df70fe1929a731fc86c68ecefd312277","link-u-avif-sample-images/hato.profile0.10bpc.yuv420.avif":"1e84598c94bc795c55a551bdf6f283b4eed4997bda15e5c4bb2e29d0dc70897b","link-u-avif-sample-images/hato.profile0.10bpc.yuv420.monochrome.avif":"25c19a187d10eac963bb51b3fae1ffe50f3ccbc7ad02e51948dc7467b397ce61","link-u-avif-sample-images/hato.profile0.8bpc.yuv420.avif":"07cd454de19dd638354f75d9e97aab08bc8a04dd45c4f7531cb62a1a5656c8c9","link-u-avif-sample-images/hato.profile0.8bpc.yuv420.monochrome.avif":"120a3f26f3d6cde80869fb52bdb8fdd55b443882c98070ea938575e4790982ff","link-u-avif-sample-images/hato.profile2.10bpc.yuv422.avif":"d54251d4bc023f2e53624a46cb18e56cbc45768bd1bd50394de191c2a42106e8","link-u-avif-sample-images/hato.profile2.10bpc.yuv422.monochrome.avif":"ed33dfdb5e663b3394298b6921f9b19b129e14788dead776430eee2f14780a73","link-u-avif-sample-images/hato.profile2.12bpc.yuv422.avif":"ad361ac7d94fbc6af7ef30cbd3601ff366bc360c304480387a58a4c6fecee9b6","link-u-avif-sample-images/hato.profile2.12bpc.yuv422.monochrome.avif":"e28b4cacda95750e465e205fbfcba6a6af1d8418dac649838730c555ff7d828f","link-u-avif-sample-images/hato.profile2.8bpc.yuv422.avif":"69c353c482c2eb3d3671bb55f7ccfc932e4d781c714a72116e9138ffc6f6c720","link-u-avif-sample-images/hato.profile2.8bpc.yuv422.monochrome.avif":"e7d6f7d42a8519e1482f225fe447b5642d19a54ee830529223eac114a0dec189","link-u-avif-sample-images/images.html":"d2a5157987ebc8b1264da41e079fa370602bf322bd73fbede534f96ba22f37ff","link-u-avif-sample-images/kimono.avif":"63412e0f67f37c8b6fcf0e8269a2afae0a017fa6a3a99d37d055c590b0be52d3","link-u-avif-sample-images/kimono.crop.avif":"f175dcd9c64813b759da185fa67076fb772b76059845b2aad3ddcfab257f75ad","link-u-avif-sample-images/kimono.crop.png":"0d5605bae0ec9d39aad9dc8e1a371d0327c6a224643983e3ee1f4d44cb00f19d","link-u-avif-sample-images/kimono.jpg":"a6ad58e3cea437ee0c841115ba67ae7354de7af734de50de9d0853dd4e571577","link-u-avif-sample-images/kimono.mirror-horizontal.avif":"2bbc004d91145488610158a5acdb4d706495a2b15511db20ff57bb9efd80885c","link-u-avif-sample-images/kimono.mirror-horizontal.png":"9af9e839fe6bf6342831970c20291f619570d2fc687951ae00cd81ea766f53fe","link-u-avif-sample-images/kimono.mirror-vertical.avif":"f10eb04791fcca3409868b367128649f32e6b6fffcf02484cdefa57909f6bb74","link-u-avif-sample-images/kimono.mirror-vertical.png":"4ed003c5868fd2e78c7b2dcbd54a67a0e7593dabb3ac82b1c9e5e2dbdf09b8ec","link-u-avif-sample-images/kimono.mirror-vertical.rotate270.avif":"33c36ec2274b00ac6f81c9f61e55c20cbfce1649ad27520afe635310f516ead1","link-u-avif-sample-images/kimono.mirror-vertical.rotate270.crop.avif":"90ca48f657455b8f8e4a4e1769a05af90a3e34dca11a8b3c32552daf378ee956","link-u-avif-sample-images/kimono.mirror-vertical.rotate270.png":"74b9b7ffa8955761f747a0e6e81d5b7ecb5e325383546110e1b6aa9986728035","link-u-avif-sample-images/kimono.png":"84fd6cfb97a27739608e21779f874b4ae7e80342b2588e8b0b092dee2d57c881","link-u-avif-sample-images/kimono.rotate270.avif":"79a99a0415276cc11f2e871d070a9df84df3385888a2f2fa3534320f6bed98ed","link-u-avif-sample-images/kimono.rotate270.png":"1918a47c02b378945a705301abd4250ddc65bb95afce9424572ffd0fdd1f45ef","link-u-avif-sample-images/kimono.rotate90.avif":"bd1157d8c840713c82b907b9d3ae80bc3817849e11c323d875f8016e035bd3cc","link-u-avif-sample-images/kimono.rotate90.png":"1a73c61692abe96d0a7a9accdb36a83d51bceac79bbb83a00571570f494cca49","link-u-avif-sample-images/plum-blossom-large.png":"af6ea005b726ca39f342e946aa53bed88e5a140413ce896d166bb35ab0aa3b4f","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif":"cf8e15ec4b210235f3d68332a1adeb64e35c41b8d8e1e7586ae38b6d9cd8926c","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif":"b413440309d5669a7aefa06f291f72de0d0c09972e3da9a385e6016d6a1c5562","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif":"64f6f2b1fda594af5c9e2d6e4bc752b55e8121000cdcedc0066018e53f76de40","link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif":"2b175a600aed64c1c1de4b2d661fb405437b1ff000b964d4be6ac437ce73136f","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif":"21ebb3732186bf7c6c13cf7197155b64201e674b9c79cf613b6e5718bde14c2a","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif":"65917797e511c9033b3e225eb5d84f3c0440b7a496d4b8ab5674e123ad68aab7","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif":"f4809df9188fa46ed100f63c78c4cf42559d90a98351a8f69e177385920672b4","link-u-avif-sample-images/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif":"dffc213dc36f0b5ff3d86254f5185c2d1fb03380918a8fa39d186fb59cbba7cc","link-u-avif-sample-images/plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif":"0a615cfb673ab45e37da3582c17dd36f86d5da3d81246a32951d1db4ed90149d","link-u-avif-sample-images/plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif":"d1cc6a0db116a68e229676b289e8ced84d42a9f0e8d3ccd760fc92dbeb932547","link-u-avif-sample-images/plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif":"8626cf0b2c60fee51cf1df7fe4d8a18081b72e3604f7d3ff14cc5a35581927d9","link-u-avif-sample-images/plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif":"56bf18e4bcbfbea460c306ab900fc506169854d2b91690e1a48156a86fff3264","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif":"b56f3c33797e4c5bb80418ae25f6f2c6fc88ddc1f6965d82abc44059f052f36c","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif":"c3c6db4ce801c68e2afd7bfb72abacc13287cc2e247917a817ff5632bd4b18fb","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif":"095f57fff1dc037a6414c60263415dcfa86b10d81f58e8e4c3aef17cffae0e5f","link-u-avif-sample-images/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif":"ba3035a69296d12f47d1c450f2de8cc0c9059ebbf27bb8b0996ff6d1ab1132a1","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif":"a9551e1963049b874216b40aaf9be45bc44dc11887770712b77240862c6c08a9","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif":"a8a0ba881cd0aef45a5874f412e97812ca457eaf12e56b34bac2ba051e142828","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif":"6891b5bdbed7f541c673c66cec4584b191bb737a49b37cca16ae069830890b42","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif":"67e66826637e349e1c3c46316c7048d152aed8453d8cdd00c6b786f87fe176d8","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif":"a466503110f60dcadaafe78c2cb0a8ca58334c22868efe428c7ac12b69407c95","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif":"a8a0ba881cd0aef45a5874f412e97812ca457eaf12e56b34bac2ba051e142828","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif":"061b4c70707e7fc8866580656cca7ca2da2263645829a564dbf8f205d639f058","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif":"67e66826637e349e1c3c46316c7048d152aed8453d8cdd00c6b786f87fe176d8","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif":"4a03c8bcfcaadccdeb07432ed80680b06aba5ae5e616fc370b376acb478f6cd1","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif":"a8a0ba881cd0aef45a5874f412e97812ca457eaf12e56b34bac2ba051e142828","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif":"376625ce4e7ec3b57344a9f2185a34975fe380774c9f8e0dd4ef61c46da94fca","link-u-avif-sample-images/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif":"67e66826637e349e1c3c46316c7048d152aed8453d8cdd00c6b786f87fe176d8","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif":"1e17b7dd8e351cb667bc6ec0b81fdebca9fd30ad5e588b3eac57bf9f90a9b58b","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif":"f77588d2ff39e4461869a95ca236efdf4a3fdc17b8a6e3907e63b417e56c81b5","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif":"f2eabd3fc2db07b361d55b5af63023d28b5bdd0047a665e9d0685651ce9db94b","link-u-avif-sample-images/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif":"dd88c377b253d689bfd4600d7c3007448df0ed92f679b661d5d51e051a6916d8","link-u-avif-sample-images/plum-blossom-small.png":"c859fd97b647e494461f65835b9c1c3476807aee77076599adf18a832b3617a4","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif":"fe3379620f983e5da4210b0f7c5d164e86208b34106d6b11d56e2b52beee5dfe","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif":"9e6234686053dba2e44bb32192c641074095a61e45aa1bede85bb83751e6e157","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif":"60ffa59dd007aea3bb596cfb03853b3dad490b1ffd10471ad4fe1901ec819907","link-u-avif-sample-images/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif":"58abfa027525aca7339a705f311bc30b000aef9822c7c50b232894ece1ba9cb1","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif":"541ca66a11b1430d11f77b74a13f859239a3bd9f44976b8dfe163c5d7595a69f","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif":"6d7852c63c27a77bef94443e178ecf6b6a3da8cc846f9f0c1adc17f7fc35e1f3","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif":"3712216ffc7edb95a976b68469ead533fda6fe9f3d2e8cb09cbdb0d01d9c094b","link-u-avif-sample-images/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif":"59672af536b169ebf7e48129167dc91cb253925517c37db28b64539f7afba5d3","link-u-avif-sample-images/plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif":"561d5158425ad39425916a3be048b0202e82efef44cf1a9f711db57192d2ff01","link-u-avif-sample-images/plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif":"88336f29457c1dc4ae0b754ef14b791de4d8c337f2b44d7960aafcca08a5586e","link-u-avif-sample-images/plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif":"245a3dad6371dc702f29eb7e9735f843b63c525da871859728bedbe5bb274985","link-u-avif-sample-images/plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif":"490c216b5850c670f6088ee72c7fd906102b2dd0c8432c01a517b3328db27c75","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif":"0d0bbbcb0c9ade1c827317a6409ce6ba25027b36da1b6752379a5f5d4c8af056","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif":"418a9d4b7dcbc1f67fc4b95ccb2e7946c446fddd35a79f0d587b3f2165cb3f14","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif":"a41dcfabb3795ed93a05881a91bf4d1c5d1b9b0e5d0db728f12684b12613e0c9","link-u-avif-sample-images/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif":"4b6a18f4f608d1b00598e67c1c91a4e8f4943ae5acf0166ae0121cc21f3b7437","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif":"5e6b83adee3aeac4bba3f38e854e2ed7585aa1557a74b5fa66596098c53e26f2","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif":"fb0937564c08f4e1c22ebbde426a0eff6a1d388434c30148bc7e5582dc378caa","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif":"f42e780bff644167e27525fee65b23e70814f7665ea19b6d693eb127c5eeebd8","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif":"d41ead1d69d33d0cf5f6fe575beb5f60d9565300c535f9042113dd8a748c1d31","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif":"c6ee9234ee7783d0203f9512e3cc8fe76a694675bcf03c320ff8bab4684bd4e9","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif":"fb0937564c08f4e1c22ebbde426a0eff6a1d388434c30148bc7e5582dc378caa","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif":"21e1e51fc6da66e090e12e1df5aeabf1f478df64bcb8151caaa687ad262bdd9d","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif":"d41ead1d69d33d0cf5f6fe575beb5f60d9565300c535f9042113dd8a748c1d31","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif":"dfed73d646d7159d3ee4f9ce95ea628fdd33bf8bf1bb02a83d88302d088f4d97","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif":"fb0937564c08f4e1c22ebbde426a0eff6a1d388434c30148bc7e5582dc378caa","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif":"5539cd575256772ba31d6e87cb0136d5f465f84b041a4677b1023cfd6bee9956","link-u-avif-sample-images/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif":"d41ead1d69d33d0cf5f6fe575beb5f60d9565300c535f9042113dd8a748c1d31","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif":"f205cf2c05265b84e45ceb723e9a3707fd8749130166d4797e64c8c62b497f8c","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif":"ad2244cb7b2ac487a5104d6e5a07270f9ceb2550e4d56d3662fcc1868910ced5","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif":"7ef9468effdc970e4e6e8cc7533d66dc967686e357dda3dda186c021f9e6156b","link-u-avif-sample-images/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif":"3dd34d854ff83b6e27a2bf98301380a6cac272084ed863735285ab5dc8acda00","link-u-avif-sample-images/plum-blossom.svg":"ea0c6cf04c0296a4ffa77f503e382a408e6764b9f384e5a319681e46b5733edc","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-10bpc.avif":"5842951d81118d256962384e08a986816e8ade6b05530269f0208c6b69cedb3b","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-12bpc.avif":"1f0c9f36d69b9aa13eff3897ada3e78b81099c613b329a402c27e09453e7e261","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-8bpc.avif":"3e6f2f4016e66e3c94707eaa8373e6f582321e005964cd35b64bc183e1bf10ea","link-u-avif-sample-images/red-at-12-oclock-with-color-profile-lossy.avif":"79483242f2dca12c4ec18bd33ff8099216b3094fb55a26a909f046b2f9b4ce58","link-u-avif-sample-images/red-at-12-oclock-with-color-profile.jpg":"d56f809ea5eda74578af57e2f80b41856a1fe2ff436c741aa58757387af998bd","link-u-avif-sample-images/red-at-12-oclock-with-color-profile.png":"4eab95e358eb48e052c7b8c94d30a8c6cb1c9c3c2dfd9845240281dd5dd7b800","link-u-avif-sample-images/scripts/compare.sh":"9268318aa2fc3cdc153bab6d8cdb9adc41e07497a7a4ca14b58afbd166b9dbae","link-u-avif-sample-images/star-10bpc-with-alpha.avifs":"5643ac1f235ae6599186dd66c66507db6fa46a17b2b18e82ea9344870eb98a9b","link-u-avif-sample-images/star-10bpc.avifs":"c61d899a59dbd8c7b2f7bcfca9069a0e13ff1606899af227938a28502e6cbf88","link-u-avif-sample-images/star-12bpc-with-alpha.avifs":"88a350c3550ce36c1777fe7eb1e906c6829d3ed8b241aa1e0e46f1a4e2567c4b","link-u-avif-sample-images/star-12bpc.avifs":"c1a59db6f180208a3177d77c7f9ab08290e903c7bdaf929331b807a510f8c619","link-u-avif-sample-images/star-8bpc-with-alpha.avifs":"13a12908cb162a855cccc9221a5f9f736e8ea07902ffbdcf007f8fde5ed255f2","link-u-avif-sample-images/star-8bpc.avifs":"ae35b161de67a5afeb195ee401f369c34990f0ff8662f70ab4065bc6931f0a66","link-u-avif-sample-images/star.gif":"389cdd02efbdce4f0205cae6e91c1f64e34fa0ca1fe02351da1b37e16cbb642a","link-u-avif-sample-images/star.input.txt":"8d8e1500645970bbc48d7f886d76faf0d573ae598dfb1ca8c1d5245a2318ccc8","link-u-avif-sample-images/star.png":"18569167cf7ebd265ab6973d071d259aacfbb46c0408b7d4874c8cc9df9bb1ad","link-u-avif-sample-images/star.svg":"62af71f498f0549b19674ba19b830714dd58efcd65c86e9d741fc268afa52dd0","link-u-avif-sample-images/star180.png":"21bc11be2b51334fe4589634507612e7edce96d36e6a99219d029e440164e8b8","link-u-avif-sample-images/star270.png":"5c93f538dcdc70840b9925b4089083acc9c25e95265b3f3dea18d695451b441e","link-u-avif-sample-images/star90.png":"2defc5d21e70447653fec5dc14a697d9dd555d7a0c14e79cb2d9f80796a51a6d","src/boxes.rs":"39e979bd0b08fe6a9f43e092984879fc19185a48284e9ff868e5d47cf8df4363","src/lib.rs":"81453500f4c7a45f09edc55fc5adf403aa502417934162fa669e7caf76eca72a","src/macros.rs":"498bef25c8ea468d8ae0cd89593807d9e9253385cb9456d04f8cb00b721a54cb","src/tests.rs":"9251e246f416e5c440f0b05ccba3bea4ba1510e62073af3faa4dc85998b8e36d","src/unstable.rs":"68338ecd8f797d7a1c554a15bca7b8a9c5a0e6d726360d2bc0d46c43c71b3d8b","tests/1x1-black-alpha-50pct-premultiplied.avif":"31a8c235bf2cf601a593a7bc33f7f2779f2d5b2e0cd145897b931fce94b0c0b8","tests/a1lx.avif":"81a784c568e7619bd47c4e7153181e9a86c8a03221097aa63979f97affd7efbb","tests/a1op.avif":"184e50efd3ad226800c610da7bc470d29b548d9fa942fd1fd1848ed02e2e5f0a","tests/alpha_video_avif_major_avis_compatible.avif":"81771981248c4e0d708f0828eadb20e9e37e7c21280efe5726666958f899c237","tests/alpha_video_fixed.avif":"67051d1a4ccf9f3e38d4514d8a6b3a2e07f1beb979369cabdc60881a698a36ac","tests/alpha_video_no_avis.avif":"a95f0e7c818bc5bf646143cf43474b70722e17669d4f2a32874c125936207d6a","tests/amr_nb_1f.3gp":"d1423e3414ad06b69f8b58d5c916ec353ba2d0402d99dec9f1c88acc33b6a127","tests/amr_wb_1f.3gp":"be635b24097e8757b0c04d70ab28e00417ca113e86108b6c269b79b64b89bcd5","tests/av1C-missing-essential.avif":"a1501254c4071847b2269fe40b81409c389ff14e91cf7c0005a47e6ea97a6803","tests/bad-ipma-flags.avif":"ecde7997b97db1910b9dcc7ca8e3c8957da0e83681ea9008c66dc9f12b78ad19","tests/bad-ipma-version.avif":"7f9a1a0b4ebbf8d800d22eaae5ff78970cc6b811317db6c1467c6883952b7c9b","tests/bbb_sunflower_QCIF_30fps_h263_noaudio_1f.3gp":"03e5b1264d0a188d77b9e676ba3ce23a801b17aaa11c0343dfd851d6ea4e3a40","tests/clap-basic-1_3x3-to-1x1.avif":"83af9c8196fa93b2475163585a23d0eb5a8f8015d0db8da7a5d6de61adfb1876","tests/clap-missing-essential.avif":"4d61aacd2327661a456abc76d3d490e5ddd2b6f8cbfa52922a6c541c9d983193","tests/clusterfuzz-testcase-minimized-mp4-6093954524250112":"af7044a470732d4e7e34ac7ab5ff038c58b66f09702cbcd774931d7766bbfd35","tests/corrupt/a1lx-marked-essential.avif":"0d481240222450827ea335ae9a1a300777a0db4f9b0f4c17ed77c758c5133fa3","tests/corrupt/a1op-missing-essential.avif":"33c24d54f43f1a7be7a8334718881c8a0de24730c997c7842b9d7140e75017ea","tests/corrupt/alpha_video_moov_is_moop.avif":"89e0091edd6efc2c5b163525553c5abc56263fe1b3b885184bb07b9ea4bf346d","tests/corrupt/bug-1655846.avif":"e0a5a06225800fadf05f5352503a4cec11af73eef705c43b4acab5f4a99dea50","tests/corrupt/bug-1661347.avif":"31c26561e1d9eafb60f7c5968b82a0859d203d73f17f26b29276256acee12966","tests/corrupt/clusterfuzz-testcase-minimized-avif-4914209301856256.avif":"34a142c7916e314881f3fb6394add1c543fac0e5b45109e3a425eeb4c68998d0","tests/corrupt/hdlr-not-first.avif":"2c29308af077209b9c984921b7e36f8fb7ca7cf379cf8eba4c7a91f65bc7a304","tests/corrupt/hdlr-not-pict.avif":"9fe37619606645a95725300a9e34fada9190d1e0b3919881db84353941ca9291","tests/corrupt/imir-before-clap.avif":"22d6b5dacf0ef0be59053beba7564b08037fed859ada2885e3476e0ff0d19c95","tests/corrupt/invalid-avif-colr-multiple-nclx.avif":"7990a995855120dc4f724a6098816595becc35077fcd9e0de8c68300b49c4f1f","tests/corrupt/invalid-avif-colr-multiple-prof.avif":"b077a6b58e3a13ad743ee3f19fbae53b521eab8727606e0dba9bf06384f3121c","tests/corrupt/invalid-avif-colr-multiple-rICC.avif":"88b24d4d588744b9f2cdc03944f28283e9315eb3de7d7d57773a0541137f6529","tests/corrupt/invalid-avif-colr-multiple.zip":"9abddcbc47fde6da20263a29b770c6a9e76c8ab8dc785ef8512f35d9cb3206ed","tests/corrupt/invalid-transformation-order.avif":"22d6b5dacf0ef0be59053beba7564b08037fed859ada2885e3476e0ff0d19c95","tests/corrupt/ipma-duplicate-item_id.avif":"ca8c5275b0b8b79c1068489a52d0a5c8f0b4453463971e72b694189f11c10745","tests/corrupt/ipma-duplicate-version-and-flags.avif":"cf8e15ec4b210235f3d68332a1adeb64e35c41b8d8e1e7586ae38b6d9cd8926c","tests/corrupt/ipma-invalid-property-index.avif":"2480e773fa716d22883032d05fd4cf2c6b00fba8796cf4ff286a5d1ba26adff6","tests/corrupt/lsel-missing-essential.avif":"43c3b1e4c4acecd7559a9a7197a7befd43c71705748f0f8c063bca3be1c6d074","tests/corrupt/no-alpha-av1C.avif":"ad3d34d6331db7d9bea0c5f37efb88923520e33e08e7c636a5df435a4575eae7","tests/corrupt/no-alpha-ispe.avif":"94805fe40e0f5a3d9e5e98050020d4ffe62e5c703ece2867bc72bb1cdd775f77","tests/corrupt/no-av1C.avif":"eeb4fc50930c91465999f787c4a2a3b12de20556da0857be72da5a1a9eaa3f01","tests/corrupt/no-ftyp.avif":"74b431f32b2e2761e77df7fdb260f623b4e8f7e3f4c8af8a42d6826911706d7b","tests/corrupt/no-hdlr.avif":"91a1eb70c7b6adf2104e471d7deeeb98084a591d64ce09ba106c27edfbc3a409","tests/corrupt/no-ispe.avif":"4b6edfd8c9b40c25dc40305a6057e32b5e65f40da4a9d810c58dbff53254113f","tests/corrupt/no-pitm.avif":"7960eeb9e6e5140fbe5eb6d281e6974efd6c3c0147562f3dcf06f6b009dc540a","tests/corrupt/no-pixi-for-alpha.avif":"f8adc3573c79ee25bf6d4dd2693c61661469b28f86a5c7b1d9e41b0e8d2d53bb","tests/corrupt/no-pixi.avif":"4b1776def440dc8b913c170e4479772ee6bbb299b8679f7c564704bd03c9597e","tests/corrupt/transformation-before-ispe.avif":"7ac59dd68a4caa54c0cde9af0d57ff7832baada74d39174b50fbe0275a59a049","tests/hdlr-nonzero-reserved.avif":"b872dcd7b4f49c6808d6da109cf4fedc26a237c42e8529c5aa8f7130abaf40a9","tests/imir-missing-essential.avif":"6a5dfd4a9cc6dac96fbcaa759b976ec7246120455ab59f970a97606737bf31e9","tests/invalid-avif-hdlr-name-multiple-nul.avif":"0d3e4a6ce42154ee288c18339c2b59ff2104fd890cd2d616e5dbf26375a90e98","tests/irot-missing-essential.avif":"494589024dd277788b4de60b76352947b4fe7fe62bbe7ea6a47885ab126a8a2f","tests/lsel.avif":"ef8ba6827709f48cd45f749efb580129162d9599ea98f3363d2140957502d806","tests/multiple-extents.avif":"b5549ac68793e155a726d754e565cea0da03fa17833d3545f45c79e13f4c9360","tests/no-mif1.avif":"1442aa6ffaeb9512724287768bfd1850d3aa29a651ef05abb33e5dec2b3ee5c2","tests/overflow.rs":"16b591d8def1a155b3b997622f6ea255536870d99c3d8f97c51755b77a50de3c","tests/public.rs":"7c14c5742ebdc6d055f6e0a3139436f2cfa05a615c944fac89e6fff2bcab5040","tests/valid-alpha.avif":"9d417a35b9b62ad3ff66ffbc55f16552aacf821a092aa5ef4adff7e746bd4c2f","tests/valid-avif-colr-nclx-and-prof-and-rICC.avif":"ab6f5e786d26f8bcade5993f8b9cca3cd004a3d7fcec76e829f5d0f98cb18e7b","tests/valid-avif-colr-nclx-and-prof.avif":"0e982818de61869fcb85a2a4c2b7b8aeecb3053cbfdc6276987f91204998eefb","tests/valid-avif-colr-nclx-and-rICC.avif":"8530ef1305ff956a0c2912d0b3d1e0fc3a68cf3103e70b04cc2574530389b030","tests/valid-avif-colr-nclx.avif":"345ab58b7b1cb48aba2e21eb8dc5ab0a751a78a752ce1896c59b4bf361992f38","tests/valid-avif-colr-prof-and-rICC.avif":"1f0f085141106885bda78b0879c768818420d8196b39440a36578456a7d50a6c","tests/valid-avif-colr-prof.avif":"5d7aaefb5204ebe1cc296456866b8e46e023748b921a38ee56fd6c776a9733ff","tests/valid-avif-colr-rICC.avif":"e1c7b49bfad5904b484bd5118e6b33b78e2dc708a31a10fcbb0e4a373ed8dbb7","tests/valid.avif":"f0b33e09bf01232e0877df325f47986c0bee7764f2a81c9c908ae109e7dc63c4"},"package":null} \ No newline at end of file diff --git a/third_party/rust/mp4parse/Cargo.toml b/third_party/rust/mp4parse/Cargo.toml index 161043254e30..cebac7bb9f9a 100644 --- a/third_party/rust/mp4parse/Cargo.toml +++ b/third_party/rust/mp4parse/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mp4parse" -version = "0.13.0" +version = "0.16.0" authors = [ "Ralph Giles ", "Matthew Gregan ", @@ -13,7 +13,7 @@ description = "Parser for ISO base media file format (mp4)" documentation = "https://docs.rs/mp4parse/" license = "MPL-2.0" categories = ["multimedia::video"] - +edition = "2018" repository = "https://github.com/mozilla/mp4parse-rust" # Avoid complaints about trying to package test files. @@ -28,7 +28,6 @@ travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" } [dependencies] byteorder = "1.2.1" bitreader = { version = "0.3.2" } -env_logger = "0.8" fallible_collections = { version = "0.4", features = ["std_io"] } num-traits = "0.2.14" log = "0.4" diff --git a/third_party/rust/mp4parse/benches/avif_benchmark.rs b/third_party/rust/mp4parse/benches/avif_benchmark.rs index 0d8a48b63ced..f7810f8caf0b 100644 --- a/third_party/rust/mp4parse/benches/avif_benchmark.rs +++ b/third_party/rust/mp4parse/benches/avif_benchmark.rs @@ -1,8 +1,6 @@ // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -extern crate criterion; -extern crate mp4parse as mp4; use criterion::{criterion_group, criterion_main, Criterion}; use std::fs::File; @@ -19,5 +17,5 @@ fn avif_largest() { "av1-avif/testFiles/Netflix/avif/cosmos_frame05000_yuv444_12bpc_bt2020_pq_qlossless.avif", ) .expect("Unknown file"); - assert!(mp4::read_avif(input, mp4::ParseStrictness::Normal).is_ok()); + assert!(mp4parse::read_avif(input, mp4parse::ParseStrictness::Normal).is_ok()); } diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/.github/workflows/encode-and-decode-daily.yml b/third_party/rust/mp4parse/link-u-avif-sample-images/.github/workflows/encode-and-decode-daily.yml index 08733dec70d3..897b8ff5e9c7 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/.github/workflows/encode-and-decode-daily.yml +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/.github/workflows/encode-and-decode-daily.yml @@ -1,146 +1,146 @@ -name: Encode all images and decode them again weekly. - -on: - push: - schedule: - - cron: '0 20 * * 0' # https://crontab.guru/#0_2_*_*_0 - -jobs: - check-on-ubuntu: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-18.04, ubuntu-20.04] - include: - - os: ubuntu-18.04 - codename: 'bionic' - cavif-flag: '' - - os: ubuntu-20.04 - codename: 'focal' - cavif-flag: '' - steps: - - uses: actions/checkout@v2 - - name: Install required tools - run: sudo apt install -y curl jq unzip coreutils imagemagick - - name: Download latest cavif - shell: bash - run: | - runId=$(curl https://api.github.com/repos/link-u/cavif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') - artifactId=$(curl https://api.github.com/repos/link-u/cavif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "${{ matrix.codename }}")][0].id') - curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o cavif.zip -L https://api.github.com/repos/link-u/cavif/actions/artifacts/${artifactId}/zip - unzip cavif.zip - env: - #id of https://github.com/link-u/cavif/actions?query=workflow%3A%22Build+debian+package+on+push+or+release-tags.%22 - # curl https://api.github.com/repos/link-u/cavif/actions/workflows - WORKFLOW_ID: '4521995' - - name: Download latest davif - shell: bash - run: | - runId=$(curl https://api.github.com/repos/link-u/davif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') - artifactId=$(curl https://api.github.com/repos/link-u/davif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "${{ matrix.codename }}")][0].id') - curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o davif.zip -L https://api.github.com/repos/link-u/davif/actions/artifacts/${artifactId}/zip - unzip davif.zip - env: - #id of https://github.com/link-u/davif/actions?query=workflow%3A%22Build+debian+package+on+push+or+release-tags.%22 - # curl https://api.github.com/repos/link-u/davif/actions/workflows - WORKFLOW_ID: '452394' - - name: Install davif and cavif - run: sudo dpkg -i *.deb - - name: Use installed cavif and davif - run: | - sed -i -e 's/^CAVIF=.*$/CAVIF=cavif ${{ matrix.cavif-flag }}/' Makefile - sed -i -e 's/^DAVIF=.*$/DAVIF=davif/' Makefile - - name: Clean all images. - run: make clean - - name: Encode them all. - run: make all -j $(nproc) - - name: Decode them all. - run: make decode -j $(nproc) - - name: Copy images to upload. - run: | - mkdir -p ${{ matrix.codename }}/decoded - mkdir -p ${{ matrix.codename }}/encoded - cp decoded/* ${{ matrix.codename }}/decoded - cp *.avif ${{ matrix.codename }}/encoded - - name: Upload result - uses: actions/upload-artifact@v1 - with: - name: ${{ matrix.codename }} - path: ${{ matrix.codename }} - - name: Compare the result - run: make compare -j $(nproc) - check-on-windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - name: Install msys2 - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - update: true - path-type: inherit - - name: Install dependencies - shell: msys2 {0} - run: | - set -eux - pacman --noconfirm -S make - pacman --noconfirm -S bc - pacman --noconfirm -S mingw-w64-x86_64-imagemagick - pacman --noconfirm -S mingw-w64-x86_64-curl - pacman --noconfirm -S mingw-w64-x86_64-jq - make --version - echo '2+2' | bc - magick -version - - name: Download latest cavif - shell: bash - run: | - runId=$(curl https://api.github.com/repos/link-u/cavif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') - artifactId=$(curl https://api.github.com/repos/link-u/cavif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "cavif-win64")][0].id') - curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o cavif.zip -L https://api.github.com/repos/link-u/cavif/actions/artifacts/${artifactId}/zip - unzip cavif.zip - rm cavif.zip - ./cavif.exe -h - env: - WORKFLOW_ID: '4517759' - - name: Download latest davif - shell: bash - run: | - runId=$(curl https://api.github.com/repos/link-u/davif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') - artifactId=$(curl https://api.github.com/repos/link-u/davif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "davif-win64")][0].id') - curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o davif.zip -L https://api.github.com/repos/link-u/davif/actions/artifacts/${artifactId}/zip - unzip davif.zip - rm davif.zip - ./davif.exe -h - env: - WORKFLOW_ID: '4521970' - - name: Rewrite Makefile to installed cavif and davif - shell: msys2 {0} - run: | - sed -i -e 's/^CAVIF=.*$/CAVIF=.\/cavif.exe/' Makefile - sed -i -e 's/^DAVIF=.*$/DAVIF=.\/davif.exe/' Makefile - - name: Clean all images. - shell: msys2 {0} - run: make clean - - name: Encode them all - shell: msys2 {0} - run: make all -j $(nproc) - - name: Decode them all - shell: msys2 {0} - run: make decode -j $(nproc) - - name: Copy images to upload. - shell: msys2 {0} - run: | - mkdir -p win64/decoded - mkdir -p win64/encoded - cp decoded/* win64/decoded - cp *.avif win64/encoded - - name: Upload result - uses: actions/upload-artifact@v1 - with: - name: win64 - path: win64 - - name: Compare the result - shell: msys2 {0} - run: | - export PATH="/mingw64/bin:${PATH}" - make compare -j $(nproc) +name: Encode all images and decode them again weekly. + +on: + push: + schedule: + - cron: '0 20 * * 0' # https://crontab.guru/#0_2_*_*_0 + +jobs: + check-on-ubuntu: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-20.04] + include: + - os: ubuntu-18.04 + codename: 'bionic' + cavif-flag: '' + - os: ubuntu-20.04 + codename: 'focal' + cavif-flag: '' + steps: + - uses: actions/checkout@v2 + - name: Install required tools + run: sudo apt install -y curl jq unzip coreutils imagemagick + - name: Download latest cavif + shell: bash + run: | + runId=$(curl https://api.github.com/repos/link-u/cavif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') + artifactId=$(curl https://api.github.com/repos/link-u/cavif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "${{ matrix.codename }}")][0].id') + curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o cavif.zip -L https://api.github.com/repos/link-u/cavif/actions/artifacts/${artifactId}/zip + unzip cavif.zip + env: + #id of https://github.com/link-u/cavif/actions?query=workflow%3A%22Build+debian+package+on+push+or+release-tags.%22 + # curl https://api.github.com/repos/link-u/cavif/actions/workflows + WORKFLOW_ID: '4521995' + - name: Download latest davif + shell: bash + run: | + runId=$(curl https://api.github.com/repos/link-u/davif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') + artifactId=$(curl https://api.github.com/repos/link-u/davif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "${{ matrix.codename }}")][0].id') + curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o davif.zip -L https://api.github.com/repos/link-u/davif/actions/artifacts/${artifactId}/zip + unzip davif.zip + env: + #id of https://github.com/link-u/davif/actions?query=workflow%3A%22Build+debian+package+on+push+or+release-tags.%22 + # curl https://api.github.com/repos/link-u/davif/actions/workflows + WORKFLOW_ID: '452394' + - name: Install davif and cavif + run: sudo dpkg -i *.deb + - name: Use installed cavif and davif + run: | + sed -i -e 's/^CAVIF=.*$/CAVIF=cavif ${{ matrix.cavif-flag }}/' Makefile + sed -i -e 's/^DAVIF=.*$/DAVIF=davif/' Makefile + - name: Clean all images. + run: make clean + - name: Encode them all. + run: make all -j $(nproc) + - name: Decode them all. + run: make decode -j $(nproc) + - name: Copy images to upload. + run: | + mkdir -p ${{ matrix.codename }}/decoded + mkdir -p ${{ matrix.codename }}/encoded + cp decoded/* ${{ matrix.codename }}/decoded + cp *.avif ${{ matrix.codename }}/encoded + - name: Upload result + uses: actions/upload-artifact@v1 + with: + name: ${{ matrix.codename }} + path: ${{ matrix.codename }} + - name: Compare the result + run: make compare -j $(nproc) + check-on-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - name: Install msys2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + path-type: inherit + - name: Install dependencies + shell: msys2 {0} + run: | + set -eux + pacman --noconfirm -S make + pacman --noconfirm -S bc + pacman --noconfirm -S mingw-w64-x86_64-imagemagick + pacman --noconfirm -S mingw-w64-x86_64-curl + pacman --noconfirm -S mingw-w64-x86_64-jq + make --version + echo '2+2' | bc + magick -version + - name: Download latest cavif + shell: bash + run: | + runId=$(curl https://api.github.com/repos/link-u/cavif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') + artifactId=$(curl https://api.github.com/repos/link-u/cavif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "cavif-win64")][0].id') + curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o cavif.zip -L https://api.github.com/repos/link-u/cavif/actions/artifacts/${artifactId}/zip + unzip cavif.zip + rm cavif.zip + ./cavif.exe -h + env: + WORKFLOW_ID: '4517759' + - name: Download latest davif + shell: bash + run: | + runId=$(curl https://api.github.com/repos/link-u/davif/actions/workflows/${WORKFLOW_ID}/runs | jq '[.workflow_runs[] | select( .conclusion == "success")][0].id') + artifactId=$(curl https://api.github.com/repos/link-u/davif/actions/runs/${runId}/artifacts | jq '[.artifacts[] | select( .name == "davif-win64")][0].id') + curl --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -o davif.zip -L https://api.github.com/repos/link-u/davif/actions/artifacts/${artifactId}/zip + unzip davif.zip + rm davif.zip + ./davif.exe -h + env: + WORKFLOW_ID: '4521970' + - name: Rewrite Makefile to installed cavif and davif + shell: msys2 {0} + run: | + sed -i -e 's/^CAVIF=.*$/CAVIF=.\/cavif.exe/' Makefile + sed -i -e 's/^DAVIF=.*$/DAVIF=.\/davif.exe/' Makefile + - name: Clean all images. + shell: msys2 {0} + run: make clean + - name: Encode them all + shell: msys2 {0} + run: make all -j $(nproc) + - name: Decode them all + shell: msys2 {0} + run: make decode -j $(nproc) + - name: Copy images to upload. + shell: msys2 {0} + run: | + mkdir -p win64/decoded + mkdir -p win64/encoded + cp decoded/* win64/decoded + cp *.avif win64/encoded + - name: Upload result + uses: actions/upload-artifact@v1 + with: + name: win64 + path: win64 + - name: Compare the result + shell: msys2 {0} + run: | + export PATH="/mingw64/bin:${PATH}" + make compare -j $(nproc) diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/.gitignore b/third_party/rust/mp4parse/link-u-avif-sample-images/.gitignore index 69b09be52ac0..5016ce43e30f 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/.gitignore +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/.gitignore @@ -1,4 +1,4 @@ -*.avif.png -/core -/decoded/ -/.alpha-masks/ +*.avif.png +/core +/decoded/ +/.alpha-masks/ diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/LICENSE.txt b/third_party/rust/mp4parse/link-u-avif-sample-images/LICENSE.txt index 33bec29d5181..87316c7a9ac5 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/LICENSE.txt +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/LICENSE.txt @@ -1,427 +1,427 @@ -Attribution-ShareAlike 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution-ShareAlike 4.0 International Public -License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution-ShareAlike 4.0 International Public License ("Public -License"). To the extent this Public License may be interpreted as a -contract, You are granted the Licensed Rights in consideration of Your -acceptance of these terms and conditions, and the Licensor grants You -such rights in consideration of benefits the Licensor receives from -making the Licensed Material available under these terms and -conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. BY-SA Compatible License means a license listed at - creativecommons.org/compatiblelicenses, approved by Creative - Commons as essentially the equivalent of this Public License. - - d. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - e. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - f. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - g. License Elements means the license attributes listed in the name - of a Creative Commons Public License. The License Elements of this - Public License are Attribution and ShareAlike. - - h. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - i. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - j. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - k. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - l. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - m. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. Additional offer from the Licensor -- Adapted Material. - Every recipient of Adapted Material from You - automatically receives an offer from the Licensor to - exercise the Licensed Rights in the Adapted Material - under the conditions of the Adapter's License You apply. - - c. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - b. ShareAlike. - - In addition to the conditions in Section 3(a), if You Share - Adapted Material You produce, the following conditions also apply. - - 1. The Adapter's License You apply must be a Creative Commons - license with the same License Elements, this version or - later, or a BY-SA Compatible License. - - 2. You must include the text of, or the URI or hyperlink to, the - Adapter's License You apply. You may satisfy this condition - in any reasonable manner based on the medium, means, and - context in which You Share Adapted Material. - - 3. You may not offer or impose any additional or different terms - or conditions on, or apply any Effective Technological - Measures to, Adapted Material that restrict exercise of the - rights granted under the Adapter's License You apply. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material, - - including for purposes of Section 3(b); and - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the “Licensor.” The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + Creative Commons may be contacted at creativecommons.org. \ No newline at end of file diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/Makefile b/third_party/rust/mp4parse/link-u-avif-sample-images/Makefile index 2cabb6101b1e..d3391171e04a 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/Makefile +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/Makefile @@ -1,911 +1,911 @@ -CAVIF=../cavif/cmake-build-debug/cavif -DAVIF=../davif/cmake-build-debug/davif - -all: hato kimono fox plum; - -HATO=\ - hato.profile2.8bpc.yuv422.avif \ - hato.profile2.8bpc.yuv422.monochrome.avif \ - hato.profile2.10bpc.yuv422.avif \ - hato.profile2.10bpc.yuv422.monochrome.avif \ - hato.profile2.12bpc.yuv422.avif \ - hato.profile2.12bpc.yuv422.monochrome.avif \ - hato.profile0.8bpc.yuv420.avif \ - hato.profile0.8bpc.yuv420.monochrome.avif \ - hato.profile0.10bpc.yuv420.avif \ - hato.profile0.10bpc.yuv420.monochrome.avif - -hato: $(HATO); - -KIMONO=\ - kimono.avif \ - kimono.rotate90.avif \ - kimono.rotate270.avif \ - kimono.mirror-horizontal.avif \ - kimono.mirror-vertical.avif \ - kimono.mirror-vertical.rotate270.avif \ - kimono.crop.avif \ - kimono.mirror-vertical.rotate270.crop.avif - -kimono: $(KIMONO); - -FOX=\ - fox.profile0.8bpc.yuv420.avif \ - fox.profile0.8bpc.yuv420.odd-width.avif \ - fox.profile0.8bpc.yuv420.odd-height.avif \ - fox.profile0.8bpc.yuv420.odd-width.odd-height.avif \ - fox.profile0.8bpc.yuv420.monochrome.avif \ - fox.profile0.8bpc.yuv420.monochrome.odd-width.avif \ - fox.profile0.8bpc.yuv420.monochrome.odd-height.avif \ - fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif \ - fox.profile0.10bpc.yuv420.avif \ - fox.profile0.10bpc.yuv420.odd-width.avif \ - fox.profile0.10bpc.yuv420.odd-height.avif \ - fox.profile0.10bpc.yuv420.odd-width.odd-height.avif \ - fox.profile0.10bpc.yuv420.monochrome.avif \ - fox.profile0.10bpc.yuv420.monochrome.odd-width.avif \ - fox.profile0.10bpc.yuv420.monochrome.odd-height.avif \ - fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif \ - fox.profile2.12bpc.yuv420.avif \ - fox.profile2.12bpc.yuv420.odd-width.avif \ - fox.profile2.12bpc.yuv420.odd-height.avif \ - fox.profile2.12bpc.yuv420.odd-width.odd-height.avif \ - fox.profile2.12bpc.yuv420.monochrome.avif \ - fox.profile2.12bpc.yuv420.monochrome.odd-width.avif \ - fox.profile2.12bpc.yuv420.monochrome.odd-height.avif \ - fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif \ - fox.profile2.8bpc.yuv422.avif \ - fox.profile2.8bpc.yuv422.odd-width.avif \ - fox.profile2.8bpc.yuv422.odd-height.avif \ - fox.profile2.8bpc.yuv422.odd-width.odd-height.avif \ - fox.profile2.8bpc.yuv422.monochrome.avif \ - fox.profile2.8bpc.yuv422.monochrome.odd-width.avif \ - fox.profile2.8bpc.yuv422.monochrome.odd-height.avif \ - fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif \ - fox.profile2.10bpc.yuv422.avif \ - fox.profile2.10bpc.yuv422.odd-width.avif \ - fox.profile2.10bpc.yuv422.odd-height.avif \ - fox.profile2.10bpc.yuv422.odd-width.odd-height.avif \ - fox.profile2.10bpc.yuv422.monochrome.avif \ - fox.profile2.10bpc.yuv422.monochrome.odd-width.avif \ - fox.profile2.10bpc.yuv422.monochrome.odd-height.avif \ - fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif \ - fox.profile2.12bpc.yuv422.avif \ - fox.profile2.12bpc.yuv422.odd-width.avif \ - fox.profile2.12bpc.yuv422.odd-height.avif \ - fox.profile2.12bpc.yuv422.odd-width.odd-height.avif \ - fox.profile2.12bpc.yuv422.monochrome.avif \ - fox.profile2.12bpc.yuv422.monochrome.odd-width.avif \ - fox.profile2.12bpc.yuv422.monochrome.odd-height.avif \ - fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif \ - fox.profile1.8bpc.yuv444.avif \ - fox.profile1.8bpc.yuv444.odd-width.avif \ - fox.profile1.8bpc.yuv444.odd-height.avif \ - fox.profile1.8bpc.yuv444.odd-width.odd-height.avif \ - fox.profile1.10bpc.yuv444.avif \ - fox.profile1.10bpc.yuv444.odd-width.avif \ - fox.profile1.10bpc.yuv444.odd-height.avif \ - fox.profile1.10bpc.yuv444.odd-width.odd-height.avif \ - fox.profile2.12bpc.yuv444.avif \ - fox.profile2.12bpc.yuv444.odd-width.avif \ - fox.profile2.12bpc.yuv444.odd-height.avif \ - fox.profile2.12bpc.yuv444.odd-width.odd-height.avif \ - fox.profile2.12bpc.yuv444.monochrome.avif \ - fox.profile2.12bpc.yuv444.monochrome.odd-width.avif \ - fox.profile2.12bpc.yuv444.monochrome.odd-height.avif \ - fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif - -fox: $(FOX); - -PLUM_LARGE=\ - plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif \ - plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif \ - plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif \ - plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif \ - plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif \ - plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif \ - plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif \ - plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif \ - plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif \ - plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif \ - plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif \ - plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif \ - plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif \ - plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif \ - plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif \ - plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif \ - plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif \ - plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif \ - plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif \ - plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif \ - plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif \ - plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif \ - plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif \ - plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif \ - plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif \ - plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif \ - plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif \ - plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif \ - plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif \ - plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif \ - plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif \ - plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif - -PLUM_SMALL=\ - plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif \ - plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif \ - plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif \ - plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif \ - plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif \ - plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif \ - plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif \ - plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif \ - plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif \ - plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif \ - plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif \ - plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif \ - plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif \ - plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif \ - plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif \ - plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif \ - plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif \ - plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif \ - plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif \ - plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif \ - plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif \ - plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif \ - plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif \ - plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif \ - plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif \ - plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif \ - plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif \ - plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif \ - plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif \ - plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif \ - plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif \ - plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif - -PLUM=$(PLUM_LARGE) $(PLUM_SMALL) - -plum: $(PLUM); - -STAR=\ - star-8bpc.avifs \ - star-8bpc-with-alpha.avifs \ - star-10bpc.avifs \ - star-10bpc-with-alpha.avifs \ - star-12bpc.avifs \ - star-12bpc-with-alpha.avifs - -star: $(STAR); - -ALL_AVIF=$(HATO) $(KIMONO) $(FOX) $(PLUM) -ALL_AVIFS=$(STAR) -DECODED_PNG=$(ALL_AVIF:%.avif=decoded/%.png) -DUMMY_CHECK_TARGETS=$(ALL_AVIF:%.avif=%.check) - -.PHONY: all clean \ - hato kimono fox plum \ - star \ - decode decode-clean decode-images \ - url hato-url kimono-url fox-url plum-url\ - compare $(DUMMY_CHECK_TARGETS) - -decode-clean: - rm -Rf decoded/ - -$(DECODED_PNG): | decoded - -decoded: - mkdir -p decoded - -decode-images: $(DECODED_PNG); - -decode: - $(MAKE) decode-clean - $(MAKE) decode-images - -compare: $(DUMMY_CHECK_TARGETS); - -decoded/%.png: %.avif - $(DAVIF) -i $< -o $@ - -$(DUMMY_CHECK_TARGETS): %.check: %.avif decoded/%.png - bash -e scripts/compare.sh $@ $(word 1,$^) $(word 2,$^) - -url: - cat Makefile | grep '^.*\?\.avif:' | sort -d | sed 's/^\(.*\)\:\s*\(.*\)$\/https\:\/\/raw.githubusercontent.com\/link-u\/avif-sample-images\/master\/\1, https\:\/\/raw.githubusercontent.com\/link-u\/avif-sample-images\/master\/\2/' - -hato-url: - $(MAKE) url | grep hato - -kimono-url: - $(MAKE) url | grep kimono - -fox-url: - $(MAKE) url | grep fox - -plum-url: - $(MAKE) url | grep plum-blossom - -clean: - rm -Rf *.avif decoded .alpha-masks - -## hato - -### YUV422 - -hato.profile2.8bpc.yuv422.avif: hato.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -hato.profile2.8bpc.yuv422.monochrome.avif: hato.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --monochrome --cpu-used 0 --rate-control q --crf 18 - -hato.profile2.10bpc.yuv422.avif: hato.16bpc.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -hato.profile2.10bpc.yuv422.monochrome.avif: hato.16bpc.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --monochrome --cpu-used 0 --rate-control q --crf 18 - -hato.profile2.12bpc.yuv422.avif: hato.16bpc.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -hato.profile2.12bpc.yuv422.monochrome.avif: hato.16bpc.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --monochrome --cpu-used 0 --rate-control q --crf 18 - -### YUV420 - -hato.profile0.8bpc.yuv420.avif: hato.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -hato.profile0.8bpc.yuv420.monochrome.avif: hato.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --monochrome --cpu-used 0 --rate-control q --crf 18 - -hato.profile0.10bpc.yuv420.avif: hato.16bpc.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -hato.profile0.10bpc.yuv420.monochrome.avif: hato.16bpc.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --monochrome --cpu-used 0 --rate-control q --crf 18 - -## Kimono - -kimono.avif: kimono.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -kimono.rotate90.avif: kimono.rotate90.png - $(CAVIF) -i $< -o $@ --rotation 270 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -kimono.rotate270.avif: kimono.rotate270.png - $(CAVIF) -i $< -o $@ --rotation 90 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -kimono.mirror-horizontal.avif: kimono.mirror-horizontal.png - $(CAVIF) -i $< -o $@ --mirror horizontal --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -kimono.mirror-vertical.avif: kimono.mirror-vertical.png - $(CAVIF) -i $< -o $@ --mirror vertical --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -kimono.mirror-vertical.rotate270.avif: kimono.mirror-vertical.rotate270.png - $(CAVIF) -i $< -o $@ --mirror vertical --rotation 90 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -kimono.crop.avif: kimono.png - $(CAVIF) -i $< -o $@ --crop-offset 103,-308 --crop-size 385,330 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -kimono.mirror-vertical.rotate270.crop.avif: kimono.mirror-vertical.rotate270.png - $(CAVIF) -i $< -o $@ --crop-offset -308,103 --crop-size 330,385 --mirror vertical --rotation 90 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -## Fox Parade - -### YUV420 - -#### 8bit - -fox.profile0.8bpc.yuv420.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.8bpc.yuv420.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.8bpc.yuv420.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.8bpc.yuv420.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.8bpc.yuv420.monochrome.avif: fox.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.8bpc.yuv420.monochrome.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.8bpc.yuv420.monochrome.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -#### 10bit - -fox.profile0.10bpc.yuv420.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.10bpc.yuv420.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.10bpc.yuv420.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.10bpc.yuv420.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.10bpc.yuv420.monochrome.avif: fox.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.10bpc.yuv420.monochrome.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.10bpc.yuv420.monochrome.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -#### 12bit - -fox.profile2.12bpc.yuv420.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv420.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv420.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv420.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv420.monochrome.avif: fox.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv420.monochrome.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv420.monochrome.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -### YUV422 - -#### 8bit - -fox.profile2.8bpc.yuv422.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.8bpc.yuv422.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.8bpc.yuv422.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.8bpc.yuv422.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.8bpc.yuv422.monochrome.avif: fox.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.8bpc.yuv422.monochrome.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.8bpc.yuv422.monochrome.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -#### 10bit - -fox.profile2.10bpc.yuv422.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.10bpc.yuv422.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.10bpc.yuv422.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.10bpc.yuv422.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.10bpc.yuv422.monochrome.avif: fox.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.10bpc.yuv422.monochrome.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.10bpc.yuv422.monochrome.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -#### 12bit - -fox.profile2.12bpc.yuv422.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv422.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv422.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv422.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv422.monochrome.avif: fox.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv422.monochrome.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv422.monochrome.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -### YUV444 - -#### 8bit - -fox.profile1.8bpc.yuv444.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile1.8bpc.yuv444.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile1.8bpc.yuv444.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile1.8bpc.yuv444.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -#### 10bit - -fox.profile1.10bpc.yuv444.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile1.10bpc.yuv444.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile1.10bpc.yuv444.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile1.10bpc.yuv444.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -#### 12bit - -fox.profile2.12bpc.yuv444.avif: fox.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv444.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv444.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv444.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv444.monochrome.avif: fox.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv444.monochrome.odd-width.avif: fox.odd-width.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv444.monochrome.odd-height.avif: fox.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png - $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -## Alpha mask - -.alpha-masks: - mkdir -p .alpha-masks - -$(PLUM): | .alpha-masks - -## Plum blossom - large version - -### YUV420 - -#### 8bit - -plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 10bit - -plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 12bit - -plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -## YUV422 - -#### 8bit - -plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 10bit - -plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 12bit - -plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -### YUV444 - -#### 8bit - -plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -#### 10bit - -plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -#### 12bit - -plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif: plum-blossom-large.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome - -## Plum blossom - small version - -### YUV420 - -#### 8bit - -plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 10bit - -plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 12bit - -plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome - -## YUV422 - -#### 8bit - -plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 10bit - -plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -#### 12bit - -plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome - -### YUV444 - -#### 8bit - -plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -#### 10bit - -plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -#### 12bit - -plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome - -plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 - -plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif: plum-blossom-small.png - $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range - $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome - -star-8bpc.avifs: star.input.txt - $(eval TMP := $(shell mktemp -d)) - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv420p -color_range jpeg -b:v 0 -crf 0 -lossless 1 $(TMP)/star.mp4 - # You need the latest version of gpac. - # Go to https://github.com/gpac/gpac - # then, `make deb -j32` - MP4Box -add-image $(TMP)/star.mp4:id=1:primary -new $@ - MP4Box -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis $@ - MP4Box -add $(TMP)/star.mp4:hdlr=pict:ccst:name="GPAC avifs" $@ - rm -Rfv $(TMP) - -# FIXME(ledya-z): WORK IN PROGRESS -star-8bpc-with-alpha.avifs: star.input.txt - $(eval TMP := $(shell mktemp -d)) - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv420p -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-video.mp4" - # FIXME(ledyba-z): It does not generate monochrome OBUs. - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt gray -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-alpha.mp4" - # You need the latest version of gpac. - # Go to https://github.com/gpac/gpac - # then, `make deb -j32` - - MP4Box -raw-layer "1:output=$(TMP)/star-video" "$(TMP)/star-video.mp4" - MP4Box -raw-layer "1:output=$(TMP)/star-alpha" "$(TMP)/star-alpha.mp4" - - MP4Box -add-image "$(TMP)/star-alpha.av1:id=3:ref=auxl,4:alpha:name=Alpha" -add-image "$(TMP)/star-video.av1:id=4:name=Color" -set-primary 4 -ab avif -new $@ - MP4Box -add "$(TMP)/star-video.av1:hdlr=pict:ccst:name=\"GPAC avifs\"" -add "$(TMP)/star-alpha.av1:hdlr=auxv:ccst:alpha:name=\"GPAC avifs alpha\"" -ref 2:auxl:1 -ab msf1 -ab miaf -ab MA1B -brand avis $@ - rm -Rfv $(TMP) - -star-10bpc.avifs: star.input.txt - $(eval TMP := $(shell mktemp -d)) - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv422p10 -color_range jpeg -b:v 0 -crf 0 -lossless 1 $(TMP)/star.mp4 - # You need the latest version of gpac. - # Go to https://github.com/gpac/gpac - # then, `make deb -j32` - MP4Box -add-image $(TMP)/star.mp4:id=1:primary -new $@ - MP4Box -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis $@ - MP4Box -add $(TMP)/star.mp4:hdlr=pict:ccst:name="GPAC avifs" $@ - rm -Rfv $(TMP) - -# FIXME(ledya-z): WORK IN PROGRESS -star-10bpc-with-alpha.avifs: star.input.txt - $(eval TMP := $(shell mktemp -d)) - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv422p10 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-video.mp4" - # FIXME(ledyba-z): It does not generate monochrome OBUs. - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt gray10 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-alpha.mp4" - # You need the latest version of gpac. - # Go to https://github.com/gpac/gpac - # then, `make deb -j32` - - MP4Box -raw-layer "1:output=$(TMP)/star-video" "$(TMP)/star-video.mp4" - MP4Box -raw-layer "1:output=$(TMP)/star-alpha" "$(TMP)/star-alpha.mp4" - - MP4Box -add-image "$(TMP)/star-alpha.av1:id=3:ref=auxl,4:alpha:name=Alpha" -add-image "$(TMP)/star-video.av1:id=4:name=Color" -set-primary 4 -ab avif -new $@ - MP4Box -add "$(TMP)/star-video.av1:hdlr=pict:ccst:name=\"GPAC avifs\"" -add "$(TMP)/star-alpha.av1:hdlr=auxv:ccst:alpha:name=\"GPAC avifs alpha\"" -ref 2:auxl:1 -ab msf1 -ab miaf -ab MA1B -brand avis $@ - rm -Rfv $(TMP) - -star-12bpc.avifs: star.input.txt - $(eval TMP := $(shell mktemp -d)) - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv444p12 -color_range jpeg -b:v 0 -crf 0 -lossless 1 $(TMP)/star.mp4 - # You need the latest version of gpac. - # Go to https://github.com/gpac/gpac - # then, `make deb -j32` - MP4Box -add-image $(TMP)/star.mp4:id=1:primary -new $@ - MP4Box -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis $@ - MP4Box -add $(TMP)/star.mp4:hdlr=pict:ccst:name="GPAC avifs" $@ - rm -Rfv $(TMP) - -# FIXME(ledya-z): WORK IN PROGRESS -star-12bpc-with-alpha.avifs: star.input.txt - $(eval TMP := $(shell mktemp -d)) - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv444p12 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-video.mp4" - # FIXME(ledyba-z): It does not generate monochrome OBUs. - ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt gray12 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-alpha.mp4" - # You need the latest version of gpac. - # Go to https://github.com/gpac/gpac - # then, `make deb -j32` - - MP4Box -raw-layer "1:output=$(TMP)/star-video" "$(TMP)/star-video.mp4" - MP4Box -raw-layer "1:output=$(TMP)/star-alpha" "$(TMP)/star-alpha.mp4" - - MP4Box -add-image "$(TMP)/star-alpha.av1:id=3:ref=auxl,4:alpha:name=Alpha" -add-image "$(TMP)/star-video.av1:id=4:name=Color" -set-primary 4 -ab avif -new $@ - MP4Box -add "$(TMP)/star-video.av1:hdlr=pict:ccst:name=\"GPAC avifs\"" -add "$(TMP)/star-alpha.av1:hdlr=auxv:ccst:alpha:name=\"GPAC avifs alpha\"" -ref 2:auxl:1 -ab msf1 -ab miaf -ab MA1B -brand avis $@ - rm -Rfv $(TMP) +CAVIF=../cavif/cmake-build-debug/cavif +DAVIF=../davif/cmake-build-debug/davif + +all: hato kimono fox plum; + +HATO=\ + hato.profile2.8bpc.yuv422.avif \ + hato.profile2.8bpc.yuv422.monochrome.avif \ + hato.profile2.10bpc.yuv422.avif \ + hato.profile2.10bpc.yuv422.monochrome.avif \ + hato.profile2.12bpc.yuv422.avif \ + hato.profile2.12bpc.yuv422.monochrome.avif \ + hato.profile0.8bpc.yuv420.avif \ + hato.profile0.8bpc.yuv420.monochrome.avif \ + hato.profile0.10bpc.yuv420.avif \ + hato.profile0.10bpc.yuv420.monochrome.avif + +hato: $(HATO); + +KIMONO=\ + kimono.avif \ + kimono.rotate90.avif \ + kimono.rotate270.avif \ + kimono.mirror-horizontal.avif \ + kimono.mirror-vertical.avif \ + kimono.mirror-vertical.rotate270.avif \ + kimono.crop.avif \ + kimono.mirror-vertical.rotate270.crop.avif + +kimono: $(KIMONO); + +FOX=\ + fox.profile0.8bpc.yuv420.avif \ + fox.profile0.8bpc.yuv420.odd-width.avif \ + fox.profile0.8bpc.yuv420.odd-height.avif \ + fox.profile0.8bpc.yuv420.odd-width.odd-height.avif \ + fox.profile0.8bpc.yuv420.monochrome.avif \ + fox.profile0.8bpc.yuv420.monochrome.odd-width.avif \ + fox.profile0.8bpc.yuv420.monochrome.odd-height.avif \ + fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif \ + fox.profile0.10bpc.yuv420.avif \ + fox.profile0.10bpc.yuv420.odd-width.avif \ + fox.profile0.10bpc.yuv420.odd-height.avif \ + fox.profile0.10bpc.yuv420.odd-width.odd-height.avif \ + fox.profile0.10bpc.yuv420.monochrome.avif \ + fox.profile0.10bpc.yuv420.monochrome.odd-width.avif \ + fox.profile0.10bpc.yuv420.monochrome.odd-height.avif \ + fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif \ + fox.profile2.12bpc.yuv420.avif \ + fox.profile2.12bpc.yuv420.odd-width.avif \ + fox.profile2.12bpc.yuv420.odd-height.avif \ + fox.profile2.12bpc.yuv420.odd-width.odd-height.avif \ + fox.profile2.12bpc.yuv420.monochrome.avif \ + fox.profile2.12bpc.yuv420.monochrome.odd-width.avif \ + fox.profile2.12bpc.yuv420.monochrome.odd-height.avif \ + fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif \ + fox.profile2.8bpc.yuv422.avif \ + fox.profile2.8bpc.yuv422.odd-width.avif \ + fox.profile2.8bpc.yuv422.odd-height.avif \ + fox.profile2.8bpc.yuv422.odd-width.odd-height.avif \ + fox.profile2.8bpc.yuv422.monochrome.avif \ + fox.profile2.8bpc.yuv422.monochrome.odd-width.avif \ + fox.profile2.8bpc.yuv422.monochrome.odd-height.avif \ + fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif \ + fox.profile2.10bpc.yuv422.avif \ + fox.profile2.10bpc.yuv422.odd-width.avif \ + fox.profile2.10bpc.yuv422.odd-height.avif \ + fox.profile2.10bpc.yuv422.odd-width.odd-height.avif \ + fox.profile2.10bpc.yuv422.monochrome.avif \ + fox.profile2.10bpc.yuv422.monochrome.odd-width.avif \ + fox.profile2.10bpc.yuv422.monochrome.odd-height.avif \ + fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif \ + fox.profile2.12bpc.yuv422.avif \ + fox.profile2.12bpc.yuv422.odd-width.avif \ + fox.profile2.12bpc.yuv422.odd-height.avif \ + fox.profile2.12bpc.yuv422.odd-width.odd-height.avif \ + fox.profile2.12bpc.yuv422.monochrome.avif \ + fox.profile2.12bpc.yuv422.monochrome.odd-width.avif \ + fox.profile2.12bpc.yuv422.monochrome.odd-height.avif \ + fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif \ + fox.profile1.8bpc.yuv444.avif \ + fox.profile1.8bpc.yuv444.odd-width.avif \ + fox.profile1.8bpc.yuv444.odd-height.avif \ + fox.profile1.8bpc.yuv444.odd-width.odd-height.avif \ + fox.profile1.10bpc.yuv444.avif \ + fox.profile1.10bpc.yuv444.odd-width.avif \ + fox.profile1.10bpc.yuv444.odd-height.avif \ + fox.profile1.10bpc.yuv444.odd-width.odd-height.avif \ + fox.profile2.12bpc.yuv444.avif \ + fox.profile2.12bpc.yuv444.odd-width.avif \ + fox.profile2.12bpc.yuv444.odd-height.avif \ + fox.profile2.12bpc.yuv444.odd-width.odd-height.avif \ + fox.profile2.12bpc.yuv444.monochrome.avif \ + fox.profile2.12bpc.yuv444.monochrome.odd-width.avif \ + fox.profile2.12bpc.yuv444.monochrome.odd-height.avif \ + fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif + +fox: $(FOX); + +PLUM_LARGE=\ + plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif \ + plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif \ + plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif \ + plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif \ + plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif \ + plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif \ + plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif \ + plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif \ + plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif \ + plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif \ + plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif \ + plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif \ + plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif \ + plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif \ + plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif \ + plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif \ + plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif \ + plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif \ + plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif \ + plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif \ + plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif \ + plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif \ + plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif \ + plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif \ + plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif \ + plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif \ + plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif \ + plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif \ + plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif \ + plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif \ + plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif \ + plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif + +PLUM_SMALL=\ + plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif \ + plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif \ + plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif \ + plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif \ + plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif \ + plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif \ + plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif \ + plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif \ + plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif \ + plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif \ + plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif \ + plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif \ + plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif \ + plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif \ + plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif \ + plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif \ + plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif \ + plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif \ + plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif \ + plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif \ + plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif \ + plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif \ + plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif \ + plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif \ + plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif \ + plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif \ + plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif \ + plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif \ + plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif \ + plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif \ + plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif \ + plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif + +PLUM=$(PLUM_LARGE) $(PLUM_SMALL) + +plum: $(PLUM); + +STAR=\ + star-8bpc.avifs \ + star-8bpc-with-alpha.avifs \ + star-10bpc.avifs \ + star-10bpc-with-alpha.avifs \ + star-12bpc.avifs \ + star-12bpc-with-alpha.avifs + +star: $(STAR); + +ALL_AVIF=$(HATO) $(KIMONO) $(FOX) $(PLUM) +ALL_AVIFS=$(STAR) +DECODED_PNG=$(ALL_AVIF:%.avif=decoded/%.png) +DUMMY_CHECK_TARGETS=$(ALL_AVIF:%.avif=%.check) + +.PHONY: all clean \ + hato kimono fox plum \ + star \ + decode decode-clean decode-images \ + url hato-url kimono-url fox-url plum-url\ + compare $(DUMMY_CHECK_TARGETS) + +decode-clean: + rm -Rf decoded/ + +$(DECODED_PNG): | decoded + +decoded: + mkdir -p decoded + +decode-images: $(DECODED_PNG); + +decode: + $(MAKE) decode-clean + $(MAKE) decode-images + +compare: $(DUMMY_CHECK_TARGETS); + +decoded/%.png: %.avif + $(DAVIF) -i $< -o $@ + +$(DUMMY_CHECK_TARGETS): %.check: %.avif decoded/%.png + bash -e scripts/compare.sh $@ $(word 1,$^) $(word 2,$^) + +url: + cat Makefile | grep '^.*\?\.avif:' | sort -d | sed 's/^\(.*\)\:\s*\(.*\)$\/https\:\/\/raw.githubusercontent.com\/link-u\/avif-sample-images\/master\/\1, https\:\/\/raw.githubusercontent.com\/link-u\/avif-sample-images\/master\/\2/' + +hato-url: + $(MAKE) url | grep hato + +kimono-url: + $(MAKE) url | grep kimono + +fox-url: + $(MAKE) url | grep fox + +plum-url: + $(MAKE) url | grep plum-blossom + +clean: + rm -Rf *.avif decoded .alpha-masks + +## hato + +### YUV422 + +hato.profile2.8bpc.yuv422.avif: hato.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +hato.profile2.8bpc.yuv422.monochrome.avif: hato.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --monochrome --cpu-used 0 --rate-control q --crf 18 + +hato.profile2.10bpc.yuv422.avif: hato.16bpc.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +hato.profile2.10bpc.yuv422.monochrome.avif: hato.16bpc.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --monochrome --cpu-used 0 --rate-control q --crf 18 + +hato.profile2.12bpc.yuv422.avif: hato.16bpc.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +hato.profile2.12bpc.yuv422.monochrome.avif: hato.16bpc.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --monochrome --cpu-used 0 --rate-control q --crf 18 + +### YUV420 + +hato.profile0.8bpc.yuv420.avif: hato.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +hato.profile0.8bpc.yuv420.monochrome.avif: hato.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --monochrome --cpu-used 0 --rate-control q --crf 18 + +hato.profile0.10bpc.yuv420.avif: hato.16bpc.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +hato.profile0.10bpc.yuv420.monochrome.avif: hato.16bpc.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --monochrome --cpu-used 0 --rate-control q --crf 18 + +## Kimono + +kimono.avif: kimono.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +kimono.rotate90.avif: kimono.rotate90.png + $(CAVIF) -i $< -o $@ --rotation 270 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +kimono.rotate270.avif: kimono.rotate270.png + $(CAVIF) -i $< -o $@ --rotation 90 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +kimono.mirror-horizontal.avif: kimono.mirror-horizontal.png + $(CAVIF) -i $< -o $@ --mirror horizontal --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +kimono.mirror-vertical.avif: kimono.mirror-vertical.png + $(CAVIF) -i $< -o $@ --mirror vertical --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +kimono.mirror-vertical.rotate270.avif: kimono.mirror-vertical.rotate270.png + $(CAVIF) -i $< -o $@ --mirror vertical --rotation 90 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +kimono.crop.avif: kimono.png + $(CAVIF) -i $< -o $@ --crop-offset 103,-308 --crop-size 385,330 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +kimono.mirror-vertical.rotate270.crop.avif: kimono.mirror-vertical.rotate270.png + $(CAVIF) -i $< -o $@ --crop-offset -308,103 --crop-size 330,385 --mirror vertical --rotation 90 --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +## Fox Parade + +### YUV420 + +#### 8bit + +fox.profile0.8bpc.yuv420.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.8bpc.yuv420.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.8bpc.yuv420.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.8bpc.yuv420.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.8bpc.yuv420.monochrome.avif: fox.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.8bpc.yuv420.monochrome.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.8bpc.yuv420.monochrome.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +#### 10bit + +fox.profile0.10bpc.yuv420.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.10bpc.yuv420.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.10bpc.yuv420.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.10bpc.yuv420.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.10bpc.yuv420.monochrome.avif: fox.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.10bpc.yuv420.monochrome.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.10bpc.yuv420.monochrome.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +#### 12bit + +fox.profile2.12bpc.yuv420.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv420.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv420.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv420.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv420.monochrome.avif: fox.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv420.monochrome.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv420.monochrome.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +### YUV422 + +#### 8bit + +fox.profile2.8bpc.yuv422.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.8bpc.yuv422.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.8bpc.yuv422.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.8bpc.yuv422.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.8bpc.yuv422.monochrome.avif: fox.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.8bpc.yuv422.monochrome.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.8bpc.yuv422.monochrome.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +#### 10bit + +fox.profile2.10bpc.yuv422.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.10bpc.yuv422.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.10bpc.yuv422.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.10bpc.yuv422.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.10bpc.yuv422.monochrome.avif: fox.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.10bpc.yuv422.monochrome.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.10bpc.yuv422.monochrome.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +#### 12bit + +fox.profile2.12bpc.yuv422.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv422.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv422.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv422.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv422.monochrome.avif: fox.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv422.monochrome.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv422.monochrome.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +### YUV444 + +#### 8bit + +fox.profile1.8bpc.yuv444.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile1.8bpc.yuv444.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile1.8bpc.yuv444.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile1.8bpc.yuv444.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +#### 10bit + +fox.profile1.10bpc.yuv444.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile1.10bpc.yuv444.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile1.10bpc.yuv444.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile1.10bpc.yuv444.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +#### 12bit + +fox.profile2.12bpc.yuv444.avif: fox.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv444.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv444.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv444.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv444.monochrome.avif: fox.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv444.monochrome.odd-width.avif: fox.odd-width.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv444.monochrome.odd-height.avif: fox.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif: fox.odd-width.odd-height.png + $(CAVIF) -i $< -o $@ --monochrome --tune psnr --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +## Alpha mask + +.alpha-masks: + mkdir -p .alpha-masks + +$(PLUM): | .alpha-masks + +## Plum blossom - large version + +### YUV420 + +#### 8bit + +plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 10bit + +plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 12bit + +plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +## YUV422 + +#### 8bit + +plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 10bit + +plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 12bit + +plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +### YUV444 + +#### 8bit + +plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +#### 10bit + +plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +#### 12bit + +plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif: plum-blossom-large.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome + +## Plum blossom - small version + +### YUV420 + +#### 8bit + +plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 8 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 10bit + +plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 0 --bit-depth 10 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 12bit + +plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv420 --cpu-used 0 --rate-control q --crf 18 --monochrome + +## YUV422 + +#### 8bit + +plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 10bit + +plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +#### 12bit + +plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv422 --cpu-used 0 --rate-control q --crf 18 --monochrome + +### YUV444 + +#### 8bit + +plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 8 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 8 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +#### 10bit + +plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 10 --pix-fmt yuv422 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 1 --bit-depth 10 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +#### 12bit + +plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome + +plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 + +plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif: plum-blossom-small.png + $(CAVIF) -i $< -o .alpha-masks/$@ --encode-target alpha --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --lossless --monochrome --enable-full-color-range + $(CAVIF) -i $< -o $@ --tune psnr --encode-target image --attach-alpha .alpha-masks/$@ --profile 2 --bit-depth 12 --pix-fmt yuv444 --cpu-used 0 --rate-control q --crf 18 --monochrome + +star-8bpc.avifs: star.input.txt + $(eval TMP := $(shell mktemp -d)) + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv420p -color_range jpeg -b:v 0 -crf 0 -lossless 1 $(TMP)/star.mp4 + # You need the latest version of gpac. + # Go to https://github.com/gpac/gpac + # then, `make deb -j32` + MP4Box -add-image $(TMP)/star.mp4:id=1:primary -new $@ + MP4Box -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis $@ + MP4Box -add $(TMP)/star.mp4:hdlr=pict:ccst:name="GPAC avifs" $@ + rm -Rfv $(TMP) + +# FIXME(ledya-z): WORK IN PROGRESS +star-8bpc-with-alpha.avifs: star.input.txt + $(eval TMP := $(shell mktemp -d)) + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv420p -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-video.mp4" + # FIXME(ledyba-z): It does not generate monochrome OBUs. + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt gray -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-alpha.mp4" + # You need the latest version of gpac. + # Go to https://github.com/gpac/gpac + # then, `make deb -j32` + + MP4Box -raw-layer "1:output=$(TMP)/star-video" "$(TMP)/star-video.mp4" + MP4Box -raw-layer "1:output=$(TMP)/star-alpha" "$(TMP)/star-alpha.mp4" + + MP4Box -add-image "$(TMP)/star-alpha.av1:id=3:ref=auxl,4:alpha:name=Alpha" -add-image "$(TMP)/star-video.av1:id=4:name=Color" -set-primary 4 -ab avif -new $@ + MP4Box -add "$(TMP)/star-video.av1:hdlr=pict:ccst:name=\"GPAC avifs\"" -add "$(TMP)/star-alpha.av1:hdlr=auxv:ccst:alpha:name=\"GPAC avifs alpha\"" -ref 2:auxl:1 -ab msf1 -ab miaf -ab MA1B -brand avis $@ + rm -Rfv $(TMP) + +star-10bpc.avifs: star.input.txt + $(eval TMP := $(shell mktemp -d)) + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv422p10 -color_range jpeg -b:v 0 -crf 0 -lossless 1 $(TMP)/star.mp4 + # You need the latest version of gpac. + # Go to https://github.com/gpac/gpac + # then, `make deb -j32` + MP4Box -add-image $(TMP)/star.mp4:id=1:primary -new $@ + MP4Box -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis $@ + MP4Box -add $(TMP)/star.mp4:hdlr=pict:ccst:name="GPAC avifs" $@ + rm -Rfv $(TMP) + +# FIXME(ledya-z): WORK IN PROGRESS +star-10bpc-with-alpha.avifs: star.input.txt + $(eval TMP := $(shell mktemp -d)) + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv422p10 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-video.mp4" + # FIXME(ledyba-z): It does not generate monochrome OBUs. + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt gray10 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-alpha.mp4" + # You need the latest version of gpac. + # Go to https://github.com/gpac/gpac + # then, `make deb -j32` + + MP4Box -raw-layer "1:output=$(TMP)/star-video" "$(TMP)/star-video.mp4" + MP4Box -raw-layer "1:output=$(TMP)/star-alpha" "$(TMP)/star-alpha.mp4" + + MP4Box -add-image "$(TMP)/star-alpha.av1:id=3:ref=auxl,4:alpha:name=Alpha" -add-image "$(TMP)/star-video.av1:id=4:name=Color" -set-primary 4 -ab avif -new $@ + MP4Box -add "$(TMP)/star-video.av1:hdlr=pict:ccst:name=\"GPAC avifs\"" -add "$(TMP)/star-alpha.av1:hdlr=auxv:ccst:alpha:name=\"GPAC avifs alpha\"" -ref 2:auxl:1 -ab msf1 -ab miaf -ab MA1B -brand avis $@ + rm -Rfv $(TMP) + +star-12bpc.avifs: star.input.txt + $(eval TMP := $(shell mktemp -d)) + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv444p12 -color_range jpeg -b:v 0 -crf 0 -lossless 1 $(TMP)/star.mp4 + # You need the latest version of gpac. + # Go to https://github.com/gpac/gpac + # then, `make deb -j32` + MP4Box -add-image $(TMP)/star.mp4:id=1:primary -new $@ + MP4Box -ab avis -ab msf1 -ab miaf -ab MA1B -rb mif1 -brand avis $@ + MP4Box -add $(TMP)/star.mp4:hdlr=pict:ccst:name="GPAC avifs" $@ + rm -Rfv $(TMP) + +# FIXME(ledya-z): WORK IN PROGRESS +star-12bpc-with-alpha.avifs: star.input.txt + $(eval TMP := $(shell mktemp -d)) + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt yuv444p12 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-video.mp4" + # FIXME(ledyba-z): It does not generate monochrome OBUs. + ~/umi/src/git.ffmpeg.org/ffmpeg/ffmpeg -r 10 -f concat -i star.input.txt -strict -2 -vcodec av1 -pix_fmt gray12 -color_range mpeg -b:v 0 -crf 0 -lossless 1 "$(TMP)/star-alpha.mp4" + # You need the latest version of gpac. + # Go to https://github.com/gpac/gpac + # then, `make deb -j32` + + MP4Box -raw-layer "1:output=$(TMP)/star-video" "$(TMP)/star-video.mp4" + MP4Box -raw-layer "1:output=$(TMP)/star-alpha" "$(TMP)/star-alpha.mp4" + + MP4Box -add-image "$(TMP)/star-alpha.av1:id=3:ref=auxl,4:alpha:name=Alpha" -add-image "$(TMP)/star-video.av1:id=4:name=Color" -set-primary 4 -ab avif -new $@ + MP4Box -add "$(TMP)/star-video.av1:hdlr=pict:ccst:name=\"GPAC avifs\"" -add "$(TMP)/star-alpha.av1:hdlr=auxv:ccst:alpha:name=\"GPAC avifs alpha\"" -ref 2:auxl:1 -ab msf1 -ab miaf -ab MA1B -brand avis $@ + rm -Rfv $(TMP) diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/README.md b/third_party/rust/mp4parse/link-u-avif-sample-images/README.md index 6b803ec823d0..3125518b98f2 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/README.md +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/README.md @@ -1,582 +1,582 @@ -# AVIF Example files. - -![Encode all images and decode them again weekly.](https://github.com/link-u/avif-sample-images/workflows/Encode%20all%20images%20and%20decode%20them%20again%20weekly./badge.svg) - -- All files do not contain Exif metadata. -- All files are tagged as MIAF compatible. -- All files are tagged as compatible with the AVIF Baseline or Advanced Profile if possible. -- All images have the "reduced_still_picture_header" and "still_picture" flags set to 1 in the AV1 Sequence Header. -- Most images are licensed under [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en), but some files are licensed different license. Please check. - -[Makefile](Makefile) describes how they were created. To generate files yourself, you have to install [cavif](https://github.com/link-u/cavif) and [davif](https://github.com/link-u/davif) - -## hato - -![hato.jpg](hato.jpg) - - - size: 3082x2048 - - License: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en) - - Author: Kaede Fujisaki ([@ledyba](https://github.com/ledyba)) - - Retrieved from [her website](https://hexe.net/2017/11/27/12:27:02/). - -### AVIF version - -#### YUV 420 - -| profile | bit depth | Monochrome | file | -|---------|-----------|------------|--------------------------------------------------| -| 0 | 8 | | [here](hato.profile0.8bpc.yuv420.avif) | -| 0 | 8 | YES | [here](hato.profile0.8bpc.yuv420.monochromeavif) | -| 0 | 10 | | [here](hato.profile0.10bpc.yuv420.avif) | -| 0 | 10 | YES | [here](hato.profile0.10bpc.yuv420.avif) | - -#### YUV422 - -| profile | bit depth | Monochrome | file | -|---------|-----------|------------|---------------------------------------------------| -| 2 | 8 | | [here](hato.profile2.8bpc.yuv422.avif) | -| 2 | 8 | YES | [here](hato.profile2.8bpc.yuv422.monochrome.avif) | -| 2 | 10 | | [here](hato.profile2.10bpc.yuv422.avif) | -| 2 | 10 | YES | [here](hato.profile2.10bpc.yuv422.avif) | -| 2 | 12 | | [here](hato.profile2.12bpc.yuv422.avif) | -| 2 | 12 | YES | [here](hato.profile2.12bpc.yuv422.avif) | - -#### URLS - -You can obtain this list with `make hato-url`. - -``` -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.10bpc.yuv420.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.10bpc.yuv420.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.8bpc.yuv420.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.8bpc.yuv420.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.10bpc.yuv422.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.10bpc.yuv422.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.12bpc.yuv422.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.12bpc.yuv422.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.8bpc.yuv422.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.8bpc.yuv422.monochrome.avif -``` - -## Kimono - Transformation tests - -[kimono.jpg](kimono.jpg) - - - size: 722x1024 - - License: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en) - - Authors: Momiji Jinzamomi([@momiji-san](https://github.com/momiji-san)) and Kaede Fujisaki ([@ledyba](https://github.com/ledyba)) - - Retrieved from [their website](https://hexe.net/2018/12/24/18:59:01/). - - -Test images for rotation(`irot`), mirroring(`imir`), cropping(`clap`). - -All AVIF images are encoded in these settings: - - - Profile 0 - - YUV420 - - 8 bits per component - -### FYI: Transform operation order - -[MIAF](https://www.iso.org/standard/74417.html) defines the transform operation order(p.16): - -> These properties, if used, shall be indicated to be applied in the following order: -> clean aperture first, then rotation, then mirror. - -### Identity - -[kimono.avif](./kimono.avif) - -No operation is applied. - -### Rotation 90 - -[kimono.rotate90.avif](./kimono.rotate90.avif) - -[Encoded image is rotated at 90 degree in counter-clockwise](kimono.rotate90.png), and marked to rotate it 270 degree in counter-clockwise when displaying. Thus, resulted image is as the same as the original. - -### Rotation 270 - -[kimono.rotate270.avif](./kimono.rotate270.avif) - -[Encoded image is rotated at 270 degree in counter-clockwise](kimono.rotate270.png), and marked to rotate it 90 degree in counter-clockwise when displaying. Thus, resulted image is as the same as the original. - - -### Mirroring horizontally - -[kimono.mirror-horizontal.avif](./kimono.mirror-horizontal.avif) - -[Encoded image is mirrored horizontally](kimono.mirror-horizontal.png), and marked to mirror it horizontally again when displaying. Thus, resulted image is as the same as the original. - -### Mirroring vertically - -[kimono.mirror-vertical.avif](./kimono.mirror-vertical.avif) - -Vertical version. Same as above. - -### Mirroring vertically + Rotating at 90 degrees. - -[kimono.mirror-vertical.rotate270.avif](./kimono.mirror-vertical.rotate270.avif) - -[Encoded image is mirrored vertically, then rorated at 90 degree in clockwise](kimono.mirror-vertical.rotate270.png), and marked to rotate it at 90 degree in counter-clockwise and then mirror it vertically when displaying. - -Thus, resulted image is as the same as the original. - -### Cropping - -[kimono.crop.avif](kimono.crop.avif) - -Displaying image will be cropped from the original image, using `CleanApertureBox`(See: ISO/IEC 14496-12:2015). - -Cropped under these condition: - - - cleanApertureWidthN: 385 - - cleanApertureWidthD: 1 - - cleanApertureHeightN: 330 - - cleanApertureHeightD: 1 - - horizOffN: 103 - - horizOffD: 1 - - vertOffN: -308 (This can be negative, as mensioned in ISO/IEC 14496-12:2015). - - vertOffD: 1 - -Resulted image should be: - -![kimono.crop.png](kimono.crop.png) - -### Cropping + Mirroring vertically + Rotating at 90 degrees. - -[kimono.mirror-vertical.rotate270.crop.avif](kimono.mirror-vertical.rotate270.crop.avif) - -[Encoded image is mirrored vertically, then rorated at 90 degree in clockwise](kimono.mirror-vertical.rotate270.png), and marked to crop it first, rotate it at 90 degree in counter-clockwise, and then mirror it vertically. - -Cropping condition is: - -- cleanApertureWidthN: 330 -- cleanApertureWidthD: 1 -- cleanApertureHeightN: 385 -- cleanApertureHeightD: 1 -- horizOffN: -308 -- horizOffD: 1 -- vertOffN: 103 -- vertOffD: 1 - -Resulted image should be as the same as above. - -![kimono.crop.png](kimono.crop.png) - -### URLS - -You can obtain this list with `make kimono-url`. - -``` -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.crop.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-horizontal.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-vertical.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-vertical.rotate270.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-vertical.rotate270.crop.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.rotate270.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.rotate90.avif -``` - -## Fox Parade - Odd dimensions images - -### Original - -[fox.jpg](fox.jpg) - - - size: 1204 x 800 - - License: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en) - - Author: Kaede Fujisaki ([@ledyba](https://github.com/ledyba)) - - Retrieved from [her website](https://hexe.net/2017/12/02/16:33:53/). - -#### Odd-Width - - - [fox.odd-width.png](fox.odd-width.png) - - size: 1203 x 800 - -#### Odd-Height - - - [fox.odd-height.png](fox.odd-height.png) - - size: 1204 x 799 - -#### Odd-Width x Odd-Height - - - [fox.odd-width.odd-height.png](fox.odd-width.odd-height.png) - - size: 1203 x 799 - -### AVIF version - -| profile | bit depth | pix fmt | Monochrome | odd width | odd height | file | -|---------|-----------|---------|------------|-----------|------------|------------------------------------------------------------------------| -| 0 | 8 | YUV420 | | | | [here](fox.profile0.8bpc.yuv420.avif) | -| 0 | 8 | YUV420 | | YES | | [here](fox.profile0.8bpc.yuv420.odd-width.avif) | -| 0 | 8 | YUV420 | | | YES | [here](fox.profile0.8bpc.yuv420.odd-height.avif) | -| 0 | 8 | YUV420 | | YES | YES | [here](fox.profile0.8bpc.yuv420.odd-width.odd-height.avif) | -| 0 | 8 | YUV420 | YES | | | [here](fox.profile0.8bpc.yuv420.monochrome.avif) | -| 0 | 8 | YUV420 | YES | YES | | [here](fox.profile0.8bpc.yuv420.monochrome.odd-width.avif) | -| 0 | 8 | YUV420 | YES | | YES | [here](fox.profile0.8bpc.yuv420.monochrome.odd-height.avif) | -| 0 | 8 | YUV420 | YES | YES | YES | [here](fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif) | -| 0 | 10 | YUV420 | | | | [here](fox.profile0.10bpc.yuv420.avif) | -| 0 | 10 | YUV420 | | YES | | [here](fox.profile0.10bpc.yuv420.odd-width.avif) | -| 0 | 10 | YUV420 | | | YES | [here](fox.profile0.10bpc.yuv420.odd-height.avif) | -| 0 | 10 | YUV420 | | YES | YES | [here](fox.profile0.10bpc.yuv420.odd-width.odd-height.avif) | -| 0 | 10 | YUV420 | YES | | | [here](fox.profile0.10bpc.yuv420.monochrome.avif) | -| 0 | 10 | YUV420 | YES | YES | | [here](fox.profile0.10bpc.yuv420.monochrome.odd-width.avif) | -| 0 | 10 | YUV420 | YES | | YES | [here](fox.profile0.10bpc.yuv420.monochrome.odd-height.avif) | -| 0 | 10 | YUV420 | YES | YES | YES | [here](fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif) | -| 2 | 12 | YUV420 | | | | [here](fox.profile2.12bpc.yuv420.avif) | -| 2 | 12 | YUV420 | | YES | | [here](fox.profile2.12bpc.yuv420.odd-width.avif) | -| 2 | 12 | YUV420 | | | YES | [here](fox.profile2.12bpc.yuv420.odd-height.avif) | -| 2 | 12 | YUV420 | | YES | YES | [here](fox.profile2.12bpc.yuv420.odd-width.odd-height.avif) | -| 2 | 12 | YUV420 | YES | | | [here](fox.profile2.12bpc.yuv420.monochrome.avif) | -| 2 | 12 | YUV420 | YES | YES | | [here](fox.profile2.12bpc.yuv420.monochrome.odd-width.avif) | -| 2 | 12 | YUV420 | YES | | YES | [here](fox.profile2.12bpc.yuv420.monochrome.odd-height.avif) | -| 2 | 12 | YUV420 | YES | YES | YES | [here](fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif) | -| 2 | 8 | YUV422 | | | | [here](fox.profile2.8bpc.yuv422.avif) | -| 2 | 8 | YUV422 | | YES | | [here](fox.profile2.8bpc.yuv422.odd-width.avif) | -| 2 | 8 | YUV422 | | | YES | [here](fox.profile2.8bpc.yuv422.odd-height.avif) | -| 2 | 8 | YUV422 | | YES | YES | [here](fox.profile2.8bpc.yuv422.odd-width.odd-height.avif) | -| 2 | 8 | YUV422 | YES | | | [here](fox.profile2.8bpc.yuv422.monochrome.avif) | -| 2 | 8 | YUV422 | YES | YES | | [here](fox.profile2.8bpc.yuv422.monochrome.odd-width.avif) | -| 2 | 8 | YUV422 | YES | | YES | [here](fox.profile2.8bpc.yuv422.monochrome.odd-height.avif) | -| 2 | 8 | YUV422 | YES | YES | YES | [here](fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif) | -| 2 | 10 | YUV422 | | | | [here](fox.profile2.10bpc.yuv422.avif) | -| 2 | 10 | YUV422 | | YES | | [here](fox.profile2.10bpc.yuv422.odd-width.avif) | -| 2 | 10 | YUV422 | | | YES | [here](fox.profile2.10bpc.yuv422.odd-height.avif) | -| 2 | 10 | YUV422 | | YES | YES | [here](fox.profile2.10bpc.yuv422.odd-width.odd-height.avif) | -| 2 | 10 | YUV422 | YES | | | [here](fox.profile2.10bpc.yuv422.monochrome.avif) | -| 2 | 10 | YUV422 | YES | YES | | [here](fox.profile2.10bpc.yuv422.monochrome.odd-width.avif) | -| 2 | 10 | YUV422 | YES | | YES | [here](fox.profile2.10bpc.yuv422.monochrome.odd-height.avif) | -| 2 | 10 | YUV422 | YES | YES | YES | [here](fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif) | -| 2 | 12 | YUV422 | | | | [here](fox.profile2.12bpc.yuv422.avif) | -| 2 | 12 | YUV422 | | YES | | [here](fox.profile2.12bpc.yuv422.odd-width.avif) | -| 2 | 12 | YUV422 | | | YES | [here](fox.profile2.12bpc.yuv422.odd-height.avif) | -| 2 | 12 | YUV422 | | YES | YES | [here](fox.profile2.12bpc.yuv422.odd-width.odd-height.avif) | -| 2 | 12 | YUV422 | YES | | | [here](fox.profile2.12bpc.yuv422.monochrome.avif) | -| 2 | 12 | YUV422 | YES | YES | | [here](fox.profile2.12bpc.yuv422.monochrome.odd-width.avif) | -| 2 | 12 | YUV422 | YES | | YES | [here](fox.profile2.12bpc.yuv422.monochrome.odd-height.avif) | -| 2 | 12 | YUV422 | YES | YES | YES | [here](fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif) | -| 1 | 8 | YUV444 | | | | [here](fox.profile1.8bpc.yuv444.avif) | -| 1 | 8 | YUV444 | | YES | | [here](fox.profile1.8bpc.yuv444.odd-width.avif) | -| 1 | 8 | YUV444 | | | YES | [here](fox.profile1.8bpc.yuv444.odd-height.avif) | -| 1 | 8 | YUV444 | | YES | YES | [here](fox.profile1.8bpc.yuv444.odd-width.odd-height.avif) | -| 1 | 10 | YUV444 | | | | [here](fox.profile1.10bpc.yuv444.avif) | -| 1 | 10 | YUV444 | | YES | | [here](fox.profile1.10bpc.yuv444.odd-width.avif) | -| 1 | 10 | YUV444 | | | YES | [here](fox.profile1.10bpc.yuv444.odd-height.avif) | -| 1 | 10 | YUV444 | | YES | YES | [here](fox.profile1.10bpc.yuv444.odd-width.odd-height.avif) | -| 2 | 12 | YUV444 | | | | [here](fox.profile2.12bpc.yuv444.avif) | -| 2 | 12 | YUV444 | | YES | | [here](fox.profile2.12bpc.yuv444.odd-width.avif) | -| 2 | 12 | YUV444 | | | YES | [here](fox.profile2.12bpc.yuv444.odd-height.avif) | -| 2 | 12 | YUV444 | | YES | YES | [here](fox.profile2.12bpc.yuv444.odd-width.odd-height.avif) | -| 2 | 12 | YUV444 | YES | | | [here](fox.profile2.12bpc.yuv444.monochrome.avif) | -| 2 | 12 | YUV444 | YES | YES | | [here](fox.profile2.12bpc.yuv444.monochrome.odd-width.avif) | -| 2 | 12 | YUV444 | YES | | YES | [here](fox.profile2.12bpc.yuv444.monochrome.odd-height.avif) | -| 2 | 12 | YUV444 | YES | YES | YES | [here](fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif) | - -### URLs - -You can obtain this list with `make fox-url`. - -``` -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.odd-height.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.odd-width.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.odd-width.odd-height.avif -``` -## Plum blossom - test images for alpha planes - -### Original (SVG) - -[![plum-blossom.svg](./plum-blossom.svg)](plum-blossom.svg) - - - License: [CC-BY](https://creativecommons.org/licenses/by/4.0/deed.en) - - Author: Ryo Hirafuji ([@ledyba-z](https://github.com/ledyba-z)) - -#### Large Version (PNG) - - - [plum-blossom-large.png](plum-blossom-large.png) - - size: 2048x2048 - -#### Small Version (PNG) - - - [plum-blossom-small.png](plum-blossom-small.png) - - size: 128x128 - -### AVIF version (Large Version) - -#### Limited-ranged alpha - -| profile | bit depth | pix fmt | Monochrome | alpha | file | -|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| -| 0 | 8 | YUV420 | | limited | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif) | -| 0 | 8 | YUV420 | YES | limited | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif) | -| 0 | 10 | YUV420 | | limited | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif) | -| 0 | 10 | YUV420 | YES | limited | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif) | -| 2 | 12 | YUV420 | | limited | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif) | -| 2 | 12 | YUV420 | YES | limited | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif) | -| 2 | 8 | YUV422 | | limited | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif) | -| 2 | 8 | YUV422 | YES | limited | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif) | -| 2 | 10 | YUV422 | | limited | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif) | -| 2 | 10 | YUV422 | YES | limited | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif) | -| 2 | 12 | YUV422 | | limited | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif) | -| 2 | 12 | YUV422 | YES | limited | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif) | -| 1 | 8 | YUV444 | | limited | [here](plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif) | -| 1 | 10 | YUV444 | | limited | [here](plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif) | -| 2 | 12 | YUV444 | | limited | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif) | -| 2 | 12 | YUV444 | YES | limited | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif) | - -#### Full-ranged alpha - -| profile | bit depth | pix fmt | Monochrome | alpha | file | -|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| -| 0 | 8 | YUV420 | | full | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif) | -| 0 | 8 | YUV420 | YES | full | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif) | -| 0 | 10 | YUV420 | | full | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif) | -| 0 | 10 | YUV420 | YES | full | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif) | -| 2 | 12 | YUV420 | | full | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif) | -| 2 | 12 | YUV420 | YES | full | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif) | -| 2 | 8 | YUV422 | | full | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif) | -| 2 | 8 | YUV422 | YES | full | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif) | -| 2 | 10 | YUV422 | | full | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif) | -| 2 | 10 | YUV422 | YES | full | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif) | -| 2 | 12 | YUV422 | | full | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif) | -| 2 | 12 | YUV422 | YES | full | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif) | -| 1 | 8 | YUV444 | | full | [here](plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif) | -| 1 | 10 | YUV444 | | full | [here](plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif) | -| 2 | 12 | YUV444 | | full | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif) | -| 2 | 12 | YUV444 | YES | full | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif) | - -### AVIF version (Small Version) - -#### Limited-ranged alpha - -| profile | bit depth | pix fmt | Monochrome | alpha | file | -|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| -| 0 | 8 | YUV420 | | limited | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif) | -| 0 | 8 | YUV420 | YES | limited | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif) | -| 0 | 10 | YUV420 | | limited | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif) | -| 0 | 10 | YUV420 | YES | limited | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif) | -| 2 | 12 | YUV420 | | limited | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif) | -| 2 | 12 | YUV420 | YES | limited | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif) | -| 2 | 8 | YUV422 | | limited | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif) | -| 2 | 8 | YUV422 | YES | limited | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif) | -| 2 | 10 | YUV422 | | limited | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif) | -| 2 | 10 | YUV422 | YES | limited | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif) | -| 2 | 12 | YUV422 | | limited | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif) | -| 2 | 12 | YUV422 | YES | limited | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif) | -| 1 | 8 | YUV444 | | limited | [here](plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif) | -| 1 | 10 | YUV444 | | limited | [here](plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif) | -| 2 | 12 | YUV444 | | limited | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif) | -| 2 | 12 | YUV444 | YES | limited | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif) | - -#### Full-ranged alpha - -| profile | bit depth | pix fmt | Monochrome | alpha | file | -|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| -| 0 | 8 | YUV420 | | full | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif) | -| 0 | 8 | YUV420 | YES | full | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif) | -| 0 | 10 | YUV420 | | full | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif) | -| 0 | 10 | YUV420 | YES | full | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif) | -| 2 | 12 | YUV420 | | full | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif) | -| 2 | 12 | YUV420 | YES | full | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif) | -| 2 | 8 | YUV422 | | full | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif) | -| 2 | 8 | YUV422 | YES | full | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif) | -| 2 | 10 | YUV422 | | full | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif) | -| 2 | 10 | YUV422 | YES | full | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif) | -| 2 | 12 | YUV422 | | full | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif) | -| 2 | 12 | YUV422 | YES | full | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif) | -| 1 | 8 | YUV444 | | full | [here](plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif) | -| 1 | 10 | YUV444 | | full | [here](plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif) | -| 2 | 12 | YUV444 | | full | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif) | -| 2 | 12 | YUV444 | YES | full | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif) | - -### URLs - -You can obtain this list with `make plum-url`. - -``` -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif -https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif -``` - -## Red at 12 o'clock with color profile - ICC Profile tests - -![red-at-12-oclock-with-color-profile.jpg](red-at-12-oclock-with-color-profile) - - - License: GNU LGPL v2.1 or 2 claused BSD License - - Author: Tony Payne - - [commit](https://chromium.googlesource.com/chromium/src/+/e89ab1941644ff34b262cac05f23e82b7e249377) - -### AVIF version - - - [red-at-12-oclock-with-color-profile-lossy.avif](red-at-12-oclock-with-color-profile-lossy.avif) - - [red-at-12-oclock-with-color-profile-8bpc.avif](red-at-12-oclock-with-color-profile-8bpc.avif) - - [red-at-12-oclock-with-color-profile-10bpc.avif](red-at-12-oclock-with-color-profile-10bpc.avif) - - [red-at-12-oclock-with-color-profile-12bpc.avif](red-at-12-oclock-with-color-profile-12bpc.avif) - -## Twinkle Star - Image Sequence Test - -[![star.gif](star.gif)](star.gif) - - - [AV1 mp4 version](star.mp4) - -### Original (SVG) - -[![star.svg](./star.svg)](star.svg) - - - License: [CC-BY](https://creativecommons.org/licenses/by/4.0/deed.en) - - Author: Ryo Hirafuji ([@ledyba-z](https://github.com/ledyba-z)) - - Special Thanks: [Shigatake's Pixel Art Lesson](http://shigatake.sakura.ne.jp/gallery/dot/dot_1.html) - -### AVIFS version - -#### Normal - -- [star-8bpc.avifs](star-8bpc.avifs) - - YUV420 - - full-ranged color -- [star-10bpc.avifs](star-10bpc.avifs) - - YUV422 - - full-ranged color -- [star-12bpc.avifs](star-12bpc.avifs) - - YUV444 - - full-ranged color - -- [star-8bpc-with-alpha.avifs](star-8bpc-with-alpha.avifs) - - YUV420 - - 8bit - - limited-ranged color - - limited-ranged alpha -- [star-8bpc-with-alpha.avifs](star-10bpc-with-alpha.avifs) - - YUV422 - - 10bit - - limited-ranged color - - limited-ranged alpha -- [star-8bpc-with-alpha.avifs](star-12bpc-with-alpha.avifs) - - YUV444 - - 12bit - - limited-ranged color - - limited-ranged alpha +# AVIF Example files. + +![Encode all images and decode them again weekly.](https://github.com/link-u/avif-sample-images/workflows/Encode%20all%20images%20and%20decode%20them%20again%20weekly./badge.svg) + +- All files do not contain Exif metadata. +- All files are tagged as MIAF compatible. +- All files are tagged as compatible with the AVIF Baseline or Advanced Profile if possible. +- All images have the "reduced_still_picture_header" and "still_picture" flags set to 1 in the AV1 Sequence Header. +- Most images are licensed under [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en), but some files are licensed different license. Please check. + +[Makefile](Makefile) describes how they were created. To generate files yourself, you have to install [cavif](https://github.com/link-u/cavif) and [davif](https://github.com/link-u/davif) + +## hato + +![hato.jpg](hato.jpg) + + - size: 3082x2048 + - License: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en) + - Author: Kaede Fujisaki ([@ledyba](https://github.com/ledyba)) + - Retrieved from [her website](https://hexe.net/2017/11/27/12:27:02/). + +### AVIF version + +#### YUV 420 + +| profile | bit depth | Monochrome | file | +|---------|-----------|------------|--------------------------------------------------| +| 0 | 8 | | [here](hato.profile0.8bpc.yuv420.avif) | +| 0 | 8 | YES | [here](hato.profile0.8bpc.yuv420.monochromeavif) | +| 0 | 10 | | [here](hato.profile0.10bpc.yuv420.avif) | +| 0 | 10 | YES | [here](hato.profile0.10bpc.yuv420.avif) | + +#### YUV422 + +| profile | bit depth | Monochrome | file | +|---------|-----------|------------|---------------------------------------------------| +| 2 | 8 | | [here](hato.profile2.8bpc.yuv422.avif) | +| 2 | 8 | YES | [here](hato.profile2.8bpc.yuv422.monochrome.avif) | +| 2 | 10 | | [here](hato.profile2.10bpc.yuv422.avif) | +| 2 | 10 | YES | [here](hato.profile2.10bpc.yuv422.avif) | +| 2 | 12 | | [here](hato.profile2.12bpc.yuv422.avif) | +| 2 | 12 | YES | [here](hato.profile2.12bpc.yuv422.avif) | + +#### URLS + +You can obtain this list with `make hato-url`. + +``` +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.10bpc.yuv420.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.10bpc.yuv420.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.8bpc.yuv420.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile0.8bpc.yuv420.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.10bpc.yuv422.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.10bpc.yuv422.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.12bpc.yuv422.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.12bpc.yuv422.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.8bpc.yuv422.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/hato.profile2.8bpc.yuv422.monochrome.avif +``` + +## Kimono - Transformation tests + +[kimono.jpg](kimono.jpg) + + - size: 722x1024 + - License: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en) + - Authors: Momiji Jinzamomi([@momiji-san](https://github.com/momiji-san)) and Kaede Fujisaki ([@ledyba](https://github.com/ledyba)) + - Retrieved from [their website](https://hexe.net/2018/12/24/18:59:01/). + + +Test images for rotation(`irot`), mirroring(`imir`), cropping(`clap`). + +All AVIF images are encoded in these settings: + + - Profile 0 + - YUV420 + - 8 bits per component + +### FYI: Transform operation order + +[MIAF](https://www.iso.org/standard/74417.html) defines the transform operation order(p.16): + +> These properties, if used, shall be indicated to be applied in the following order: +> clean aperture first, then rotation, then mirror. + +### Identity + +[kimono.avif](./kimono.avif) + +No operation is applied. + +### Rotation 90 + +[kimono.rotate90.avif](./kimono.rotate90.avif) + +[Encoded image is rotated at 90 degree in counter-clockwise](kimono.rotate90.png), and marked to rotate it 270 degree in counter-clockwise when displaying. Thus, resulted image is as the same as the original. + +### Rotation 270 + +[kimono.rotate270.avif](./kimono.rotate270.avif) + +[Encoded image is rotated at 270 degree in counter-clockwise](kimono.rotate270.png), and marked to rotate it 90 degree in counter-clockwise when displaying. Thus, resulted image is as the same as the original. + + +### Mirroring horizontally + +[kimono.mirror-horizontal.avif](./kimono.mirror-horizontal.avif) + +[Encoded image is mirrored horizontally](kimono.mirror-horizontal.png), and marked to mirror it horizontally again when displaying. Thus, resulted image is as the same as the original. + +### Mirroring vertically + +[kimono.mirror-vertical.avif](./kimono.mirror-vertical.avif) + +Vertical version. Same as above. + +### Mirroring vertically + Rotating at 90 degrees. + +[kimono.mirror-vertical.rotate270.avif](./kimono.mirror-vertical.rotate270.avif) + +[Encoded image is mirrored vertically, then rorated at 90 degree in clockwise](kimono.mirror-vertical.rotate270.png), and marked to rotate it at 90 degree in counter-clockwise and then mirror it vertically when displaying. + +Thus, resulted image is as the same as the original. + +### Cropping + +[kimono.crop.avif](kimono.crop.avif) + +Displaying image will be cropped from the original image, using `CleanApertureBox`(See: ISO/IEC 14496-12:2015). + +Cropped under these condition: + + - cleanApertureWidthN: 385 + - cleanApertureWidthD: 1 + - cleanApertureHeightN: 330 + - cleanApertureHeightD: 1 + - horizOffN: 103 + - horizOffD: 1 + - vertOffN: -308 (This can be negative, as mensioned in ISO/IEC 14496-12:2015). + - vertOffD: 1 + +Resulted image should be: + +![kimono.crop.png](kimono.crop.png) + +### Cropping + Mirroring vertically + Rotating at 90 degrees. + +[kimono.mirror-vertical.rotate270.crop.avif](kimono.mirror-vertical.rotate270.crop.avif) + +[Encoded image is mirrored vertically, then rorated at 90 degree in clockwise](kimono.mirror-vertical.rotate270.png), and marked to crop it first, rotate it at 90 degree in counter-clockwise, and then mirror it vertically. + +Cropping condition is: + +- cleanApertureWidthN: 330 +- cleanApertureWidthD: 1 +- cleanApertureHeightN: 385 +- cleanApertureHeightD: 1 +- horizOffN: -308 +- horizOffD: 1 +- vertOffN: 103 +- vertOffD: 1 + +Resulted image should be as the same as above. + +![kimono.crop.png](kimono.crop.png) + +### URLS + +You can obtain this list with `make kimono-url`. + +``` +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.crop.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-horizontal.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-vertical.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-vertical.rotate270.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.mirror-vertical.rotate270.crop.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.rotate270.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/kimono.rotate90.avif +``` + +## Fox Parade - Odd dimensions images + +### Original + +[fox.jpg](fox.jpg) + + - size: 1204 x 800 + - License: [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/deed.en) + - Author: Kaede Fujisaki ([@ledyba](https://github.com/ledyba)) + - Retrieved from [her website](https://hexe.net/2017/12/02/16:33:53/). + +#### Odd-Width + + - [fox.odd-width.png](fox.odd-width.png) + - size: 1203 x 800 + +#### Odd-Height + + - [fox.odd-height.png](fox.odd-height.png) + - size: 1204 x 799 + +#### Odd-Width x Odd-Height + + - [fox.odd-width.odd-height.png](fox.odd-width.odd-height.png) + - size: 1203 x 799 + +### AVIF version + +| profile | bit depth | pix fmt | Monochrome | odd width | odd height | file | +|---------|-----------|---------|------------|-----------|------------|------------------------------------------------------------------------| +| 0 | 8 | YUV420 | | | | [here](fox.profile0.8bpc.yuv420.avif) | +| 0 | 8 | YUV420 | | YES | | [here](fox.profile0.8bpc.yuv420.odd-width.avif) | +| 0 | 8 | YUV420 | | | YES | [here](fox.profile0.8bpc.yuv420.odd-height.avif) | +| 0 | 8 | YUV420 | | YES | YES | [here](fox.profile0.8bpc.yuv420.odd-width.odd-height.avif) | +| 0 | 8 | YUV420 | YES | | | [here](fox.profile0.8bpc.yuv420.monochrome.avif) | +| 0 | 8 | YUV420 | YES | YES | | [here](fox.profile0.8bpc.yuv420.monochrome.odd-width.avif) | +| 0 | 8 | YUV420 | YES | | YES | [here](fox.profile0.8bpc.yuv420.monochrome.odd-height.avif) | +| 0 | 8 | YUV420 | YES | YES | YES | [here](fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif) | +| 0 | 10 | YUV420 | | | | [here](fox.profile0.10bpc.yuv420.avif) | +| 0 | 10 | YUV420 | | YES | | [here](fox.profile0.10bpc.yuv420.odd-width.avif) | +| 0 | 10 | YUV420 | | | YES | [here](fox.profile0.10bpc.yuv420.odd-height.avif) | +| 0 | 10 | YUV420 | | YES | YES | [here](fox.profile0.10bpc.yuv420.odd-width.odd-height.avif) | +| 0 | 10 | YUV420 | YES | | | [here](fox.profile0.10bpc.yuv420.monochrome.avif) | +| 0 | 10 | YUV420 | YES | YES | | [here](fox.profile0.10bpc.yuv420.monochrome.odd-width.avif) | +| 0 | 10 | YUV420 | YES | | YES | [here](fox.profile0.10bpc.yuv420.monochrome.odd-height.avif) | +| 0 | 10 | YUV420 | YES | YES | YES | [here](fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif) | +| 2 | 12 | YUV420 | | | | [here](fox.profile2.12bpc.yuv420.avif) | +| 2 | 12 | YUV420 | | YES | | [here](fox.profile2.12bpc.yuv420.odd-width.avif) | +| 2 | 12 | YUV420 | | | YES | [here](fox.profile2.12bpc.yuv420.odd-height.avif) | +| 2 | 12 | YUV420 | | YES | YES | [here](fox.profile2.12bpc.yuv420.odd-width.odd-height.avif) | +| 2 | 12 | YUV420 | YES | | | [here](fox.profile2.12bpc.yuv420.monochrome.avif) | +| 2 | 12 | YUV420 | YES | YES | | [here](fox.profile2.12bpc.yuv420.monochrome.odd-width.avif) | +| 2 | 12 | YUV420 | YES | | YES | [here](fox.profile2.12bpc.yuv420.monochrome.odd-height.avif) | +| 2 | 12 | YUV420 | YES | YES | YES | [here](fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif) | +| 2 | 8 | YUV422 | | | | [here](fox.profile2.8bpc.yuv422.avif) | +| 2 | 8 | YUV422 | | YES | | [here](fox.profile2.8bpc.yuv422.odd-width.avif) | +| 2 | 8 | YUV422 | | | YES | [here](fox.profile2.8bpc.yuv422.odd-height.avif) | +| 2 | 8 | YUV422 | | YES | YES | [here](fox.profile2.8bpc.yuv422.odd-width.odd-height.avif) | +| 2 | 8 | YUV422 | YES | | | [here](fox.profile2.8bpc.yuv422.monochrome.avif) | +| 2 | 8 | YUV422 | YES | YES | | [here](fox.profile2.8bpc.yuv422.monochrome.odd-width.avif) | +| 2 | 8 | YUV422 | YES | | YES | [here](fox.profile2.8bpc.yuv422.monochrome.odd-height.avif) | +| 2 | 8 | YUV422 | YES | YES | YES | [here](fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif) | +| 2 | 10 | YUV422 | | | | [here](fox.profile2.10bpc.yuv422.avif) | +| 2 | 10 | YUV422 | | YES | | [here](fox.profile2.10bpc.yuv422.odd-width.avif) | +| 2 | 10 | YUV422 | | | YES | [here](fox.profile2.10bpc.yuv422.odd-height.avif) | +| 2 | 10 | YUV422 | | YES | YES | [here](fox.profile2.10bpc.yuv422.odd-width.odd-height.avif) | +| 2 | 10 | YUV422 | YES | | | [here](fox.profile2.10bpc.yuv422.monochrome.avif) | +| 2 | 10 | YUV422 | YES | YES | | [here](fox.profile2.10bpc.yuv422.monochrome.odd-width.avif) | +| 2 | 10 | YUV422 | YES | | YES | [here](fox.profile2.10bpc.yuv422.monochrome.odd-height.avif) | +| 2 | 10 | YUV422 | YES | YES | YES | [here](fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif) | +| 2 | 12 | YUV422 | | | | [here](fox.profile2.12bpc.yuv422.avif) | +| 2 | 12 | YUV422 | | YES | | [here](fox.profile2.12bpc.yuv422.odd-width.avif) | +| 2 | 12 | YUV422 | | | YES | [here](fox.profile2.12bpc.yuv422.odd-height.avif) | +| 2 | 12 | YUV422 | | YES | YES | [here](fox.profile2.12bpc.yuv422.odd-width.odd-height.avif) | +| 2 | 12 | YUV422 | YES | | | [here](fox.profile2.12bpc.yuv422.monochrome.avif) | +| 2 | 12 | YUV422 | YES | YES | | [here](fox.profile2.12bpc.yuv422.monochrome.odd-width.avif) | +| 2 | 12 | YUV422 | YES | | YES | [here](fox.profile2.12bpc.yuv422.monochrome.odd-height.avif) | +| 2 | 12 | YUV422 | YES | YES | YES | [here](fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif) | +| 1 | 8 | YUV444 | | | | [here](fox.profile1.8bpc.yuv444.avif) | +| 1 | 8 | YUV444 | | YES | | [here](fox.profile1.8bpc.yuv444.odd-width.avif) | +| 1 | 8 | YUV444 | | | YES | [here](fox.profile1.8bpc.yuv444.odd-height.avif) | +| 1 | 8 | YUV444 | | YES | YES | [here](fox.profile1.8bpc.yuv444.odd-width.odd-height.avif) | +| 1 | 10 | YUV444 | | | | [here](fox.profile1.10bpc.yuv444.avif) | +| 1 | 10 | YUV444 | | YES | | [here](fox.profile1.10bpc.yuv444.odd-width.avif) | +| 1 | 10 | YUV444 | | | YES | [here](fox.profile1.10bpc.yuv444.odd-height.avif) | +| 1 | 10 | YUV444 | | YES | YES | [here](fox.profile1.10bpc.yuv444.odd-width.odd-height.avif) | +| 2 | 12 | YUV444 | | | | [here](fox.profile2.12bpc.yuv444.avif) | +| 2 | 12 | YUV444 | | YES | | [here](fox.profile2.12bpc.yuv444.odd-width.avif) | +| 2 | 12 | YUV444 | | | YES | [here](fox.profile2.12bpc.yuv444.odd-height.avif) | +| 2 | 12 | YUV444 | | YES | YES | [here](fox.profile2.12bpc.yuv444.odd-width.odd-height.avif) | +| 2 | 12 | YUV444 | YES | | | [here](fox.profile2.12bpc.yuv444.monochrome.avif) | +| 2 | 12 | YUV444 | YES | YES | | [here](fox.profile2.12bpc.yuv444.monochrome.odd-width.avif) | +| 2 | 12 | YUV444 | YES | | YES | [here](fox.profile2.12bpc.yuv444.monochrome.odd-height.avif) | +| 2 | 12 | YUV444 | YES | YES | YES | [here](fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif) | + +### URLs + +You can obtain this list with `make fox-url`. + +``` +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.10bpc.yuv420.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile0.8bpc.yuv420.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.8bpc.yuv444.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.10bpc.yuv422.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv420.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv422.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.12bpc.yuv444.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.odd-height.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.odd-width.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile2.8bpc.yuv422.odd-width.odd-height.avif +``` +## Plum blossom - test images for alpha planes + +### Original (SVG) + +[![plum-blossom.svg](./plum-blossom.svg)](plum-blossom.svg) + + - License: [CC-BY](https://creativecommons.org/licenses/by/4.0/deed.en) + - Author: Ryo Hirafuji ([@ledyba-z](https://github.com/ledyba-z)) + +#### Large Version (PNG) + + - [plum-blossom-large.png](plum-blossom-large.png) + - size: 2048x2048 + +#### Small Version (PNG) + + - [plum-blossom-small.png](plum-blossom-small.png) + - size: 128x128 + +### AVIF version (Large Version) + +#### Limited-ranged alpha + +| profile | bit depth | pix fmt | Monochrome | alpha | file | +|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| +| 0 | 8 | YUV420 | | limited | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif) | +| 0 | 8 | YUV420 | YES | limited | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif) | +| 0 | 10 | YUV420 | | limited | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif) | +| 0 | 10 | YUV420 | YES | limited | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif) | +| 2 | 12 | YUV420 | | limited | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif) | +| 2 | 12 | YUV420 | YES | limited | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif) | +| 2 | 8 | YUV422 | | limited | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif) | +| 2 | 8 | YUV422 | YES | limited | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif) | +| 2 | 10 | YUV422 | | limited | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif) | +| 2 | 10 | YUV422 | YES | limited | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif) | +| 2 | 12 | YUV422 | | limited | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif) | +| 2 | 12 | YUV422 | YES | limited | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif) | +| 1 | 8 | YUV444 | | limited | [here](plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif) | +| 1 | 10 | YUV444 | | limited | [here](plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif) | +| 2 | 12 | YUV444 | | limited | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif) | +| 2 | 12 | YUV444 | YES | limited | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif) | + +#### Full-ranged alpha + +| profile | bit depth | pix fmt | Monochrome | alpha | file | +|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| +| 0 | 8 | YUV420 | | full | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif) | +| 0 | 8 | YUV420 | YES | full | [here](plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif) | +| 0 | 10 | YUV420 | | full | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif) | +| 0 | 10 | YUV420 | YES | full | [here](plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif) | +| 2 | 12 | YUV420 | | full | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif) | +| 2 | 12 | YUV420 | YES | full | [here](plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif) | +| 2 | 8 | YUV422 | | full | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif) | +| 2 | 8 | YUV422 | YES | full | [here](plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif) | +| 2 | 10 | YUV422 | | full | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif) | +| 2 | 10 | YUV422 | YES | full | [here](plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif) | +| 2 | 12 | YUV422 | | full | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif) | +| 2 | 12 | YUV422 | YES | full | [here](plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif) | +| 1 | 8 | YUV444 | | full | [here](plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif) | +| 1 | 10 | YUV444 | | full | [here](plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif) | +| 2 | 12 | YUV444 | | full | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif) | +| 2 | 12 | YUV444 | YES | full | [here](plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif) | + +### AVIF version (Small Version) + +#### Limited-ranged alpha + +| profile | bit depth | pix fmt | Monochrome | alpha | file | +|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| +| 0 | 8 | YUV420 | | limited | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif) | +| 0 | 8 | YUV420 | YES | limited | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif) | +| 0 | 10 | YUV420 | | limited | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif) | +| 0 | 10 | YUV420 | YES | limited | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif) | +| 2 | 12 | YUV420 | | limited | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif) | +| 2 | 12 | YUV420 | YES | limited | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif) | +| 2 | 8 | YUV422 | | limited | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif) | +| 2 | 8 | YUV422 | YES | limited | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif) | +| 2 | 10 | YUV422 | | limited | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif) | +| 2 | 10 | YUV422 | YES | limited | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif) | +| 2 | 12 | YUV422 | | limited | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif) | +| 2 | 12 | YUV422 | YES | limited | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif) | +| 1 | 8 | YUV444 | | limited | [here](plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif) | +| 1 | 10 | YUV444 | | limited | [here](plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif) | +| 2 | 12 | YUV444 | | limited | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif) | +| 2 | 12 | YUV444 | YES | limited | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif) | + +#### Full-ranged alpha + +| profile | bit depth | pix fmt | Monochrome | alpha | file | +|---------|-----------|---------|------------|-------- |--------------------------------------------------------------------------------| +| 0 | 8 | YUV420 | | full | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif) | +| 0 | 8 | YUV420 | YES | full | [here](plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif) | +| 0 | 10 | YUV420 | | full | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif) | +| 0 | 10 | YUV420 | YES | full | [here](plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif) | +| 2 | 12 | YUV420 | | full | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif) | +| 2 | 12 | YUV420 | YES | full | [here](plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif) | +| 2 | 8 | YUV422 | | full | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif) | +| 2 | 8 | YUV422 | YES | full | [here](plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif) | +| 2 | 10 | YUV422 | | full | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif) | +| 2 | 10 | YUV422 | YES | full | [here](plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif) | +| 2 | 12 | YUV422 | | full | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif) | +| 2 | 12 | YUV422 | YES | full | [here](plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif) | +| 1 | 8 | YUV444 | | full | [here](plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif) | +| 1 | 10 | YUV444 | | full | [here](plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif) | +| 2 | 12 | YUV444 | | full | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif) | +| 2 | 12 | YUV444 | YES | full | [here](plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif) | + +### URLs + +You can obtain this list with `make plum-url`. + +``` +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif +https://raw.githubusercontent.com/link-u/avif-sample-images/master/plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif +``` + +## Red at 12 o'clock with color profile - ICC Profile tests + +![red-at-12-oclock-with-color-profile.jpg](red-at-12-oclock-with-color-profile) + + - License: GNU LGPL v2.1 or 2 claused BSD License + - Author: Tony Payne + - [commit](https://chromium.googlesource.com/chromium/src/+/e89ab1941644ff34b262cac05f23e82b7e249377) + +### AVIF version + + - [red-at-12-oclock-with-color-profile-lossy.avif](red-at-12-oclock-with-color-profile-lossy.avif) + - [red-at-12-oclock-with-color-profile-8bpc.avif](red-at-12-oclock-with-color-profile-8bpc.avif) + - [red-at-12-oclock-with-color-profile-10bpc.avif](red-at-12-oclock-with-color-profile-10bpc.avif) + - [red-at-12-oclock-with-color-profile-12bpc.avif](red-at-12-oclock-with-color-profile-12bpc.avif) + +## Twinkle Star - Image Sequence Test + +[![star.gif](star.gif)](star.gif) + + - [AV1 mp4 version](star.mp4) + +### Original (SVG) + +[![star.svg](./star.svg)](star.svg) + + - License: [CC-BY](https://creativecommons.org/licenses/by/4.0/deed.en) + - Author: Ryo Hirafuji ([@ledyba-z](https://github.com/ledyba-z)) + - Special Thanks: [Shigatake's Pixel Art Lesson](http://shigatake.sakura.ne.jp/gallery/dot/dot_1.html) + +### AVIFS version + +#### Normal + +- [star-8bpc.avifs](star-8bpc.avifs) + - YUV420 + - full-ranged color +- [star-10bpc.avifs](star-10bpc.avifs) + - YUV422 + - full-ranged color +- [star-12bpc.avifs](star-12bpc.avifs) + - YUV444 + - full-ranged color + +- [star-8bpc-with-alpha.avifs](star-8bpc-with-alpha.avifs) + - YUV420 + - 8bit + - limited-ranged color + - limited-ranged alpha +- [star-8bpc-with-alpha.avifs](star-10bpc-with-alpha.avifs) + - YUV422 + - 10bit + - limited-ranged color + - limited-ranged alpha +- [star-8bpc-with-alpha.avifs](star-12bpc-with-alpha.avifs) + - YUV444 + - 12bit + - limited-ranged color + - limited-ranged alpha diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/images.html b/third_party/rust/mp4parse/link-u-avif-sample-images/images.html index e5a69ae6db44..c4ea99f86f78 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/images.html +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/images.html @@ -1,745 +1,745 @@ - - - - All images - - -

AVIF images

-

hato.profile2.8bpc.yuv422.avif

-

PNG version

- -

AVIF version

- -

hato.profile2.8bpc.yuv422.monochrome.avif

-

PNG version

- -

AVIF version

- -

hato.profile2.10bpc.yuv422.avif

-

PNG version

- -

AVIF version

- -

hato.profile2.10bpc.yuv422.monochrome.avif

-

PNG version

- -

AVIF version

- -

hato.profile2.12bpc.yuv422.avif

-

PNG version

- -

AVIF version

- -

hato.profile2.12bpc.yuv422.monochrome.avif

-

PNG version

- -

AVIF version

- -

hato.profile0.8bpc.yuv420.avif

-

PNG version

- -

AVIF version

- -

hato.profile0.8bpc.yuv420.monochrome.avif

-

PNG version

- -

AVIF version

- -

hato.profile0.10bpc.yuv420.avif

-

PNG version

- -

AVIF version

- -

hato.profile0.10bpc.yuv420.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.monochrome.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.monochrome.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.monochrome.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.monochrome.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.monochrome.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.monochrome.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.monochrome.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.monochrome.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.monochrome.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.monochrome.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.monochrome.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.monochrome.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.8bpc.yuv444.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.8bpc.yuv444.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.8bpc.yuv444.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.8bpc.yuv444.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.10bpc.yuv444.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.10bpc.yuv444.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.10bpc.yuv444.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile1.10bpc.yuv444.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.monochrome.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.monochrome.odd-width.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.monochrome.odd-height.avif

-

PNG version

- -

AVIF version

- -

fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif

-

PNG version

- -

AVIF version

- -

plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif

-

PNG version

- -

AVIF version

- -

kimono.avif

-

PNG version

- -

AVIF version

- -

kimono.rotate90.avif

-

PNG version

- -

AVIF version

- -

kimono.rotate270.avif

-

PNG version

- -

AVIF version

- -

kimono.mirror-horizontal.avif

-

PNG version

- -

AVIF version

- -

kimono.mirror-vertical.rotate270.avif

-

PNG version

- -

AVIF version

- -

kimono.crop.avif

-

PNG version

- -

AVIF version

- -

kimono.mirror-vertical.rotate270.crop.avif

-

PNG version

- -

AVIF version

- -

AVIFS images

-

star.avifs

-

GIF version

- -

AVIFS version (without alpha)

- -

star-with-alpha.avifs

-

GIF version

- -

AVIFS version (with alpha)

- - - + + + + All images + + +

AVIF images

+

hato.profile2.8bpc.yuv422.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile2.8bpc.yuv422.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile2.10bpc.yuv422.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile2.10bpc.yuv422.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile2.12bpc.yuv422.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile2.12bpc.yuv422.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile0.8bpc.yuv420.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile0.8bpc.yuv420.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile0.10bpc.yuv420.avif

+

PNG version

+ +

AVIF version

+ +

hato.profile0.10bpc.yuv420.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.monochrome.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.monochrome.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.8bpc.yuv420.monochrome.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.monochrome.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.monochrome.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile0.10bpc.yuv420.monochrome.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.monochrome.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.monochrome.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv420.monochrome.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.monochrome.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.monochrome.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.8bpc.yuv422.monochrome.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.monochrome.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.monochrome.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.10bpc.yuv422.monochrome.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.monochrome.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.monochrome.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv422.monochrome.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.8bpc.yuv444.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.8bpc.yuv444.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.8bpc.yuv444.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.8bpc.yuv444.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.10bpc.yuv444.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.10bpc.yuv444.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.10bpc.yuv444.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile1.10bpc.yuv444.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.monochrome.odd-width.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.monochrome.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

fox.profile2.12bpc.yuv444.monochrome.odd-width.odd-height.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.8bpc.yuv420.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.8bpc.yuv420.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.8bpc.yuv420.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv420.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv420.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv420.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.8bpc.yuv422.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.8bpc.yuv422.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.8bpc.yuv422.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.10bpc.yuv422.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.10bpc.yuv422.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.10bpc.yuv422.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv422.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv422.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv422.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile1.8bpc.yuv444.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile1.8bpc.yuv444.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile1.10bpc.yuv444.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile1.10bpc.yuv444.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv444.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv444.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-large.profile2.12bpc.yuv444.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.8bpc.yuv420.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.8bpc.yuv420.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.8bpc.yuv420.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.10bpc.yuv420.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.10bpc.yuv420.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile0.10bpc.yuv420.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv420.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv420.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv420.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.8bpc.yuv422.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.8bpc.yuv422.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.8bpc.yuv422.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.10bpc.yuv422.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.10bpc.yuv422.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.10bpc.yuv422.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv422.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv422.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv422.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile1.8bpc.yuv444.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile1.8bpc.yuv444.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile1.10bpc.yuv444.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile1.10bpc.yuv444.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv444.alpha-limited.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv444.alpha-full.avif

+

PNG version

+ +

AVIF version

+ +

plum-blossom-small.profile2.12bpc.yuv444.alpha-full.monochrome.avif

+

PNG version

+ +

AVIF version

+ +

kimono.avif

+

PNG version

+ +

AVIF version

+ +

kimono.rotate90.avif

+

PNG version

+ +

AVIF version

+ +

kimono.rotate270.avif

+

PNG version

+ +

AVIF version

+ +

kimono.mirror-horizontal.avif

+

PNG version

+ +

AVIF version

+ +

kimono.mirror-vertical.rotate270.avif

+

PNG version

+ +

AVIF version

+ +

kimono.crop.avif

+

PNG version

+ +

AVIF version

+ +

kimono.mirror-vertical.rotate270.crop.avif

+

PNG version

+ +

AVIF version

+ +

AVIFS images

+

star.avifs

+

GIF version

+ +

AVIFS version (without alpha)

+ +

star-with-alpha.avifs

+

GIF version

+ +

AVIFS version (with alpha)

+ + + diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/plum-blossom.svg b/third_party/rust/mp4parse/link-u-avif-sample-images/plum-blossom.svg index e6b9b07f2f6d..561310bc0bf9 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/plum-blossom.svg +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/plum-blossom.svg @@ -1,176 +1,176 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/scripts/compare.sh b/third_party/rust/mp4parse/link-u-avif-sample-images/scripts/compare.sh index 513d19fd2b2f..34b72019d4a6 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/scripts/compare.sh +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/scripts/compare.sh @@ -1,23 +1,23 @@ -##!/usr/bin/env bash - -avif=$2 -decoded=$3 - -orig=$(cat Makefile | grep "^${avif}" | sed "s/^${avif}: \(.*\)$/\1/") - -if (echo ${avif} | grep "monochrome"); then - # FIMXE(ledyba-z): compare monochrome images. - score="100.0" -elif (echo ${avif} | grep "\(rotate\|mirror\|crop\)"); then - # FIMXE(ledyba-z): compare transformed images - score="100.0" -else - score=$(compare -metric PSNR ${orig} ${decoded} NULL: 2>&1 || true) -fi -if test $(echo "${score} >= 35.0" | bc -l) -eq 1; then - echo "Passing: ${decoded}: ${score}" - exit 0 -else - echo "Failed: ${decoded}: ${score} (vs ${orig})" - exit -1 -fi +##!/usr/bin/env bash + +avif=$2 +decoded=$3 + +orig=$(cat Makefile | grep "^${avif}" | sed "s/^${avif}: \(.*\)$/\1/") + +if (echo ${avif} | grep "monochrome"); then + # FIMXE(ledyba-z): compare monochrome images. + score="100.0" +elif (echo ${avif} | grep "\(rotate\|mirror\|crop\)"); then + # FIMXE(ledyba-z): compare transformed images + score="100.0" +else + score=$(compare -metric PSNR ${orig} ${decoded} NULL: 2>&1 || true) +fi +if test $(echo "${score} >= 35.0" | bc -l) -eq 1; then + echo "Passing: ${decoded}: ${score}" + exit 0 +else + echo "Failed: ${decoded}: ${score} (vs ${orig})" + exit -1 +fi diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/star.input.txt b/third_party/rust/mp4parse/link-u-avif-sample-images/star.input.txt index ce797225f603..93d691e5079f 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/star.input.txt +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/star.input.txt @@ -1,9 +1,9 @@ -file 'star.png' -duration 0.1 -file 'star90.png' -duration 0.1 -file 'star180.png' -duration 0.1 -file 'star270.png' -duration 0.1 -file 'star.png' +file 'star.png' +duration 0.1 +file 'star90.png' +duration 0.1 +file 'star180.png' +duration 0.1 +file 'star270.png' +duration 0.1 +file 'star.png' diff --git a/third_party/rust/mp4parse/link-u-avif-sample-images/star.svg b/third_party/rust/mp4parse/link-u-avif-sample-images/star.svg index 8bca22a42055..e1352bc0bffa 100644 --- a/third_party/rust/mp4parse/link-u-avif-sample-images/star.svg +++ b/third_party/rust/mp4parse/link-u-avif-sample-images/star.svg @@ -1,83 +1,83 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/third_party/rust/mp4parse/src/boxes.rs b/third_party/rust/mp4parse/src/boxes.rs index ef4ba658e208..838df5db1940 100644 --- a/third_party/rust/mp4parse/src/boxes.rs +++ b/third_party/rust/mp4parse/src/boxes.rs @@ -15,7 +15,7 @@ struct String; macro_rules! box_database { ($($(#[$attr:meta])* $boxenum:ident $boxtype:expr),*,) => { - #[derive(Clone, Copy, PartialEq)] + #[derive(Clone, Copy, PartialEq, Eq)] pub enum BoxType { $($(#[$attr])* $boxenum),*, UnknownBox(u32), @@ -110,6 +110,8 @@ box_database!( MovieHeaderBox 0x6d76_6864, // "mvhd" TrackBox 0x7472_616b, // "trak" TrackHeaderBox 0x746b_6864, // "tkhd" + TrackReferenceBox 0x7472_6566, // "tref" + AuxiliaryBox 0x6175_786C, // "auxl" EditBox 0x6564_7473, // "edts" MediaBox 0x6d64_6961, // "mdia" EditListBox 0x656c_7374, // "elst" diff --git a/third_party/rust/mp4parse/src/lib.rs b/third_party/rust/mp4parse/src/lib.rs index b5852dc7e695..290ff61ee432 100644 --- a/third_party/rust/mp4parse/src/lib.rs +++ b/third_party/rust/mp4parse/src/lib.rs @@ -35,7 +35,7 @@ use std::io::{Read, Take}; mod macros; mod boxes; -use boxes::{BoxType, FourCC}; +use crate::boxes::{BoxType, FourCC}; // Unit tests. #[cfg(test)] @@ -137,6 +137,7 @@ impl<'a, T> Offset for OffsetReader<'a, T> { impl<'a, T: Read> Read for OffsetReader<'a, T> { fn read(&mut self, buf: &mut [u8]) -> std::io::Result { let bytes_read = self.reader.read(buf)?; + trace!("Read {} bytes at offset {}", bytes_read, self.offset); self.offset = self .offset .checked_add(bytes_read.to_u64()) @@ -164,7 +165,7 @@ struct String; /// Any detail that needs to be communicated to the caller must be encoded here /// since the [`Error`] type's associated data is part of the FFI. #[repr(C)] -#[derive(Clone, Copy, PartialEq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug)] pub enum Status { Ok = 0, BadArg = 1, @@ -173,25 +174,108 @@ pub enum Status { Eof = 4, Io = 5, Oom = 6, - MissingBrand, - FtypNotFirst, - NoImage, - MultipleMoov, - NoMoov, - LselNoEssential, - A1opNoEssential, A1lxEssential, - TxformNoEssential, - NoPrimaryItem, - ImageItemType, - ItemTypeMissing, + A1opNoEssential, + AlacBadMagicCookieSize, + AlacFlagsNonzero, + Av1cMissing, + BitReaderError, + BoxBadSize, + BoxBadWideSize, + CheckParserStateErr, + ColrBadQuantity, + ColrBadSize, + ColrBadType, + ColrReservedNonzero, ConstructionMethod, - ItemLocNotFound, - NoItemDataBox, + CttsBadSize, + CttsBadVersion, + DflaBadMetadataBlockSize, + DflaFlagsNonzero, + DflaMissingMetadata, + DflaStreamInfoBadSize, + DflaStreamInfoNotFirst, + DopsChannelMappingWriteErr, + DopsOpusHeadWriteErr, + ElstBadVersion, + EsdsBadAudioSampleEntry, + EsdsBadDescriptor, + EsdsDecSpecificIntoTagQuantity, + FtypBadSize, + FtypNotFirst, + HdlrNameMultipleNul, + HdlrNameNoNul, + HdlrNameNotUtf8, + HdlrNotFirst, + HdlrPredefinedNonzero, + HdlrReservedNonzero, + HdlrTypeNotPict, + HdlrUnsupportedVersion, + HdrlBadQuantity, + IdatBadQuantity, + IdatMissing, + IinfBadChild, + IinfBadQuantity, + IlocBadConstructionMethod, + IlocBadExtent, + IlocBadExtentCount, + IlocBadFieldSize, + IlocBadQuantity, + IlocBadSize, + IlocDuplicateItemId, + IlocMissing, + IlocNotFound, + IlocOffsetOverflow, + ImageItemType, + InfeFlagsNonzero, + InvalidUtf8, + IpcoIndexOverflow, + IpmaBadIndex, + IpmaBadItemOrder, + IpmaBadQuantity, + IpmaBadVersion, + IpmaDuplicateItemId, + IpmaFlagsNonzero, + IpmaIndexZeroNoEssential, + IpmaTooBig, + IpmaTooSmall, + IprpBadChild, + IprpBadQuantity, + IprpConflict, + IrefBadQuantity, + IrefRecursion, + IspeMissing, + ItemTypeMissing, + LselNoEssential, + MdhdBadTimescale, + MdhdBadVersion, + MehdBadVersion, + MetaBadQuantity, + MissingAvifOrAvisBrand, + MissingMif1Brand, + MoovBadQuantity, + MoovMissing, + MultipleAlpha, + MvhdBadTimescale, + MvhdBadVersion, + NoImage, + PitmBadQuantity, + PitmMissing, + PixiBadChannelCount, + PixiMissing, + PsshSizeOverflow, + ReadBufErr, + SchiQuantity, + StsdBadAudioSampleEntry, + StsdBadVideoSampleEntry, + TkhdBadVersion, + TxformBeforeIspe, + TxformNoEssential, + TxformOrder, } #[repr(C)] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Feature { A1lx, A1op, @@ -215,19 +299,14 @@ impl Feature { match self { Self::Auxc | Self::Av1c + | Self::Avis | Self::Colr | Self::Imir | Self::Irot | Self::Ispe | Self::Pasp | Self::Pixi => true, - Self::A1lx - | Self::A1op - | Self::Clap - | Self::Grid - | Self::Ipro - | Self::Lsel - | Self::Avis => false, + Self::A1lx | Self::A1op | Self::Clap | Self::Grid | Self::Ipro | Self::Lsel => false, } } } @@ -300,17 +379,15 @@ impl UnsupportedFeatures { impl From for Result { /// A convenience method to enable shortcuts like /// ``` - /// # extern crate mp4parse; /// # use mp4parse::{Result,Status}; /// # let _: Result<()> = - /// Status::MissingBrand.into(); + /// Status::MissingAvifOrAvisBrand.into(); /// ``` /// instead of /// ``` - /// # extern crate mp4parse; /// # use mp4parse::{Error,Result,Status}; /// # let _: Result<()> = - /// Err(Error::from(Status::MissingBrand)); + /// Err(Error::from(Status::MissingAvifOrAvisBrand)); /// ``` /// Note that `Status::Ok` can't be supported this way and will panic. fn from(parse_status: Status) -> Self { @@ -333,23 +410,9 @@ impl From for Error { | Status::Eof | Status::Io | Status::Oom => { - panic!("Status -> Error is only for Status:InvalidDataDetail errors") + panic!("Status -> Error is only for Status:InvalidData errors") } - Status::MissingBrand - | Status::FtypNotFirst - | Status::NoImage - | Status::MultipleMoov - | Status::NoMoov - | Status::LselNoEssential - | Status::A1opNoEssential - | Status::A1lxEssential - | Status::TxformNoEssential - | Status::NoPrimaryItem - | Status::ImageItemType - | Status::ItemTypeMissing - | Status::ConstructionMethod - | Status::ItemLocNotFound - | Status::NoItemDataBox => Self::InvalidDataDetail(parse_status), + _ => Self::InvalidData(parse_status), } } } @@ -366,37 +429,346 @@ impl From for &str { | Status::Oom => { panic!("Status -> Error is only for specific parsing errors") } - Status::MissingBrand => { - "The file shall list 'avif' or 'avis' in the compatible_brands field - of the FileTypeBox \ - per https://aomediacodec.github.io/av1-avif/#file-constraints" - } - Status::FtypNotFirst => { - "The FileTypeBox shall be placed as early as possible in the file \ - per ISOBMFF (ISO 14496-12:2020) § 4.3.1" - } - Status::NoImage => "No primary image or image sequence found", - Status::NoMoov => { - "No moov box found; \ - files with avis or msf1 brands shall contain exactly one moov box \ - per ISOBMFF (ISO 14496-12:2020) § 8.2.1.1" - } - Status::MultipleMoov => { - "Multiple moov boxes found; \ - files with avis or msf1 brands shall contain exactly one moov box \ - per ISOBMFF (ISO 14496-12:2020) § 8.2.1.1" - } - Status::LselNoEssential => { - "LayerSelectorProperty (lsel) shall be marked as essential \ - per HEIF (ISO/IEC 23008-12:2017) § 6.5.11.1" + Status::A1lxEssential => { + "AV1LayeredImageIndexingProperty (a1lx) shall not be marked as essential \ + per https://aomediacodec.github.io/av1-avif/#layered-image-indexing-property-description" } Status::A1opNoEssential => { "OperatingPointSelectorProperty (a1op) shall be marked as essential \ per https://aomediacodec.github.io/av1-avif/#operating-point-selector-property-description" } - Status::A1lxEssential => { - "AV1LayeredImageIndexingProperty (a1lx) shall not be marked as essential \ - per https://aomediacodec.github.io/av1-avif/#layered-image-indexing-property-description" + Status::AlacBadMagicCookieSize => { + "ALACSpecificBox magic cookie is the wrong size" + } + Status::AlacFlagsNonzero => { + "no-zero alac (ALAC) flags" + } + Status::Av1cMissing => { + "One AV1 Item Configuration Property (av1C) is mandatory for an \ + image item of type 'av01' \ + per AVIF specification § 2.2.1" + } + Status::BitReaderError => { + "Bitwise read failed" + } + Status::BoxBadSize => { + "malformed size" + } + Status::BoxBadWideSize => { + "malformed wide size" + } + Status::CheckParserStateErr => { + "unread box content or bad parser sync" + } + Status::ColrBadQuantity => { + "Each item shall have at most one property association with a + ColourInformationBox (colr) for a given value of colour_type \ + per HEIF (ISO/IEC DIS 23008-12) § 6.5.5.1" + } + Status::ColrBadSize => { + "Unexpected size for colr box" + } + Status::ColrBadType => { + "Unsupported colour_type for ColourInformationBox" + } + Status::ColrReservedNonzero => { + "The 7 reserved bits at the end of the ColourInformationBox \ + for colour_type == 'nclx' must be 0 \ + per ISOBMFF (ISO 14496-12:2020) § 12.1.5.2" + } + Status::ConstructionMethod => { + "construction_method shall be 0 (file) or 1 (idat) per MIAF (ISO 23000-22:2019) § 7.2.1.7" + } + Status::CttsBadSize => { + "insufficient data in 'ctts' box" + } + Status::CttsBadVersion => { + "unsupported version in 'ctts' box" + } + Status::DflaBadMetadataBlockSize => { + "FLACMetadataBlock larger than parent box" + } + Status::DflaFlagsNonzero => { + "no-zero dfLa (FLAC) flags" + } + Status::DflaMissingMetadata => { + "FLACSpecificBox missing metadata" + } + Status::DflaStreamInfoBadSize => { + "FLACSpecificBox STREAMINFO block is the wrong size" + } + Status::DflaStreamInfoNotFirst => { + "FLACSpecificBox must have STREAMINFO metadata first" + } + Status::DopsChannelMappingWriteErr => { + "Couldn't write channel mapping table data." + } + Status::DopsOpusHeadWriteErr => { + "Couldn't write OpusHead tag." + } + Status::ElstBadVersion => { + "unhandled elst version" + } + Status::EsdsBadAudioSampleEntry => { + "malformed audio sample entry" + } + Status::EsdsBadDescriptor => { + "Invalid descriptor." + } + Status::EsdsDecSpecificIntoTagQuantity => { + "There can be only one DecSpecificInfoTag descriptor" + } + Status::FtypBadSize => { + "invalid ftyp size" + } + Status::FtypNotFirst => { + "The FileTypeBox shall be placed as early as possible in the file \ + per ISOBMFF (ISO 14496-12:2020) § 4.3.1" + } + Status::HdlrNameMultipleNul => { + "The HandlerBox 'name' field shall have a NUL byte \ + only in the final position \ + per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2" + } + Status::HdlrNameNoNul => { + "The HandlerBox 'name' field shall be null-terminated \ + per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2" + } + Status::HdlrNameNotUtf8 => { + "The HandlerBox 'name' field shall be valid utf8 \ + per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2" + } + Status::HdlrNotFirst => { + "The HandlerBox shall be the first contained box within the MetaBox \ + per MIAF (ISO 23000-22:2019) § 7.2.1.5" + } + Status::HdlrPredefinedNonzero => { + "The HandlerBox 'pre_defined' field shall be 0 \ + per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2" + } + Status::HdlrReservedNonzero => { + "The HandlerBox 'reserved' fields shall be 0 \ + per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2" + } + Status::HdlrTypeNotPict => { + "The HandlerBox handler_type must be 'pict' \ + per MIAF (ISO 23000-22:2019) § 7.2.1.5" + } + Status::HdlrUnsupportedVersion => { + "The HandlerBox version shall be 0 (zero) \ + per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2" + } + Status::HdrlBadQuantity => { + "There shall be exactly one hdlr box \ + per ISOBMFF (ISO 14496-12:2020) § 8.4.3.1" + } + Status::IdatBadQuantity => { + "There shall be zero or one idat boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.11" + } + Status::IdatMissing => { + "ItemLocationBox (iloc) construction_method indicates 1 (idat), \ + but no idat box is present." + } + Status::IinfBadChild => { + "iinf box shall contain only infe boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.6.2" + } + Status::IinfBadQuantity => { + "There shall be zero or one iinf boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.6.1" + } + Status::IlocBadConstructionMethod => { + "construction_method is taken from the set 0, 1 or 2 \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.3.3" + } + Status::IlocBadExtent => { + "extent_count != 1 requires explicit offset and length \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.3.3" + } + Status::IlocBadExtentCount => { + "extent_count must have a value 1 or greater \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.3.3" + } + Status::IlocBadFieldSize => { + "value must be in the set {0, 4, 8}" + } + Status::IlocBadQuantity => { + "There shall be zero or one iloc boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.3.1" + } + Status::IlocBadSize => { + "invalid iloc size" + } + Status::IlocDuplicateItemId => { + "duplicate item_ID in iloc" + } + Status::IlocMissing => { + "iloc missing" + } + Status::IlocNotFound => { + "ItemLocationBox (iloc) contains an extent not present in any mdat or idat box" + } + Status::IlocOffsetOverflow => { + "offset calculation overflow" + } + Status::ImageItemType => { + "Image item type is neither 'av01' nor 'grid'" + } + Status::InfeFlagsNonzero => { + "'infe' flags field shall be 0 \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.6.2" + } + Status::InvalidUtf8 => { + "invalid utf8" + } + Status::IpcoIndexOverflow => { + "ipco index overflow" + } + Status::IpmaBadIndex => { + "Invalid property index in ipma" + } + Status::IpmaBadItemOrder => { + "Each ItemPropertyAssociation box shall be ordered by increasing item_ID" + } + Status::IpmaBadQuantity => { + "There shall be at most one ItemPropertyAssociationbox with a given pair of \ + values of version and flags \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1" + } + Status::IpmaBadVersion => { + "The ipma version 0 should be used unless 32-bit item_ID values are needed \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1" + } + Status::IpmaDuplicateItemId => { + "There shall be at most one occurrence of a given item_ID, \ + in the set of ItemPropertyAssociationBox boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1" + } + Status::IpmaFlagsNonzero => { + "Unless there are more than 127 properties in the ItemPropertyContainerBox, \ + flags should be equal to 0 \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1" + } + Status::IpmaIndexZeroNoEssential => { + "the essential indicator shall be 0 for property index 0 \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.14.3" + } + Status::IpmaTooBig => { + "ipma box exceeds maximum size for entry_count" + } + Status::IpmaTooSmall => { + "ipma box below minimum size for entry_count" + } + Status::IprpBadChild => { + "unexpected iprp child" + } + Status::IprpBadQuantity => { + "There shall be zero or one iprp boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1" + } + Status::IprpConflict => { + "conflicting item property values" + } + Status::IrefBadQuantity => { + "There shall be zero or one iref boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.12.1" + } + Status::IrefRecursion => { + "from_item_id and to_item_id must be different" + } + Status::IspeMissing => { + "Missing 'ispe' property for image item, required \ + per HEIF (ISO/IEC 23008-12:2017) § 6.5.3.1" + } + Status::ItemTypeMissing => { + "No ItemInfoEntry for item_ID" + } + Status::LselNoEssential => { + "LayerSelectorProperty (lsel) shall be marked as essential \ + per HEIF (ISO/IEC 23008-12:2017) § 6.5.11.1" + } + Status::MdhdBadTimescale => { + "zero timescale in mdhd" + } + Status::MdhdBadVersion => { + "unhandled mdhd version" + } + Status::MehdBadVersion => { + "unhandled mehd version" + } + Status::MetaBadQuantity => { + "There should be zero or one meta boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.1.1" + } + Status::MissingAvifOrAvisBrand => { + "The file shall list 'avif' or 'avis' in the compatible_brands field + of the FileTypeBox \ + per https://aomediacodec.github.io/av1-avif/#file-constraints" + } + Status::MissingMif1Brand => { + "The FileTypeBox should contain 'mif1' in the compatible_brands list \ + per MIAF (ISO 23000-22:2019/Amd. 2:2021) § 7.2.1.2" + } + Status::MoovBadQuantity => { + "Multiple moov boxes found; \ + files with avis or msf1 brands shall contain exactly one moov box \ + per ISOBMFF (ISO 14496-12:2020) § 8.2.1.1" + } + Status::MoovMissing => { + "No moov box found; \ + files with avis or msf1 brands shall contain exactly one moov box \ + per ISOBMFF (ISO 14496-12:2020) § 8.2.1.1" + } + Status::MultipleAlpha => { + "multiple alpha planes" + } + Status::MvhdBadTimescale => { + "zero timescale in mvhd" + } + Status::MvhdBadVersion => { + "unhandled mvhd version" + } + Status::NoImage => "No primary image or image sequence found", + Status::PitmBadQuantity => { + "There shall be zero or one pitm boxes \ + per ISOBMFF (ISO 14496-12:2020) § 8.11.4.1" + } + Status::PitmMissing => { + "Missing required PrimaryItemBox (pitm), required \ + per HEIF (ISO/IEC 23008-12:2017) § 10.2.1" + } + Status::PixiBadChannelCount => { + "invalid num_channels" + } + Status::PixiMissing => { + "The pixel information property shall be associated with every image \ + that is displayable (not hidden) \ + per MIAF (ISO/IEC 23000-22:2019) specification § 7.3.6.6" + } + Status::PsshSizeOverflow => { + "overflow in read_pssh" + } + Status::ReadBufErr => { + "failed buffer read" + } + Status::SchiQuantity => { + "tenc box should be only one at most in sinf box" + } + Status::StsdBadAudioSampleEntry => { + "malformed audio sample entry" + } + Status::StsdBadVideoSampleEntry => { + "malformed video sample entry" + } + Status::TkhdBadVersion => { + "unhandled tkhd version" + } + Status::TxformBeforeIspe => { + "Every image item shall be associated with one property of \ + type ImageSpatialExtentsProperty (ispe), prior to the \ + association of all transformative properties. \ + per HEIF (ISO/IEC 23008-12:2017) § 6.5.3.1" } Status::TxformNoEssential => { "All transformative properties associated with coded and \ @@ -404,25 +776,11 @@ impl From for &str { document shall be marked as essential \ per MIAF (ISO 23000-22:2019) § 7.3.9" } - Status::NoPrimaryItem => { - "Missing required PrimaryItemBox (pitm), required \ - per HEIF (ISO/IEC 23008-12:2017) § 10.2.1" - } - Status::ImageItemType => { - "Image item type is neither 'av01' nor 'grid'" - } - Status::ItemTypeMissing => { - "No ItemInfoEntry for item_ID" - } - Status::ConstructionMethod => { - "construction_method shall be 0 (file) or 1 (idat) per MIAF (ISO 23000-22:2019) § 7.2.1.7" - } - Status::ItemLocNotFound => { - "ItemLocationBox (iloc) contains an extent not present in any mdat or idat box" - } - Status::NoItemDataBox => { - "ItemLocationBox (iloc) construction_method indicates 1 (idat), \ - but no idat box is present." + Status::TxformOrder => { + "These properties, if used, shall be indicated to be applied \ + in the following order: clean aperture first, then rotation, \ + then mirror. \ + per MIAF (ISO/IEC 23000-22:2019) § 7.3.6.7" } } } @@ -431,9 +789,8 @@ impl From for &str { impl From for Status { fn from(error: Error) -> Self { match error { - Error::InvalidData(_) => Self::Invalid, Error::Unsupported(_) => Self::Unsupported, - Error::InvalidDataDetail(parse_status) => parse_status, + Error::InvalidData(parse_status) => parse_status, Error::UnexpectedEOF => Self::Eof, Error::Io(_) => { // Getting std::io::ErrorKind::UnexpectedEof is normal @@ -441,7 +798,7 @@ impl From for Status { // those to our Error::UnexpectedEOF variant. Self::Io } - Error::NoMoov => Self::NoMoov, + Error::MoovMissing => Self::MoovMissing, Error::OutOfMemory => Self::Oom, } } @@ -485,11 +842,8 @@ impl From for Status { #[derive(Debug)] pub enum Error { /// Parse error caused by corrupt or malformed data. - InvalidData(&'static str), - /// Similar to [`Self::InvalidData`], but for errors that have a specific - /// [`Status`] variant for communicating the detail across FFI. /// See the helper [`From for Error`](enum.Error.html#impl-From) - InvalidDataDetail(Status), + InvalidData(Status), /// Parse error caused by limited parser support rather than invalid data. Unsupported(&'static str), /// Reflect `std::io::ErrorKind::UnexpectedEof` for short data. @@ -497,7 +851,7 @@ pub enum Error { /// Propagate underlying errors from `std::io`. Io(std::io::Error), /// read_mp4 terminated without detecting a moov box. - NoMoov, + MoovMissing, /// Out of memory OutOfMemory, } @@ -512,7 +866,7 @@ impl std::error::Error for Error {} impl From for Error { fn from(_: bitreader::BitReaderError) -> Error { - Error::InvalidData("invalid data") + Status::BitReaderError.into() } } @@ -527,13 +881,13 @@ impl From for Error { impl From for Error { fn from(_: std::string::FromUtf8Error) -> Error { - Error::InvalidData("invalid utf8") + Status::InvalidUtf8.into() } } impl From for Error { fn from(_: std::str::Utf8Error) -> Error { - Error::InvalidData("invalid utf8") + Status::InvalidUtf8.into() } } @@ -546,7 +900,6 @@ impl From for Error { impl From for std::io::Error { fn from(err: Error) -> Self { let kind = match err { - Error::InvalidData(_) => std::io::ErrorKind::InvalidData, Error::UnexpectedEOF => std::io::ErrorKind::UnexpectedEof, Error::Io(io_err) => return io_err, _ => std::io::ErrorKind::Other, @@ -742,6 +1095,29 @@ pub enum SampleEntry { Unknown, } +#[derive(Debug)] +pub struct TrackReferenceBox { + pub references: TryVec, +} + +impl TrackReferenceBox { + pub fn has_auxl_reference(&self, track_id: u32) -> bool { + self.references.iter().any(|entry| match entry { + TrackReferenceEntry::Auxiliary(aux_entry) => aux_entry.track_ids.contains(&track_id), + }) + } +} + +#[derive(Debug)] +pub enum TrackReferenceEntry { + Auxiliary(TrackReference), +} + +#[derive(Debug)] +pub struct TrackReference { + pub track_ids: TryVec, +} + /// An Elementary Stream Descriptor /// See MPEG-4 Systems (ISO 14496-1:2010) § 7.2.6.5 #[allow(non_camel_case_types)] @@ -1146,10 +1522,10 @@ pub struct MediaContext { /// An ISOBMFF item as described by an iloc box. For the sake of avoiding copies, /// this can either be represented by the `Location` variant, which indicates -/// where the data exists within a `MediaDataBox` stored separately, or the -/// `Data` variant which owns the data. Unfortunately, it's not simple to -/// represent this as a [`std::borrow::Cow`], or other reference-based type, because -/// multiple instances may references different parts of the same [`MediaDataBox`] +/// where the data exists within a `DataBox` stored separately, or the `Data` +/// variant which owns the data. Unfortunately, it's not simple to represent +/// this as a [`std::borrow::Cow`], or other reference-based type, because +/// multiple instances may references different parts of the same [`DataBox`] /// and we want to avoid the copy that splitting the storage would entail. enum IsobmffItem { MdatLocation(Extent), @@ -1192,12 +1568,17 @@ impl AvifItem { } } -#[derive(Debug)] +#[derive(Default, Debug)] pub struct AvifContext { /// Level of deviation from the specification before failing the parse strictness: ParseStrictness, - /// Referred to by the `IsobmffItem::*Location` variants of the `AvifItem`s in this struct - media_storage: TryVec, + /// Storage elements which can be located anywhere within the "file" identified by + /// [`BoxType::ItemLocationBox`]es using [`ConstructionMethod::File`]. + /// Referred to by the [`IsobmffItem`]`::*Location` variants of the `AvifItem`s in this struct + media_storage: TryVec, + /// Similar to `media_storage`, but for a single optional chunk of storage within the + /// MetaBox itentified by [`BoxType::ItemLocationBox`]es using [`ConstructionMethod::Idat`]. + item_data_box: Option, /// The item indicated by the `pitm` box, See ISOBMFF (ISO 14496-12:2020) § 8.11.4 /// May be `None` in the pure image sequence case. primary_item: Option, @@ -1211,13 +1592,17 @@ pub struct AvifContext { /// Should probably only ever be [`AVIF_BRAND`] or [`AVIS_BRAND`], but other values /// are legal as long as one of the two is the `compatible_brand` list. pub major_brand: FourCC, - /// True if a `moov` box is present - pub has_sequence: bool, + /// Information on the sequence contained in the image, or None if not present + pub sequence: Option, /// A collection of unsupported features encountered during the parse pub unsupported_features: UnsupportedFeatures, } impl AvifContext { + pub fn primary_item_is_present(&self) -> bool { + self.primary_item.is_some() + } + pub fn primary_item_coded_data(&self) -> Option<&[u8]> { self.primary_item .as_ref() @@ -1230,6 +1615,10 @@ impl AvifContext { .map(|item| self.image_bits_per_channel(item.id)) } + pub fn alpha_item_is_present(&self) -> bool { + self.alpha_item.is_some() + } + pub fn alpha_item_coded_data(&self) -> Option<&[u8]> { self.alpha_item .as_ref() @@ -1262,9 +1651,9 @@ impl AvifContext { Some(ItemProperty::ImageSpatialExtents(ispe)) => Ok(ispe), Some(other_property) => panic!("property key mismatch: {:?}", other_property), None => { - fail_if( + fail_with_status_if( self.strictness != ParseStrictness::Permissive, - "ispe is a mandatory property", + Status::IspeMissing, )?; Ok(std::ptr::null()) } @@ -1376,10 +1765,15 @@ impl AvifContext { } } unreachable!( - "IsobmffItem::Location requires the location exists in AvifContext::media_storage" + "IsobmffItem::MdatLocation requires the location exists in AvifContext::media_storage" ); } - IsobmffItem::IdatLocation(_) => unimplemented!(), + IsobmffItem::IdatLocation(extent) => { + self.item_data_box + .as_ref() + .and_then(|idat| idat.get(extent)) + .unwrap_or_else(|| unreachable!("IsobmffItem::IdatLocation equires the location exists in AvifContext::item_data_box")) + } IsobmffItem::Data(data) => data.as_slice(), } } @@ -1393,29 +1787,31 @@ struct AvifMeta { primary_item_id: Option, item_infos: TryVec, iloc_items: TryHashMap, - item_data_box: Option, + item_data_box: Option, } -/// An Item Data Box -/// See ISOBMFF (ISO 14496-12:2020) § 8.11.11 -struct ItemDataBox { +#[derive(Debug)] +enum DataBoxMetadata { + Idat, + Mdat { + /// Offset of `data` from the beginning of the "file". See ConstructionMethod::File. + /// Note: the file may not be an actual file, read_avif supports any `&mut impl Read` + /// source for input. However we try to match the terminology used in the spec. + file_offset: u64, + }, +} + +/// Represents either an Item Data Box (ISOBMFF (ISO 14496-12:2020) § 8.11.11) +/// Or a Media Data Box (ISOBMFF (ISO 14496-12:2020) § 8.1.1) +struct DataBox { + metadata: DataBoxMetadata, data: TryVec, } -/// A Media Data Box -/// See ISOBMFF (ISO 14496-12:2020) § 8.1.1 -struct MediaDataBox { - /// Offset of `data` from the beginning of the "file". See ConstructionMethod::File. - /// Note: the file may not be an actual file, read_avif supports any `&mut impl Read` - /// source for input. However we try to match the terminology used in the spec. - file_offset: u64, - data: TryVec, -} - -impl fmt::Debug for MediaDataBox { +impl fmt::Debug for DataBox { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.debug_struct("MediaDataBox") - .field("file_offset", &self.file_offset) + f.debug_struct("DataBox") + .field("metadata", &self.metadata) .field("data", &format_args!("{} bytes", self.data.len())) .finish() } @@ -1431,18 +1827,49 @@ fn u64_to_usize_logged(x: u64) -> Option { } } -/// Generalizes the different data boxes a [`ItemLocationBoxItem`] can refer to -trait DataBox { - fn data(&self) -> &[u8]; +impl DataBox { + fn from_mdat(file_offset: u64, data: TryVec) -> Self { + Self { + metadata: DataBoxMetadata::Mdat { file_offset }, + data, + } + } + + fn from_idat(data: TryVec) -> Self { + Self { + metadata: DataBoxMetadata::Idat, + data, + } + } + + fn data(&self) -> &[u8] { + &self.data + } /// Convert an absolute offset to an offset relative to the beginning of the /// slice [`DataBox::data`] returns. Returns None if the offset would be /// negative or if the offset would overflow a `usize`. - fn start(&self, offset: u64) -> Option; + fn start(&self, offset: u64) -> Option { + match self.metadata { + DataBoxMetadata::Idat => u64_to_usize_logged(offset), + DataBoxMetadata::Mdat { file_offset } => { + let start = offset.checked_sub(file_offset); + if start.is_none() { + error!("Overflow subtracting {} + {}", offset, file_offset); + } + u64_to_usize_logged(start?) + } + } + } /// Returns an appropriate variant of [`IsobmffItem`] to describe the extent /// referencing data within this type of box. - fn location(&self, extent: &Extent) -> IsobmffItem; + fn location(&self, extent: &Extent) -> IsobmffItem { + match self.metadata { + DataBoxMetadata::Idat => IsobmffItem::IdatLocation(extent.clone()), + DataBoxMetadata::Mdat { .. } => IsobmffItem::MdatLocation(extent.clone()), + } + } /// Return a slice from the DataBox specified by the provided `extent`. /// Returns `None` if the extent isn't fully contained by the DataBox or if @@ -1466,46 +1893,14 @@ trait DataBox { } } -impl DataBox for ItemDataBox { - fn data(&self) -> &[u8] { - &self.data - } - - fn start(&self, offset: u64) -> Option { - u64_to_usize_logged(offset) - } - - fn location(&self, extent: &Extent) -> IsobmffItem { - IsobmffItem::IdatLocation(extent.clone()) - } -} - -impl DataBox for MediaDataBox { - fn data(&self) -> &[u8] { - &self.data - } - - fn start(&self, offset: u64) -> Option { - let start = offset.checked_sub(self.file_offset); - if start.is_none() { - error!("Overflow subtracting {} + {}", offset, self.file_offset); - } - u64_to_usize_logged(start?) - } - - fn location(&self, extent: &Extent) -> IsobmffItem { - IsobmffItem::MdatLocation(extent.clone()) - } -} - #[cfg(test)] mod media_data_box_tests { use super::*; - impl MediaDataBox { + impl DataBox { fn at_offset(file_offset: u64, data: std::vec::Vec) -> Self { - MediaDataBox { - file_offset, + DataBox { + metadata: DataBoxMetadata::Mdat { file_offset }, data: data.into(), } } @@ -1513,7 +1908,7 @@ mod media_data_box_tests { #[test] fn extent_with_length_before_mdat_returns_none() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::WithLength { offset: 0, len: 2 }; assert!(mdat.get(&extent).is_none()); @@ -1521,7 +1916,7 @@ mod media_data_box_tests { #[test] fn extent_to_end_before_mdat_returns_none() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::ToEnd { offset: 0 }; assert!(mdat.get(&extent).is_none()); @@ -1529,7 +1924,7 @@ mod media_data_box_tests { #[test] fn extent_with_length_crossing_front_mdat_boundary_returns_none() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::WithLength { offset: 99, len: 3 }; assert!(mdat.get(&extent).is_none()); @@ -1537,7 +1932,7 @@ mod media_data_box_tests { #[test] fn extent_with_length_which_is_subset_of_mdat() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::WithLength { offset: 101, len: 2, @@ -1548,7 +1943,7 @@ mod media_data_box_tests { #[test] fn extent_to_end_which_is_subset_of_mdat() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::ToEnd { offset: 101 }; assert_eq!(mdat.get(&extent), Some(&[1, 1, 1, 1][..])); @@ -1556,7 +1951,7 @@ mod media_data_box_tests { #[test] fn extent_with_length_which_is_all_of_mdat() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::WithLength { offset: 100, len: 5, @@ -1567,7 +1962,7 @@ mod media_data_box_tests { #[test] fn extent_to_end_which_is_all_of_mdat() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::ToEnd { offset: 100 }; assert_eq!(mdat.get(&extent), Some(mdat.data.as_slice())); @@ -1575,7 +1970,7 @@ mod media_data_box_tests { #[test] fn extent_with_length_crossing_back_mdat_boundary_returns_none() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::WithLength { offset: 103, len: 3, @@ -1586,7 +1981,7 @@ mod media_data_box_tests { #[test] fn extent_with_length_after_mdat_returns_none() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::WithLength { offset: 200, len: 2, @@ -1597,7 +1992,7 @@ mod media_data_box_tests { #[test] fn extent_to_end_after_mdat_returns_none() { - let mdat = MediaDataBox::at_offset(100, vec![1; 5]); + let mdat = DataBox::at_offset(100, vec![1; 5]); let extent = Extent::ToEnd { offset: 200 }; assert!(mdat.get(&extent).is_none()); @@ -1605,7 +2000,7 @@ mod media_data_box_tests { #[test] fn extent_with_length_which_overflows_usize() { - let mdat = MediaDataBox::at_offset(std::u64::MAX - 1, vec![1; 5]); + let mdat = DataBox::at_offset(std::u64::MAX - 1, vec![1; 5]); let extent = Extent::WithLength { offset: std::u64::MAX, len: std::usize::MAX, @@ -1618,7 +2013,7 @@ mod media_data_box_tests { // because the range end is unbounded, we don't calculate it. #[test] fn extent_to_end_which_overflows_usize() { - let mdat = MediaDataBox::at_offset(std::u64::MAX - 1, vec![1; 5]); + let mdat = DataBox::at_offset(std::u64::MAX - 1, vec![1; 5]); let extent = Extent::ToEnd { offset: std::u64::MAX, }; @@ -1661,7 +2056,7 @@ struct SingleItemTypeReferenceBox { /// Potential sizes (in bytes) of variable-sized fields of the 'iloc' box /// See ISOBMFF (ISO 14496-12:2020) § 8.11.3 -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] enum IlocFieldSize { Zero, Four, @@ -1686,12 +2081,12 @@ impl TryFrom for IlocFieldSize { 0 => Ok(Self::Zero), 4 => Ok(Self::Four), 8 => Ok(Self::Eight), - _ => Err(Error::InvalidData("value must be in the set {0, 4, 8}")), + _ => Status::IlocBadFieldSize.into(), } } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] enum IlocVersion { Zero, One, @@ -1728,7 +2123,7 @@ struct ItemLocationBoxItem { /// > MIAF image items are constrained as follows:
/// > — `construction_method` shall be equal to 0 for MIAF image items that are coded image items.
/// > — `construction_method` shall be equal to 0 or 1 for MIAF image items that are derived image items. -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] enum ConstructionMethod { File = 0, Idat = 1, @@ -1737,7 +2132,7 @@ enum ConstructionMethod { /// Describes a region where a item specified by an `ItemLocationBoxItem` is stored. /// The offset is `u64` since that's the maximum possible size and since the relative -/// nature of `MediaDataBox` means this can still possibly succeed even in the case +/// nature of `DataBox` means this can still possibly succeed even in the case /// that the raw value exceeds std::usize::MAX on platforms where that type is smaller /// than u64. However, `len` is stored as a `usize` since no value larger than /// `std::usize::MAX` can be used in a successful indexing operation in rust. @@ -1749,10 +2144,12 @@ enum Extent { ToEnd { offset: u64 }, } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum TrackType { Audio, Video, + Picture, + AuxiliaryVideo, Metadata, Unknown, } @@ -1766,25 +2163,21 @@ impl Default for TrackType { // This type is used by mp4parse_capi since it needs to be passed from FFI consumers // The C-visible struct is renamed via mp4parse_capi/cbindgen.toml to match naming conventions #[repr(C)] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum ParseStrictness { Permissive, // Error only on ambiguous inputs Normal, // Error on "shall" directives, log warnings for "should" Strict, // Error on "should" directives } -/// Prefer [`fail_with_error_if`] so all the explanatory strings can be collected -/// in `From for &str`. -fn fail_if(violation: bool, message: &'static str) -> Result<()> { - if violation { - Err(Error::InvalidData(message)) - } else { - warn!("{}", message); - Ok(()) +impl Default for ParseStrictness { + fn default() -> Self { + ParseStrictness::Normal } } -fn fail_with_error_if(violation: bool, error: Error) -> Result<()> { +fn fail_with_status_if(violation: bool, status: Status) -> Result<()> { + let error = Error::from(status); if violation { Err(error) } else { @@ -1793,7 +2186,7 @@ fn fail_with_error_if(violation: bool, error: Error) -> Result<()> { } } -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum CodecType { Unknown, MP3, @@ -1823,21 +2216,21 @@ impl Default for CodecType { } /// The media's global (mvhd) timescale in units per second. -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub struct MediaTimeScale(pub u64); /// A time to be scaled by the media's global (mvhd) timescale. -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub struct MediaScaledTime(pub u64); /// The track's local (mdhd) timescale. /// Members are timescale units per second and the track id. -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub struct TrackTimeScale(pub T, pub usize); /// A time to be scaled by the track's local (mdhd) timescale. /// Members are time in scale units and the track id. -#[derive(Debug, Copy, Clone, PartialEq)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub struct TrackScaledTime(pub T, pub usize); impl std::ops::Add for TrackScaledTime @@ -1868,6 +2261,7 @@ pub struct Track { pub stco: Option, // It is for stco or co64. pub stss: Option, pub ctts: Option, + pub tref: Option, } impl Track { @@ -1965,17 +2359,18 @@ fn read_box_header(src: &mut T) -> Result { 1 => { let size64 = be_u64(src)?; if size64 < BoxHeader::MIN_LARGE_SIZE { - return Err(Error::InvalidData("malformed wide size")); + return Status::BoxBadWideSize.into(); } size64 } _ => { if u64::from(size32) < BoxHeader::MIN_SIZE { - return Err(Error::InvalidData("malformed size")); + return Status::BoxBadSize.into(); } u64::from(size32) } }; + trace!("read_box_header: name: {:?}, size: {}", name, size); let mut offset = match size32 { 1 => BoxHeader::MIN_LARGE_SIZE, _ => BoxHeader::MIN_SIZE, @@ -2081,8 +2476,6 @@ impl AvifImageType { /// Read the contents of an AVIF file pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result { - let _ = env_logger::try_init(); - debug!("read_avif(strictness: {:?})", strictness); let mut f = OffsetReader::new(f); @@ -2115,21 +2508,16 @@ pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result(f: &mut T, strictness: ParseStrictness) -> Result(f: &mut T, strictness: ParseStrictness) -> Result { if meta.is_some() { - return Err(Error::InvalidData( - "There should be zero or one meta boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.1.1", - )); + return Status::MetaBadQuantity.into(); } meta = Some(read_avif_meta( &mut b, @@ -2166,16 +2548,14 @@ pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result { if image_sequence.is_some() { - return Status::MultipleMoov.into(); + return Status::MoovBadQuantity.into(); } image_sequence = Some(read_moov(&mut b, None)?); } BoxType::MediaDataBox => { - if b.bytes_left() > 0 { - let file_offset = b.offset(); - let data = b.read_into_try_vec()?; - media_storage.push(MediaDataBox { file_offset, data })?; - } + let file_offset = b.offset(); + let data = b.read_into_try_vec()?; + media_storage.push(DataBox::from_mdat(file_offset, data))?; } _ => skip_box_content(&mut b)?, } @@ -2190,7 +2570,7 @@ pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result(f: &mut T, strictness: ParseStrictness) -> Result(f: &mut T, strictness: ParseStrictness) -> Result Result { + let mut find_and_add_to_item = |extent: &Extent, dat: &DataBox| -> Result { if let Some(extent_slice) = dat.get(extent) { match item { None => { @@ -2294,7 +2674,7 @@ pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result(f: &mut T, strictness: ParseStrictness) -> Result { - fail_with_error_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - Status::ConstructionMethod.into(), + Status::ConstructionMethod, )?; } } @@ -2325,18 +2705,18 @@ pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result(f: &mut T, strictness: ParseStrictness) -> Result| -> Result<()> { let item_id = item.as_ref().map(|item| item.id); @@ -2371,11 +2742,9 @@ pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result { if missing_property_for(item_id, BoxType::AV1CodecConfigurationBox) { - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "One AV1 Item Configuration Property (av1C) is mandatory for an \ - image item of type 'av01' \ - per AVIF specification § 2.2.1", + Status::Av1cMissing, )?; } @@ -2384,15 +2753,20 @@ pub fn read_avif(f: &mut T, strictness: ParseStrictness) -> Result(f: &mut T, strictness: ParseStrictness) -> Result( trace!("read_avif_meta parsing {:?} box", b.head.name); if !read_handler_box && b.head.name != BoxType::HandlerBox { - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "The HandlerBox shall be the first contained box within the MetaBox \ - per MIAF (ISO 23000-22:2019) § 7.2.1.5", + Status::HdlrNotFirst, )?; } match b.head.name { BoxType::HandlerBox => { if read_handler_box { - return Err(Error::InvalidData( - "There shall be exactly one hdlr box per ISOBMFF (ISO 14496-12:2020) § 8.4.3.1", - )); + return Status::HdrlBadQuantity.into(); } let HandlerBox { handler_type } = read_hdlr(&mut b, strictness)?; if handler_type != b"pict" { - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "The HandlerBox handler_type must be 'pict' \ - per MIAF (ISO 23000-22:2019) § 7.2.1.5", + Status::HdlrTypeNotPict, )?; } read_handler_box = true; } BoxType::ItemInfoBox => { if item_infos.is_some() { - return Err(Error::InvalidData( - "There shall be zero or one iinf boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.6.1", - )); + return Status::IinfBadQuantity.into(); } item_infos = Some(read_iinf(&mut b, strictness, unsupported_features)?); } BoxType::ItemLocationBox => { if iloc_items.is_some() { - return Err(Error::InvalidData( - "There shall be zero or one iloc boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.3.1", - )); + return Status::IlocBadQuantity.into(); } iloc_items = Some(read_iloc(&mut b)?); } BoxType::PrimaryItemBox => { if primary_item_id.is_some() { - return Err(Error::InvalidData( - "There shall be zero or one pitm boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.4.1", - )); + return Status::PitmBadQuantity.into(); } primary_item_id = Some(read_pitm(&mut b)?); } BoxType::ItemReferenceBox => { if item_references.is_some() { - return Err(Error::InvalidData("There shall be zero or one iref boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.12.1")); + return Status::IrefBadQuantity.into(); } item_references = Some(read_iref(&mut b)?); } BoxType::ItemPropertiesBox => { if item_properties.is_some() { - return Err(Error::InvalidData("There shall be zero or one iprp boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1")); + return Status::IprpBadQuantity.into(); } item_properties = Some(read_iprp( &mut b, @@ -2530,13 +2895,10 @@ fn read_avif_meta( } BoxType::ItemDataBox => { if item_data_box.is_some() { - return Err(Error::InvalidData( - "There shall be zero or one idat boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.11", - )); + return Status::IdatBadQuantity.into(); } - item_data_box = Some(ItemDataBox { - data: b.read_into_try_vec()?, - }); + let data = b.read_into_try_vec()?; + item_data_box = Some(DataBox::from_idat(data)); } _ => skip_box_content(&mut b)?, } @@ -2549,7 +2911,7 @@ fn read_avif_meta( item_references: item_references.unwrap_or_default(), primary_item_id, item_infos: item_infos.unwrap_or_default(), - iloc_items: iloc_items.ok_or(Error::InvalidData("iloc missing"))?, + iloc_items: iloc_items.ok_or_else(|| Error::from(Status::IlocMissing))?, item_data_box, }) } @@ -2592,9 +2954,7 @@ fn read_iinf( let mut iter = src.box_iter(); while let Some(mut b) = iter.next_box()? { if b.head.name != BoxType::ItemInfoEntry { - return Err(Error::InvalidData( - "iinf box shall contain only infe boxes per ISOBMFF (ISO 14496-12:2020) § 8.11.6.2", - )); + return Status::IinfBadChild.into(); } if let Some(infe) = read_infe(&mut b, strictness, unsupported_features)? { @@ -2633,10 +2993,9 @@ fn read_infe( // least one sample AVIF image has a nonzero value. // See https://github.com/AOMediaCodec/av1-avif/issues/146 if flags != 0 { - fail_if( + fail_with_status_if( strictness == ParseStrictness::Strict, - "'infe' flags field shall be 0 \ - per ISOBMFF (ISO 14496-12:2020) § 8.11.6.2", + Status::InfeFlagsNonzero, )?; } @@ -2681,9 +3040,7 @@ fn read_iref(src: &mut BMFFBox) -> Result(src: &mut BMFFBox) -> Result( Some(mut b) if b.head.name == BoxType::ItemPropertyContainerBox => { read_ipco(&mut b, strictness) } - Some(_) => Err(Error::InvalidData("unexpected iprp child")), + Some(_) => Status::IprpBadChild.into(), None => Err(Error::UnexpectedEOF), }?; @@ -2732,24 +3089,20 @@ fn read_iprp( while let Some(mut b) = iter.next_box()? { if b.head.name != BoxType::ItemPropertyAssociationBox { - return Err(Error::InvalidData("unexpected iprp child")); + return Status::IprpBadChild.into(); } let (version, flags) = read_fullbox_extra(&mut b)?; if ipma_version_and_flag_values_seen.contains(&(version, flags)) { - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "There shall be at most one ItemPropertyAssociationbox with a given pair of \ - values of version and flags \ - per ISOBMFF (ISO 14496-12:2020 § 8.11.14.1", + Status::IpmaBadQuantity, )?; } if flags != 0 && properties.len() <= 127 { - fail_if( + fail_with_status_if( strictness == ParseStrictness::Strict, - "Unless there are more than 127 properties in the ItemPropertyContainerBox, \ - flags should be equal to 0 \ - per ISOBMFF (ISO 14496-12:2020 § 8.11.14.1", + Status::IpmaFlagsNonzero, )?; } ipma_version_and_flag_values_seen.push((version, flags))?; @@ -2772,19 +3125,11 @@ fn read_iprp( // It's technically possible to make sense of this situation by merging ipma // boxes, but this is a "shall" requirement, so we'd only do it in // ParseStrictness::Permissive mode, and this hasn't shown up in the wild - return Err(Error::InvalidData( - "There shall be at most one occurrence of a given item_ID, \ - in the set of ItemPropertyAssociationBox boxes \ - per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1", - )); + return Status::IpmaDuplicateItemId.into(); } - const TRANSFORM_ORDER_ERROR: &str = - "These properties, if used, shall be indicated to be applied \ - in the following order: clean aperture first, then rotation, \ - then mirror. \ - per MIAF (ISO/IEC 23000-22:2019) § 7.3.6.7"; const TRANSFORM_ORDER: &[BoxType] = &[ + BoxType::ImageSpatialExtentsProperty, BoxType::CleanApertureBox, BoxType::ImageRotation, BoxType::ImageMirror, @@ -2797,10 +3142,9 @@ fn read_iprp( for a in &association_entry.associations { if a.property_index == PropertyIndex(0) { if a.essential { - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "the essential indicator shall be 0 for property index 0 \ - per ISOBMFF (ISO 14496-12:2020 § 8.11.14.3", + Status::IpmaIndexZeroNoEssential, )?; } continue; @@ -2850,9 +3194,9 @@ fn read_iprp( // This is a "shall", but it is likely to change, so only // fail if using strict parsing. // See https://github.com/mozilla/mp4parse-rust/issues/284 - fail_with_error_if( + fail_with_status_if( strictness == ParseStrictness::Strict, - Status::TxformNoEssential.into(), + Status::TxformNoEssential, )?; } } @@ -2869,11 +3213,9 @@ fn read_iprp( a.property_index, prev_colr_index ); - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "Each item shall have at most one property association with a - ColourInformationBox (colr) for a given value of colour_type \ - per HEIF (ISO/IEC DIS 23008-12) § 6.5.5.1", + Status::ColrBadQuantity, )?; } else { colour_type_indexes.insert(colour_type, a.property_index)?; @@ -2885,9 +3227,9 @@ fn read_iprp( ItemProperty::LayeredImageIndexing => { assert!(feature.is_ok() && unsupported_features.contains(feature?)); if a.essential { - fail_with_error_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - Status::A1lxEssential.into(), + Status::A1lxEssential, )?; } } @@ -2900,9 +3242,9 @@ fn read_iprp( || strictness == ParseStrictness::Permissive ); } else { - fail_with_error_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - Status::LselNoEssential.into(), + Status::LselNoEssential, )?; } } @@ -2915,9 +3257,9 @@ fn read_iprp( || strictness == ParseStrictness::Permissive ); } else { - fail_with_error_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - Status::A1opNoEssential.into(), + Status::A1opNoEssential, )?; } } @@ -2934,10 +3276,19 @@ fn read_iprp( if let Some(prev) = prev_transform_index { if prev >= transform_index { error!( - "{:?} after {:?}", + "Invalid property order: {:?} after {:?}", TRANSFORM_ORDER[transform_index], TRANSFORM_ORDER[prev] ); - return Err(Error::InvalidData(TRANSFORM_ORDER_ERROR)); + fail_with_status_if( + strictness != ParseStrictness::Permissive, + if TRANSFORM_ORDER[transform_index] + == BoxType::ImageSpatialExtentsProperty + { + Status::TxformBeforeIspe + } else { + Status::TxformOrder + }, + )?; } } prev_transform_index = Some(transform_index); @@ -2947,9 +3298,9 @@ fn read_iprp( "Missing property at {:?} for {:?}", a.property_index, association_entry.item_id ); - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "Invalid property index in ipma", + Status::IpmaBadIndex, )?; } } @@ -2968,7 +3319,7 @@ fn read_iprp( Ok(iprp) } -/// See ISOBMFF (ISO 14496-12:2020 § 8.11.14.1 +/// See ISOBMFF (ISO 14496-12:2020) § 8.11.14.1 /// Variants with no associated data are recognized but not necessarily supported. /// See [`Feature`] to determine support. #[derive(Debug)] @@ -3016,14 +3367,14 @@ struct ItemPropertyAssociationEntry { } /// For storing ItemPropertyAssociation data -/// See ISOBMFF (ISO 14496-12:2020 § 8.11.14.1 +/// See ISOBMFF (ISO 14496-12:2020) § 8.11.14.1 #[derive(Debug)] struct Association { essential: bool, property_index: PropertyIndex, } -/// See ISOBMFF (ISO 14496-12:2020 § 8.11.14.1 +/// See ISOBMFF (ISO 14496-12:2020) § 8.11.14.1 /// /// The properties themselves are stored in `properties`, but the items they're /// associated with are stored in `association_entries`. It's necessary to @@ -3077,7 +3428,7 @@ impl ItemPropertiesBox { property_type, multiple_values ); // TODO: add test - Err(Error::InvalidData("conflicting item property values")) + Status::IprpConflict.into() } } } @@ -3158,7 +3509,7 @@ macro_rules! impl_bounded_product { } mod bounded_uints { - use UpperBounded; + use crate::UpperBounded; impl_bounded!(U8, u8); impl_bounded!(U16, u16); @@ -3173,7 +3524,7 @@ mod bounded_uints { } } -use bounded_uints::*; +use crate::bounded_uints::*; /// Implement the multiplication operator for $lhs * $rhs giving $output, which /// is internally represented as $inner. The operation is statically checked @@ -3184,8 +3535,13 @@ macro_rules! impl_mul { type Output = $output; fn mul(self, rhs: $rhs) -> Self::Output { - static_assertions::const_assert!(<$output>::MAX <= <$inner>::MAX as u64); - static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX); + static_assertions::const_assert!( + <$output as UpperBounded>::MAX <= <$inner>::MAX as u64 + ); + static_assertions::const_assert!( + <$lhs as UpperBounded>::MAX * <$rhs as UpperBounded>::MAX + <= <$output as UpperBounded>::MAX + ); let lhs: $inner = self.get().into(); let rhs: $inner = rhs.get().into(); @@ -3219,7 +3575,7 @@ const MAX_IPMA_ASSOCIATION_COUNT: U8 = U8::new(u8::MAX); /// types implementing the UpperBounded trait. Types are declared explicitly to /// show there isn't any accidental inference to primitive types. /// -/// See ISOBMFF (ISO 14496-12:2020 § 8.11.14.1 +/// See ISOBMFF (ISO 14496-12:2020) § 8.11.14.1 fn calculate_ipma_total_associations( version: u8, bytes_left: u64, @@ -3236,9 +3592,7 @@ fn calculate_ipma_total_associations( // All the storage for the `essential` and `property_index` parts (assuming a valid ipma box size) difference } else { - return Err(Error::InvalidData( - "ipma box below minimum size for entry_count", - )); + return Status::IpmaTooSmall.into(); }; let max_association_bytes_per_entry: U16 = MAX_IPMA_ASSOCIATION_COUNT * num_association_bytes; @@ -3246,9 +3600,7 @@ fn calculate_ipma_total_associations( let max_bytes_left: U64 = total_non_association_bytes + max_total_association_bytes; if bytes_left > max_bytes_left.get() { - return Err(Error::InvalidData( - "ipma box exceeds maximum size for entry_count", - )); + return Status::IpmaTooBig.into(); } let total_associations: u64 = total_association_bytes / u64::from(num_association_bytes.get()); @@ -3258,7 +3610,7 @@ fn calculate_ipma_total_associations( /// Parse an ItemPropertyAssociation box /// -/// See ISOBMFF (ISO 14496-12:2020 § 8.11.14.1 +/// See ISOBMFF (ISO 14496-12:2020) § 8.11.14.1 fn read_ipma( src: &mut BMFFBox, strictness: ParseStrictness, @@ -3290,11 +3642,9 @@ fn read_ipma( if let Some(previous_association) = entries.last() { #[allow(clippy::comparison_chain)] if previous_association.item_id > item_id { - return Err(Error::InvalidData( - "Each ItemPropertyAssociation box shall be ordered by increasing item_ID", - )); + return Status::IpmaBadItemOrder.into(); } else if previous_association.item_id == item_id { - return Err(Error::InvalidData("There shall be at most one association box for each item_ID, in any ItemPropertyAssociation box")); + return Status::IpmaDuplicateItemId.into(); } } @@ -3329,10 +3679,9 @@ fn read_ipma( }) = entries.last() { if *max_item_id <= ItemId(u16::MAX.into()) { - fail_if( + fail_with_status_if( strictness == ParseStrictness::Strict, - "The ipma version 0 should be used unless 32-bit item_ID values are needed \ - per ISOBMFF (ISO 14496-12:2020 § 8.11.14.1", + Status::IpmaBadVersion, )?; } } @@ -3345,7 +3694,7 @@ fn read_ipma( /// Parse an ItemPropertyContainerBox /// -/// See ISOBMFF (ISO 14496-12:2020 § 8.11.14.1 +/// See ISOBMFF (ISO 14496-12:2020) § 8.11.14.1 fn read_ipco( src: &mut BMFFBox, strictness: ParseStrictness, @@ -3391,7 +3740,7 @@ fn read_ipco( index .0 .checked_add(1) // must include ignored properties to have correct indexes - .ok_or(Error::InvalidData("ipco index overflow"))?, + .ok_or_else(|| Error::from(Status::IpcoIndexOverflow))?, ); check_parser_state!(b.content); @@ -3401,7 +3750,7 @@ fn read_ipco( } #[repr(C)] -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct ImageSpatialExtentsProperty { image_width: u32, image_height: u32, @@ -3463,7 +3812,7 @@ fn read_pixi(src: &mut BMFFBox) -> Result { let num_channels_read = src.try_read_to_end(&mut bits_per_channel)?; if u8::try_from(num_channels_read)? != num_channels { - return Err(Error::InvalidData("invalid num_channels")); + return Status::PixiBadChannelCount.into(); } check_parser_state!(src.content); @@ -3539,14 +3888,12 @@ fn read_colr( NUM_RESERVED_BITS, bit_reader.remaining() ); - return Err(Error::InvalidData("Unexpected size for colr box")); + return Status::ColrBadSize.into(); } if bit_reader.read_u8(NUM_RESERVED_BITS)? != 0 { - fail_if( + fail_with_status_if( strictness != ParseStrictness::Permissive, - "The 7 reserved bits at the end of the ColourInformationBox \ - for colour_type == 'nclx' must be 0 \ - per ISOBMFF (ISO 14496-12:2020) § 12.1.5.2", + Status::ColrReservedNonzero, )?; } @@ -3565,9 +3912,7 @@ fn read_colr( )), _ => { error!("read_colr colour_type: {:?}", colour_type); - Err(Error::InvalidData( - "Unsupported colour_type for ColourInformationBox", - )) + Status::ColrBadType.into() } } } @@ -3676,7 +4021,7 @@ fn read_auxc(src: &mut BMFFBox) -> Result { if let Some(nul_byte_pos) = aux.iter().position(|&b| b == b'\0') { let (a, b) = aux.as_slice().split_at(nul_byte_pos); aux_type = a.try_into()?; - aux_subtype = (&b[1..]).try_into()?; + aux_subtype = (b[1..]).try_into()?; } else { aux_type = aux; aux_subtype = TryVec::new(); @@ -3734,7 +4079,7 @@ fn read_iloc(src: &mut BMFFBox) -> Result ConstructionMethod::File, 1 => ConstructionMethod::Idat, 2 => ConstructionMethod::Item, - _ => return Err(Error::InvalidData("construction_method is taken from the set 0, 1 or 2 per ISOBMFF (ISO 14496-12:2020) § 8.11.3.3")) + _ => return Status::IlocBadConstructionMethod.into(), } } }; @@ -3749,9 +4094,7 @@ fn read_iloc(src: &mut BMFFBox) -> Result(src: &mut BMFFBox) -> Result(src: &mut BMFFBox) -> Result(src: &mut BMFFBox) -> Result(f: &mut T) -> Result { // XXX(kinetik): This isn't perfect, as a "moov" with no contents is // treated as okay but we haven't found anything useful. Needs more // thought for clearer behaviour here. - context.ok_or(Error::NoMoov) + context.ok_or(Error::MoovMissing) } /// Parse a Movie Header Box @@ -3882,7 +4223,7 @@ fn parse_mvhd(f: &mut BMFFBox) -> Result> { let mvhd = read_mvhd(f)?; debug!("{:?}", mvhd); if mvhd.timescale == 0 { - return Err(Error::InvalidData("zero timescale in mdhd")); + return Status::MvhdBadTimescale.into(); } let timescale = Some(MediaTimeScale(u64::from(mvhd.timescale))); Ok(timescale) @@ -3961,9 +4302,15 @@ fn read_pssh(src: &mut BMFFBox) -> Result::new(); if version > 0 { - let count = be_u32(pssh)?; + const KID_ELEMENT_SIZE: usize = 16; + let count = be_u32(pssh)?.to_usize(); + kid.reserve( + count + .checked_mul(KID_ELEMENT_SIZE) + .ok_or_else(|| Error::from(Status::PsshSizeOverflow))?, + )?; for _ in 0..count { - let item = read_buf(pssh, 16)?; + let item = read_buf(pssh, KID_ELEMENT_SIZE.to_u64())?; kid.push(item)?; } } @@ -4009,7 +4356,7 @@ fn read_mehd(src: &mut BMFFBox) -> Result { let fragment_duration = match version { 1 => be_u64(src)?, 0 => u64::from(be_u32(src)?), - _ => return Err(Error::InvalidData("unhandled mehd version")), + _ => return Status::MehdBadVersion.into(), }; Ok(MediaScaledTime(fragment_duration)) } @@ -4028,6 +4375,7 @@ fn read_trak(f: &mut BMFFBox, track: &mut Track) -> Result<()> { } BoxType::EditBox => read_edts(&mut b, track)?, BoxType::MediaBox => read_mdia(&mut b, track)?, + BoxType::TrackReferenceBox => track.tref = Some(read_tref(&mut b)?), _ => skip_box_content(&mut b)?, }; check_parser_state!(b.content); @@ -4091,7 +4439,7 @@ fn parse_mdhd( duration => Some(TrackScaledTime::(duration, track.id)), }; if mdhd.timescale == 0 { - return Err(Error::InvalidData("zero timescale in mdhd")); + return Status::MdhdBadTimescale.into(); } let timescale = Some(TrackTimeScale::(u64::from(mdhd.timescale), track.id)); Ok((mdhd, duration, timescale)) @@ -4112,6 +4460,8 @@ fn read_mdia(f: &mut BMFFBox, track: &mut Track) -> Result<()> { match hdlr.handler_type.value.as_ref() { b"vide" => track.track_type = TrackType::Video, + b"pict" => track.track_type = TrackType::Picture, + b"auxv" => track.track_type = TrackType::AuxiliaryVideo, b"soun" => track.track_type = TrackType::Audio, b"meta" => track.track_type = TrackType::Metadata, _ => (), @@ -4126,6 +4476,32 @@ fn read_mdia(f: &mut BMFFBox, track: &mut Track) -> Result<()> { Ok(()) } +fn read_tref(f: &mut BMFFBox) -> Result { + // Will likely only see trefs with one auxl + let mut references = TryVec::with_capacity(1)?; + let mut iter = f.box_iter(); + while let Some(mut b) = iter.next_box()? { + match b.head.name { + BoxType::AuxiliaryBox => { + references.push(TrackReferenceEntry::Auxiliary(read_tref_auxl(&mut b)?))? + } + _ => skip_box_content(&mut b)?, + }; + check_parser_state!(b.content); + } + Ok(TrackReferenceBox { references }) +} + +fn read_tref_auxl(f: &mut BMFFBox) -> Result { + let num_track_ids = (f.bytes_left() / std::mem::size_of::().to_u64()).try_into()?; + let mut track_ids = TryVec::with_capacity(num_track_ids)?; + for _ in 0..num_track_ids { + track_ids.push(be_u32(f)?)?; + } + + Ok(TrackReference { track_ids }) +} + fn read_minf(f: &mut BMFFBox, track: &mut Track) -> Result<()> { let mut iter = f.box_iter(); while let Some(mut b) = iter.next_box()? { @@ -4196,7 +4572,7 @@ fn read_ftyp(src: &mut BMFFBox) -> Result { let minor = be_u32(src)?; let bytes_left = src.bytes_left(); if bytes_left % 4 != 0 { - return Err(Error::InvalidData("invalid ftyp size")); + return Status::FtypBadSize.into(); } // Is a brand_count of zero valid? let brand_count = bytes_left / 4; @@ -4223,7 +4599,7 @@ fn read_mvhd(src: &mut BMFFBox) -> Result { 0 => { skip(src, 8)?; } - _ => return Err(Error::InvalidData("unhandled mvhd version")), + _ => return Status::MvhdBadVersion.into(), } let timescale = be_u32(src)?; let duration = match version { @@ -4236,7 +4612,7 @@ fn read_mvhd(src: &mut BMFFBox) -> Result { u64::from(d) } } - _ => return Err(Error::InvalidData("unhandled mvhd version")), + _ => unreachable!("Should have returned Status::MvhdBadVersion"), }; // Skip remaining fields. skip(src, 80)?; @@ -4259,14 +4635,14 @@ fn read_tkhd(src: &mut BMFFBox) -> Result { 0 => { skip(src, 8)?; } - _ => return Err(Error::InvalidData("unhandled tkhd version")), + _ => return Status::TkhdBadVersion.into(), } let track_id = be_u32(src)?; skip(src, 4)?; let duration = match version { 1 => be_u64(src)?, 0 => u64::from(be_u32(src)?), - _ => return Err(Error::InvalidData("unhandled tkhd version")), + _ => unreachable!("Should have returned Status::TkhdBadVersion"), }; // Skip uninteresting fields. skip(src, 16)?; @@ -4311,7 +4687,7 @@ fn read_elst(src: &mut BMFFBox) -> Result { // 32 bit segment duration and media times. (u64::from(be_u32(src)?), i64::from(be_i32(src)?)) } - _ => return Err(Error::InvalidData("unhandled elst version")), + _ => return Status::ElstBadVersion.into(), }; let media_rate_integer = be_i16(src)?; let media_rate_fraction = be_i16(src)?; @@ -4359,7 +4735,7 @@ fn read_mdhd(src: &mut BMFFBox) -> Result { }; (timescale, duration) } - _ => return Err(Error::InvalidData("unhandled mdhd version")), + _ => return Status::MdhdBadVersion.into(), }; // Skip uninteresting fields. @@ -4453,7 +4829,7 @@ fn read_ctts(src: &mut BMFFBox) -> Result { .checked_mul(8) .map_or(true, |bytes| u64::from(bytes) > src.bytes_left()) { - return Err(Error::InvalidData("insufficient data in 'ctts' box")); + return Status::CttsBadSize.into(); } let mut offsets = TryVec::with_capacity(counts.to_usize())?; @@ -4468,7 +4844,7 @@ fn read_ctts(src: &mut BMFFBox) -> Result { (count, offset) } _ => { - return Err(Error::InvalidData("unsupported version in 'ctts' box")); + return Status::CttsBadVersion.into(); } }; offsets.push(TimeOffset { @@ -4652,9 +5028,7 @@ fn read_flac_metadata(src: &mut BMFFBox) -> Result src.bytes_left() { - return Err(Error::InvalidData( - "FLACMetadataBlock larger than parent box", - )); + return Status::DflaBadMetadataBlockSize.into(); } let data = read_buf(src, length)?; Ok(FLACMetadataBlock { block_type, data }) @@ -4694,7 +5068,7 @@ fn find_descriptor(data: &[u8], esds: &mut ES_Descriptor) -> Result<()> { } if end.to_usize() > remains.len() || u64::from(end) < des.position() { - return Err(Error::InvalidData("Invalid descriptor.")); + return Status::EsdsBadDescriptor.into(); } let descriptor = &remains[des.position().try_into()?..end.to_usize()]; @@ -4889,9 +5263,7 @@ fn read_ds_descriptor(data: &[u8], esds: &mut ES_Descriptor) -> Result<()> { esds.audio_sample_rate = Some(sample_frequency_value); esds.audio_channel_count = Some(channel_counts); if !esds.decoder_specific_data.is_empty() { - return Err(Error::InvalidData( - "There can be only one DecSpecificInfoTag descriptor", - )); + return Status::EsdsDecSpecificIntoTagQuantity.into(); } esds.decoder_specific_data.extend_from_slice(data)?; @@ -4995,7 +5367,7 @@ fn read_dfla(src: &mut BMFFBox) -> Result { return Err(Error::Unsupported("unknown dfLa (FLAC) version")); } if flags != 0 { - return Err(Error::InvalidData("no-zero dfLa (FLAC) flags")); + return Status::DflaFlagsNonzero.into(); } let mut blocks = TryVec::new(); while src.bytes_left() > 0 { @@ -5005,15 +5377,11 @@ fn read_dfla(src: &mut BMFFBox) -> Result { // The box must have at least one meta block, and the first block // must be the METADATA_BLOCK_STREAMINFO if blocks.is_empty() { - return Err(Error::InvalidData("FLACSpecificBox missing metadata")); + return Status::DflaMissingMetadata.into(); } else if blocks[0].block_type != 0 { - return Err(Error::InvalidData( - "FLACSpecificBox must have STREAMINFO metadata first", - )); + return Status::DflaStreamInfoNotFirst.into(); } else if blocks[0].data.len() != 34 { - return Err(Error::InvalidData( - "FLACSpecificBox STREAMINFO block is the wrong size", - )); + return Status::DflaStreamInfoBadSize.into(); } Ok(FLACSpecificBox { version, blocks }) } @@ -5071,7 +5439,7 @@ pub fn serialize_opus_header( Err(e) => return Err(Error::from(e)), Ok(bytes) => { if bytes != 8 { - return Err(Error::InvalidData("Couldn't write OpusHead tag.")); + return Status::DopsOpusHeadWriteErr.into(); } } } @@ -5094,9 +5462,7 @@ pub fn serialize_opus_header( Err(e) => return Err(Error::from(e)), Ok(bytes) => { if bytes != table.channel_mapping.len() { - return Err(Error::InvalidData( - "Couldn't write channel mapping table data.", - )); + return Status::DopsChannelMappingWriteErr.into(); } } } @@ -5112,15 +5478,13 @@ fn read_alac(src: &mut BMFFBox) -> Result { return Err(Error::Unsupported("unknown alac (ALAC) version")); } if flags != 0 { - return Err(Error::InvalidData("no-zero alac (ALAC) flags")); + return Status::AlacFlagsNonzero.into(); } let length = match src.bytes_left() { x @ 24 | x @ 48 => x, _ => { - return Err(Error::InvalidData( - "ALACSpecificBox magic cookie is the wrong size", - )) + return Status::AlacBadMagicCookieSize.into(); } }; let data = read_buf(src, length)?; @@ -5133,15 +5497,14 @@ fn read_alac(src: &mut BMFFBox) -> Result { /// See [\[ISOBMFF\]: reserved (field = 0;) handling is ambiguous](https://github.com/MPEGGroup/FileFormat/issues/36) fn read_hdlr(src: &mut BMFFBox, strictness: ParseStrictness) -> Result { if read_fullbox_version_no_flags(src)? != 0 { - return Err(Error::Unsupported("hdlr version")); + return Status::HdlrUnsupportedVersion.into(); } let pre_defined = be_u32(src)?; if pre_defined != 0 { - fail_if( + fail_with_status_if( strictness == ParseStrictness::Strict, - "The HandlerBox 'pre_defined' field shall be 0 \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", + Status::HdlrPredefinedNonzero, )?; } @@ -5150,10 +5513,9 @@ fn read_hdlr(src: &mut BMFFBox, strictness: ParseStrictness) -> Resu for _ in 1..=3 { let reserved = be_u32(src)?; if reserved != 0 { - fail_if( + fail_with_status_if( strictness == ParseStrictness::Strict, - "The HandlerBox 'reserved' fields shall be 0 \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", + Status::HdlrReservedNonzero, )?; } } @@ -5161,29 +5523,25 @@ fn read_hdlr(src: &mut BMFFBox, strictness: ParseStrictness) -> Resu match std::str::from_utf8(src.read_into_try_vec()?.as_slice()) { Ok(name) => { match name.bytes().filter(|&b| b == b'\0').count() { - 0 => fail_if( + 0 => fail_with_status_if( strictness != ParseStrictness::Permissive, - "The HandlerBox 'name' field shall be null-terminated \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", + Status::HdlrNameNoNul, )?, 1 => (), n => // See https://github.com/MPEGGroup/FileFormat/issues/35 { error!("Found {} nul bytes in {:x?}", n, name); - fail_if( + fail_with_status_if( strictness == ParseStrictness::Strict, - "The HandlerBox 'name' field shall have a NUL byte \ - only in the final position \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", + Status::HdlrNameMultipleNul, )? } } } - Err(_) => fail_if( + Err(_) => fail_with_status_if( strictness != ParseStrictness::Permissive, - "The HandlerBox 'name' field shall be valid utf8 \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", + Status::HdlrNameNotUtf8, )?, } @@ -5233,7 +5591,7 @@ fn read_video_sample_entry(src: &mut BMFFBox) -> Result && name != BoxType::ProtectedVisualSampleEntry) || codec_specific.is_some() { - return Err(Error::InvalidData("malformed video sample entry")); + return Status::StsdBadVideoSampleEntry.into(); } let avcc_size = b .head @@ -5247,7 +5605,7 @@ fn read_video_sample_entry(src: &mut BMFFBox) -> Result } BoxType::H263SpecificBox => { if (name != BoxType::H263SampleEntry) || codec_specific.is_some() { - return Err(Error::InvalidData("malformed video sample entry")); + return Status::StsdBadVideoSampleEntry.into(); } let h263_dec_spec_struc_size = b .head @@ -5266,21 +5624,21 @@ fn read_video_sample_entry(src: &mut BMFFBox) -> Result && name != BoxType::ProtectedVisualSampleEntry) || codec_specific.is_some() { - return Err(Error::InvalidData("malformed video sample entry")); + return Status::StsdBadVideoSampleEntry.into(); } let vpcc = read_vpcc(&mut b)?; codec_specific = Some(VideoCodecSpecific::VPxConfig(vpcc)); } BoxType::AV1CodecConfigurationBox => { if name != BoxType::AV1SampleEntry && name != BoxType::ProtectedVisualSampleEntry { - return Err(Error::InvalidData("malformed video sample entry")); + return Status::StsdBadVideoSampleEntry.into(); } let av1c = read_av1c(&mut b)?; codec_specific = Some(VideoCodecSpecific::AV1Config(av1c)); } BoxType::ESDBox => { if name != BoxType::MP4VideoSampleEntry || codec_specific.is_some() { - return Err(Error::InvalidData("malformed video sample entry")); + return Status::StsdBadVideoSampleEntry.into(); } #[cfg(not(feature = "mp4v"))] { @@ -5298,7 +5656,7 @@ fn read_video_sample_entry(src: &mut BMFFBox) -> Result #[cfg(feature = "mp4v")] { // Read ES_Descriptor inside an esds box. - // See ISOBMFF (ISO 14496-1:2010 §7.2.6.5) + // See ISOBMFF (ISO 14496-1:2010) § 7.2.6.5 let esds = read_esds(&mut b)?; codec_specific = Some(VideoCodecSpecific::ESDSConfig(esds.decoder_specific_data)); @@ -5306,7 +5664,7 @@ fn read_video_sample_entry(src: &mut BMFFBox) -> Result } BoxType::ProtectionSchemeInfoBox => { if name != BoxType::ProtectedVisualSampleEntry { - return Err(Error::InvalidData("malformed video sample entry")); + return Status::StsdBadVideoSampleEntry.into(); } let sinf = read_sinf(&mut b)?; debug!("{:?} (sinf)", sinf); @@ -5347,7 +5705,7 @@ fn read_qt_wave_atom(src: &mut BMFFBox) -> Result { } } - codec_specific.ok_or(Error::InvalidData("malformed audio sample entry")) + codec_specific.ok_or_else(|| Error::from(Status::EsdsBadAudioSampleEntry)) } /// Parse an audio description inside an stsd box. @@ -5424,7 +5782,7 @@ fn read_audio_sample_entry(src: &mut BMFFBox) -> Result && name != BoxType::ProtectedAudioSampleEntry) || codec_specific.is_some() { - return Err(Error::InvalidData("malformed audio sample entry")); + return Status::StsdBadAudioSampleEntry.into(); } let esds = read_esds(&mut b)?; codec_type = esds.audio_codec; @@ -5434,7 +5792,7 @@ fn read_audio_sample_entry(src: &mut BMFFBox) -> Result if (name != BoxType::FLACSampleEntry && name != BoxType::ProtectedAudioSampleEntry) || codec_specific.is_some() { - return Err(Error::InvalidData("malformed audio sample entry")); + return Status::StsdBadAudioSampleEntry.into(); } let dfla = read_dfla(&mut b)?; codec_type = CodecType::FLAC; @@ -5444,7 +5802,7 @@ fn read_audio_sample_entry(src: &mut BMFFBox) -> Result if (name != BoxType::OpusSampleEntry && name != BoxType::ProtectedAudioSampleEntry) || codec_specific.is_some() { - return Err(Error::InvalidData("malformed audio sample entry")); + return Status::StsdBadAudioSampleEntry.into(); } let dops = read_dops(&mut b)?; codec_type = CodecType::Opus; @@ -5452,7 +5810,7 @@ fn read_audio_sample_entry(src: &mut BMFFBox) -> Result } BoxType::ALACSpecificBox => { if name != BoxType::ALACSpecificBox || codec_specific.is_some() { - return Err(Error::InvalidData("malformed audio sample entry")); + return Status::StsdBadAudioSampleEntry.into(); } let alac = read_alac(&mut b)?; codec_type = CodecType::ALAC; @@ -5465,7 +5823,7 @@ fn read_audio_sample_entry(src: &mut BMFFBox) -> Result } BoxType::ProtectionSchemeInfoBox => { if name != BoxType::ProtectedAudioSampleEntry { - return Err(Error::InvalidData("malformed audio sample entry")); + return Status::StsdBadAudioSampleEntry.into(); } let sinf = read_sinf(&mut b)?; debug!("{:?} (sinf)", sinf); @@ -5475,7 +5833,7 @@ fn read_audio_sample_entry(src: &mut BMFFBox) -> Result #[cfg(feature = "3gpp")] BoxType::AMRSpecificBox => { if codec_type != CodecType::AMRNB && codec_type != CodecType::AMRWB { - return Err(Error::InvalidData("malformed audio sample entry")); + return Status::StsdBadAudioSampleEntry.into(); } let amr_dec_spec_struc_size = b .head @@ -5513,16 +5871,25 @@ fn read_audio_sample_entry(src: &mut BMFFBox) -> Result /// See ISOBMFF (ISO 14496-12:2020) § 8.5.2 /// See MP4 (ISO 14496-14:2020) § 6.7.2 fn read_stsd(src: &mut BMFFBox, track: &mut Track) -> Result { - let (_, _) = read_fullbox_extra(src)?; + let (_, flags) = read_fullbox_extra(src)?; - let description_count = be_u32(src)?; - let mut descriptions = TryVec::new(); + if flags != 0 { + warn!( + "Unexpected `flags` value for SampleDescriptionBox (stsd): {}", + flags + ); + } - { - let mut iter = src.box_iter(); - while let Some(mut b) = iter.next_box()? { + let description_count = be_u32(src)?.to_usize(); + let mut descriptions = TryVec::with_capacity(description_count)?; + + let mut iter = src.box_iter(); + while descriptions.len() < description_count { + if let Some(mut b) = iter.next_box()? { let description = match track.track_type { TrackType::Video => read_video_sample_entry(&mut b), + TrackType::Picture => read_video_sample_entry(&mut b), + TrackType::AuxiliaryVideo => read_video_sample_entry(&mut b), TrackType::Audio => read_audio_sample_entry(&mut b), TrackType::Metadata => Err(Error::Unsupported("metadata track")), TrackType::Unknown => Err(Error::Unsupported("unknown track type")), @@ -5541,9 +5908,8 @@ fn read_stsd(src: &mut BMFFBox, track: &mut Track) -> Result(src: &mut BMFFBox) -> Result match b.head.name { BoxType::TrackEncryptionBox => { if tenc.is_some() { - return Err(Error::InvalidData( - "tenc box should be only one at most in sinf box", - )); + return Status::SchiQuantity.into(); } tenc = Some(read_tenc(&mut b)?); } @@ -5777,7 +6141,7 @@ fn read_ilst(src: &mut BMFFBox, meta: &mut MetadataBox) -> Result<() BoxType::CompilationEntry => meta.compilation = read_ilst_bool_data(&mut b)?, BoxType::AdvisoryEntry => { meta.advisory = read_ilst_u8_data(&mut b)?.and_then(|rtng| { - Some(match rtng.get(0)? { + Some(match rtng.first()? { 2 => AdvisoryRating::Clean, 0 => AdvisoryRating::Inoffensive, r => AdvisoryRating::Explicit(*r), @@ -5786,7 +6150,7 @@ fn read_ilst(src: &mut BMFFBox, meta: &mut MetadataBox) -> Result<() } BoxType::MediaTypeEntry => { meta.media_type = read_ilst_u8_data(&mut b)?.and_then(|stik| { - Some(match stik.get(0)? { + Some(match stik.first()? { 0 => MediaType::Movie, 1 => MediaType::Normal, 2 => MediaType::AudioBook, @@ -5817,7 +6181,7 @@ fn read_ilst(src: &mut BMFFBox, meta: &mut MetadataBox) -> Result<() } fn read_ilst_bool_data(src: &mut BMFFBox) -> Result> { - Ok(read_ilst_u8_data(src)?.and_then(|d| Some(d.get(0)? == &1))) + Ok(read_ilst_u8_data(src)?.and_then(|d| Some(d.first()? == &1))) } fn read_ilst_string_data(src: &mut BMFFBox) -> Result> { @@ -5861,7 +6225,7 @@ fn skip(src: &mut T, bytes: u64) -> Result<()> { fn read_buf(src: &mut T, size: u64) -> Result> { let buf = src.take(size).read_into_try_vec()?; if buf.len().to_u64() != size { - return Err(Error::InvalidData("failed buffer read")); + return Status::ReadBufErr.into(); } Ok(buf) diff --git a/third_party/rust/mp4parse/src/macros.rs b/third_party/rust/mp4parse/src/macros.rs index a893f7e1ac9a..15244a316fb8 100644 --- a/third_party/rust/mp4parse/src/macros.rs +++ b/third_party/rust/mp4parse/src/macros.rs @@ -6,7 +6,7 @@ macro_rules! check_parser_state { ( $src:expr ) => { if $src.limit() > 0 { debug!("bad parser state: {} content bytes left", $src.limit()); - return Err(Error::InvalidData("unread box content or bad parser sync")); + return Status::CheckParserStateErr.into(); } }; } diff --git a/third_party/rust/mp4parse/src/tests.rs b/third_party/rust/mp4parse/src/tests.rs index 0f2276002019..fa8d69e3e104 100644 --- a/third_party/rust/mp4parse/src/tests.rs +++ b/third_party/rust/mp4parse/src/tests.rs @@ -6,17 +6,16 @@ // file, You can obtain one at https://mozilla.org/MPL/2.0/. use super::read_mp4; -use super::Error; use super::ParseStrictness; +use super::{Error, Status}; use fallible_collections::TryRead as _; use std::convert::TryInto as _; use std::io::Cursor; use std::io::Read as _; -extern crate test_assembler; -use self::test_assembler::*; +use test_assembler::*; -use boxes::BoxType; +use crate::boxes::BoxType; enum BoxSize { Short(u32), @@ -122,7 +121,7 @@ fn read_box_header_short_unknown_size() { fn read_box_header_short_invalid_size() { let mut stream = make_box(BoxSize::UncheckedShort(2), b"test", |s| s); match super::read_box_header(&mut stream) { - Err(Error::InvalidData(s)) => assert_eq!(s, "malformed size"), + Err(Error::InvalidData(s)) => assert_eq!(s, Status::BoxBadSize), _ => panic!("unexpected result reading box with invalid size"), }; } @@ -131,7 +130,7 @@ fn read_box_header_short_invalid_size() { fn read_box_header_long_invalid_size() { let mut stream = make_box(BoxSize::UncheckedLong(2), b"test", |s| s); match super::read_box_header(&mut stream) { - Err(Error::InvalidData(s)) => assert_eq!(s, "malformed wide size"), + Err(Error::InvalidData(s)) => assert_eq!(s, Status::BoxBadWideSize), _ => panic!("unexpected result reading box with invalid size"), }; } @@ -490,7 +489,10 @@ fn read_hdlr_multiple_nul_in_name() { let mut stream = iter.next_box().unwrap().unwrap(); assert_eq!(stream.head.name, BoxType::HandlerBox); assert_eq!(stream.head.size, 45); - assert!(super::read_hdlr(&mut stream, ParseStrictness::Strict).is_err()); + assert_eq!( + super::Status::from(super::read_hdlr(&mut stream, ParseStrictness::Strict)), + super::Status::HdlrNameMultipleNul, + ); } #[test] @@ -515,13 +517,10 @@ fn read_hdlr_unsupported_version() { let mut stream = iter.next_box().unwrap().unwrap(); assert_eq!(stream.head.name, BoxType::HandlerBox); assert_eq!(stream.head.size, 32); - match super::read_hdlr(&mut stream, ParseStrictness::Normal) { - Err(Error::Unsupported(msg)) => assert_eq!("hdlr version", msg), - result => { - eprintln!("{:?}", result); - panic!("expected Error::Unsupported") - } - } + assert_eq!( + super::Status::from(super::read_hdlr(&mut stream, ParseStrictness::Normal)), + super::Status::HdlrUnsupportedVersion, + ); } #[test] @@ -533,17 +532,10 @@ fn read_hdlr_invalid_pre_defined_field() { let mut stream = iter.next_box().unwrap().unwrap(); assert_eq!(stream.head.name, BoxType::HandlerBox); assert_eq!(stream.head.size, 32); - match super::read_hdlr(&mut stream, ParseStrictness::Strict) { - Err(Error::InvalidData(msg)) => assert_eq!( - "The HandlerBox 'pre_defined' field shall be 0 \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", - msg - ), - result => { - eprintln!("{:?}", result); - panic!("expected Error::InvalidData") - } - } + assert_eq!( + super::Status::from(super::read_hdlr(&mut stream, ParseStrictness::Strict)), + super::Status::HdlrPredefinedNonzero, + ); } #[test] @@ -555,17 +547,10 @@ fn read_hdlr_invalid_reserved_field() { let mut stream = iter.next_box().unwrap().unwrap(); assert_eq!(stream.head.name, BoxType::HandlerBox); assert_eq!(stream.head.size, 32); - match super::read_hdlr(&mut stream, ParseStrictness::Strict) { - Err(Error::InvalidData(msg)) => assert_eq!( - "The HandlerBox 'reserved' fields shall be 0 \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", - msg - ), - result => { - eprintln!("{:?}", result); - panic!("expected Error::InvalidData") - } - } + assert_eq!( + super::Status::from(super::read_hdlr(&mut stream, ParseStrictness::Strict)), + super::Status::HdlrReservedNonzero, + ); } #[test] @@ -577,17 +562,10 @@ fn read_hdlr_zero_length_name() { let mut stream = iter.next_box().unwrap().unwrap(); assert_eq!(stream.head.name, BoxType::HandlerBox); assert_eq!(stream.head.size, 32); - match super::read_hdlr(&mut stream, ParseStrictness::Normal) { - Err(Error::InvalidData(msg)) => assert_eq!( - "The HandlerBox 'name' field shall be null-terminated \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2", - msg - ), - result => { - eprintln!("{:?}", result); - panic!("expected Error::InvalidData") - } - } + assert_eq!( + super::Status::from(super::read_hdlr(&mut stream, ParseStrictness::Normal)), + super::Status::HdlrNameNoNul, + ); } #[test] @@ -1278,7 +1256,7 @@ fn read_esds_invalid_descriptor() { let mut stream = iter.next_box().unwrap().unwrap(); match super::read_esds(&mut stream) { - Err(Error::InvalidData(s)) => assert_eq!(s, "Invalid descriptor."), + Err(Error::InvalidData(s)) => assert_eq!(s, Status::EsdsBadDescriptor), _ => panic!("unexpected result with invalid descriptor"), } } diff --git a/third_party/rust/mp4parse/src/unstable.rs b/third_party/rust/mp4parse/src/unstable.rs index eeb16f8ed80f..da9d479366bc 100644 --- a/third_party/rust/mp4parse/src/unstable.rs +++ b/third_party/rust/mp4parse/src/unstable.rs @@ -106,7 +106,7 @@ impl PartialEq for CheckedInteger { /// sample data offset (start and end), composition time in microseconds /// (start and end) and whether it is a sync sample #[repr(C)] -#[derive(Default, Debug, PartialEq)] +#[derive(Default, Debug, PartialEq, Eq)] pub struct Indice { /// The byte offset in the file where the indexed sample begins. pub start_offset: CheckedInteger, @@ -489,7 +489,7 @@ where }) } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct Microseconds(pub T); /// Convert `time` in media's global (mvhd) timescale to microseconds, diff --git a/third_party/rust/mp4parse/tests/corrupt/invalid-transformation-order.avif b/third_party/rust/mp4parse/tests/corrupt/invalid-transformation-order.avif new file mode 100644 index 000000000000..d02ef72424fc Binary files /dev/null and b/third_party/rust/mp4parse/tests/corrupt/invalid-transformation-order.avif differ diff --git a/third_party/rust/mp4parse/tests/corrupt/no-alpha-ispe.avif b/third_party/rust/mp4parse/tests/corrupt/no-alpha-ispe.avif new file mode 100644 index 000000000000..0183a6083146 Binary files /dev/null and b/third_party/rust/mp4parse/tests/corrupt/no-alpha-ispe.avif differ diff --git a/third_party/rust/mp4parse/tests/corrupt/transformation-before-ispe.avif b/third_party/rust/mp4parse/tests/corrupt/transformation-before-ispe.avif new file mode 100644 index 000000000000..4ff865273451 Binary files /dev/null and b/third_party/rust/mp4parse/tests/corrupt/transformation-before-ispe.avif differ diff --git a/third_party/rust/mp4parse/tests/imir-missing-essential.avif b/third_party/rust/mp4parse/tests/imir-missing-essential.avif index 6baa293ab688..760a7b9390be 100644 Binary files a/third_party/rust/mp4parse/tests/imir-missing-essential.avif and b/third_party/rust/mp4parse/tests/imir-missing-essential.avif differ diff --git a/third_party/rust/mp4parse/tests/irot-missing-essential.avif b/third_party/rust/mp4parse/tests/irot-missing-essential.avif index 8c62e55ecc8c..07c32e3604c3 100644 Binary files a/third_party/rust/mp4parse/tests/irot-missing-essential.avif and b/third_party/rust/mp4parse/tests/irot-missing-essential.avif differ diff --git a/third_party/rust/mp4parse/tests/public.rs b/third_party/rust/mp4parse/tests/public.rs index a35cef666649..28ef1ba1e33b 100644 --- a/third_party/rust/mp4parse/tests/public.rs +++ b/third_party/rust/mp4parse/tests/public.rs @@ -2,9 +2,9 @@ // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -extern crate mp4parse as mp4; +use mp4parse as mp4; -use mp4::{Error, ParseStrictness, Status}; +use crate::mp4::{ParseStrictness, Status}; use std::convert::TryInto; use std::fs::File; use std::io::{Cursor, Read, Seek, SeekFrom}; @@ -53,6 +53,9 @@ static IMAGE_AVIF_NO_PITM: &str = "tests/corrupt/no-pitm.avif"; static IMAGE_AVIF_NO_PIXI: &str = "tests/corrupt/no-pixi.avif"; static IMAGE_AVIF_NO_AV1C: &str = "tests/corrupt/no-av1C.avif"; static IMAGE_AVIF_NO_ISPE: &str = "tests/corrupt/no-ispe.avif"; +static IMAGE_AVIF_NO_ALPHA_ISPE: &str = "tests/corrupt/no-alpha-ispe.avif"; +static IMAGE_AVIF_TRANSFORM_ORDER: &str = "tests/corrupt/invalid-transformation-order.avif"; +static IMAGE_AVIF_TRANSFORM_BEFORE_ISPE: &str = "tests/corrupt/transformation-before-ispe.avif"; static IMAGE_AVIF_NO_ALPHA_AV1C: &str = "tests/corrupt/no-alpha-av1C.avif"; static IMAGE_AVIF_NO_ALPHA_PIXI: &str = "tests/corrupt/no-pixi-for-alpha.avif"; static IMAGE_AVIF_AV1C_MISSING_ESSENTIAL: &str = "tests/av1C-missing-essential.avif"; @@ -92,8 +95,6 @@ static AVIF_UNSUPPORTED_IMAGES: &[&str] = &[ AVIF_GRID, AVIF_GRID_A1LX, AVIF_LSEL, - AVIF_AVIS_MAJOR_NO_PITM, - AVIF_AVIS_MAJOR_WITH_PITM_AND_ALPHA, "av1-avif/testFiles/Apple/multilayer_examples/animals_00_multilayer_a1lx.avif", "av1-avif/testFiles/Apple/multilayer_examples/animals_00_multilayer_a1op.avif", "av1-avif/testFiles/Apple/multilayer_examples/animals_00_multilayer_a1op_lsel.avif", @@ -104,7 +105,6 @@ static AVIF_UNSUPPORTED_IMAGES: &[&str] = &[ "av1-avif/testFiles/Microsoft/Chimera_10bit_cropped_to_1920x1008.avif", "av1-avif/testFiles/Microsoft/Chimera_10bit_cropped_to_1920x1008_with_HDR_metadata.avif", "av1-avif/testFiles/Microsoft/Chimera_8bit_cropped_480x256.avif", - "av1-avif/testFiles/Netflix/avis/alpha_video.avif", "av1-avif/testFiles/Xiph/abandoned_filmgrain.avif", "av1-avif/testFiles/Xiph/fruits_2layer_thumbsize.avif", "av1-avif/testFiles/Xiph/quebec_3layer_op2.avif", @@ -112,18 +112,27 @@ static AVIF_UNSUPPORTED_IMAGES: &[&str] = &[ "av1-avif/testFiles/Xiph/tiger_3layer_3res.avif", "link-u-avif-sample-images/kimono.crop.avif", "link-u-avif-sample-images/kimono.mirror-vertical.rotate270.crop.avif", - "link-u-avif-sample-images/star-10bpc-with-alpha.avifs", - "link-u-avif-sample-images/star-10bpc.avifs", - "link-u-avif-sample-images/star-12bpc-with-alpha.avifs", - "link-u-avif-sample-images/star-12bpc.avifs", - "link-u-avif-sample-images/star-8bpc-with-alpha.avifs", - "link-u-avif-sample-images/star-8bpc.avifs", ]; /// See https://github.com/AOMediaCodec/av1-avif/issues/150 /// https://github.com/AOMediaCodec/av1-avif/issues/174 -/// and https://github.com/AOMediaCodec/av1-avif/issues/177 +/// https://github.com/AOMediaCodec/av1-avif/issues/177 +/// and https://github.com/AOMediaCodec/av1-avif/issues/178 // TODO: make this into a map of expected errors? static AV1_AVIF_CORRUPT_IMAGES: &[&str] = &[ + "av1-avif/testFiles/Link-U/kimono.crop.avif", + "av1-avif/testFiles/Link-U/kimono.mirror-horizontal.avif", + "av1-avif/testFiles/Link-U/kimono.mirror-vertical.avif", + "av1-avif/testFiles/Link-U/kimono.mirror-vertical.rotate270.avif", + "av1-avif/testFiles/Link-U/kimono.mirror-vertical.rotate270.crop.avif", + "av1-avif/testFiles/Link-U/kimono.rotate90.avif", + "av1-avif/testFiles/Link-U/kimono.rotate270.avif", + "link-u-avif-sample-images/kimono.crop.avif", + "link-u-avif-sample-images/kimono.mirror-horizontal.avif", + "link-u-avif-sample-images/kimono.mirror-vertical.avif", + "link-u-avif-sample-images/kimono.mirror-vertical.rotate270.avif", + "link-u-avif-sample-images/kimono.mirror-vertical.rotate270.crop.avif", + "link-u-avif-sample-images/kimono.rotate90.avif", + "link-u-avif-sample-images/kimono.rotate270.avif", "link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.avif", "link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-full.monochrome.avif", "link-u-avif-sample-images/plum-blossom-large.profile0.10bpc.yuv420.alpha-limited.avif", @@ -328,7 +337,7 @@ fn public_api() { assert!(a.samplesize > 0); assert!(a.samplerate > 0.0); } - mp4::TrackType::Metadata | mp4::TrackType::Unknown => {} + _ => {} } } } @@ -849,7 +858,7 @@ fn public_mp4_bug_1185230() { fn public_mp4_ctts_overflow() { let input = &mut File::open("tests/clusterfuzz-testcase-minimized-mp4-6093954524250112") .expect("Unknown file"); - assert_invalid_data(mp4::read_mp4(input), "insufficient data in 'ctts' box"); + assert_eq!(Status::from(mp4::read_mp4(input)), Status::CttsBadSize); } #[test] @@ -911,22 +920,6 @@ fn public_avif_bug_1661347() { assert!(mp4::read_avif(input, ParseStrictness::Normal).is_err()); } -fn assert_invalid_data(result: mp4::Result, expected_msg: &str) { - match result { - Err(Error::InvalidData(msg)) if msg == expected_msg => {} - Err(Error::InvalidData(msg)) if msg != expected_msg => { - panic!( - "Error message mismatch\nExpected: {}\nFound: {}", - expected_msg, msg - ); - } - r => panic!( - "Expected Err(Error::InvalidData({:?}), found {:?}", - expected_msg, r - ), - } -} - fn for_strictness_result( path: &str, check: impl Fn(ParseStrictness, mp4::Result), @@ -944,18 +937,7 @@ fn for_strictness_result( } /// Check that input generates the expected error only in strict parsing mode -fn assert_avif_should(path: &str, expected_msg: &str) { - let input = &mut File::open(path).expect("Unknown file"); - assert_invalid_data(mp4::read_avif(input, ParseStrictness::Strict), expected_msg); - input.seek(SeekFrom::Start(0)).expect("rewind failed"); - mp4::read_avif(input, ParseStrictness::Normal).expect("ParseStrictness::Normal failed"); - input.seek(SeekFrom::Start(0)).expect("rewind failed"); - mp4::read_avif(input, ParseStrictness::Permissive).expect("ParseStrictness::Permissive failed"); -} - -/// Check that input generates the expected error only in strict parsing mode -// TODO: replace assert_avif_should -fn assert_avif_should2(path: &str, expected: Status) { +fn assert_avif_should(path: &str, expected: Status) { for_strictness_result(path, |strictness, result| { if strictness == ParseStrictness::Strict { assert_eq!(expected, Status::from(result)); @@ -966,17 +948,7 @@ fn assert_avif_should2(path: &str, expected: Status) { } /// Check that input generates the expected error unless in permissive parsing mode -fn assert_avif_shall(path: &str, expected_msg: &str) { - let input = &mut File::open(path).expect("Unknown file"); - assert_invalid_data(mp4::read_avif(input, ParseStrictness::Strict), expected_msg); - input.seek(SeekFrom::Start(0)).expect("rewind failed"); - assert_invalid_data(mp4::read_avif(input, ParseStrictness::Normal), expected_msg); - input.seek(SeekFrom::Start(0)).expect("rewind failed"); - mp4::read_avif(input, ParseStrictness::Permissive).expect("ParseStrictness::Permissive failed"); -} - -// TODO: replace assert_avif_shall -fn assert_avif_shall2(path: &str, expected: Status) { +fn assert_avif_shall(path: &str, expected: Status) { for_strictness_result(path, |strictness, result| { if strictness == ParseStrictness::Permissive { assert!(result.is_ok()); @@ -992,7 +964,7 @@ fn assert_avif_shall2(path: &str, expected: Status) { #[test] fn public_avif_av1c_missing_essential() { - assert_avif_should2(IMAGE_AVIF_AV1C_MISSING_ESSENTIAL, Status::TxformNoEssential); + assert_avif_should(IMAGE_AVIF_AV1C_MISSING_ESSENTIAL, Status::TxformNoEssential); } #[test] @@ -1008,36 +980,30 @@ fn public_avif_clap_missing_essential() { #[test] fn public_avif_imir_missing_essential() { - assert_avif_should2(IMAGE_AVIF_IMIR_MISSING_ESSENTIAL, Status::TxformNoEssential); + assert_avif_should(IMAGE_AVIF_IMIR_MISSING_ESSENTIAL, Status::TxformNoEssential); } #[test] fn public_avif_irot_missing_essential() { - assert_avif_should2(IMAGE_AVIF_IROT_MISSING_ESSENTIAL, Status::TxformNoEssential); + assert_avif_should(IMAGE_AVIF_IROT_MISSING_ESSENTIAL, Status::TxformNoEssential); } #[test] fn public_avif_ipma_bad_version() { - let expected_msg = "The ipma version 0 should be used unless 32-bit \ - item_ID values are needed \ - per ISOBMFF (ISO 14496-12:2020 § 8.11.14.1"; - assert_avif_should(IMAGE_AVIF_IPMA_BAD_VERSION, expected_msg); + assert_avif_should(IMAGE_AVIF_IPMA_BAD_VERSION, Status::IpmaBadVersion); } #[test] fn public_avif_ipma_bad_flags() { - let expected_msg = "Unless there are more than 127 properties in the \ - ItemPropertyContainerBox, flags should be equal to 0 \ - per ISOBMFF (ISO 14496-12:2020 § 8.11.14.1"; - assert_avif_should(IMAGE_AVIF_IPMA_BAD_FLAGS, expected_msg); + assert_avif_should(IMAGE_AVIF_IPMA_BAD_FLAGS, Status::IpmaFlagsNonzero); } #[test] fn public_avif_ipma_duplicate_version_and_flags() { - let expected_msg = "There shall be at most one ItemPropertyAssociationbox \ - with a given pair of values of version and flags \ - per ISOBMFF (ISO 14496-12:2020 § 8.11.14.1"; - assert_avif_shall(IMAGE_AVIF_IPMA_DUPLICATE_VERSION_AND_FLAGS, expected_msg); + assert_avif_shall( + IMAGE_AVIF_IPMA_DUPLICATE_VERSION_AND_FLAGS, + Status::IpmaBadQuantity, + ); } #[test] @@ -1046,101 +1012,90 @@ fn public_avif_ipma_duplicate_version_and_flags() { // which is kind of annoying to make pass the "should" requirements on flags and version // as well as the "shall" requirement on duplicate version and flags fn public_avif_ipma_duplicate_item_id() { - let expected_msg = "There shall be at most one occurrence of a given item_ID, \ - in the set of ItemPropertyAssociationBox boxes \ - per ISOBMFF (ISO 14496-12:2020) § 8.11.14.1"; let input = &mut File::open(IMAGE_AVIF_IPMA_DUPLICATE_ITEM_ID).expect("Unknown file"); - assert_invalid_data( - mp4::read_avif(input, ParseStrictness::Permissive), - expected_msg, + assert_eq!( + Status::from(mp4::read_avif(input, ParseStrictness::Permissive)), + Status::IpmaDuplicateItemId ) } #[test] fn public_avif_ipma_invalid_property_index() { - let expected_msg = "Invalid property index in ipma"; - assert_avif_shall(IMAGE_AVIF_IPMA_INVALID_PROPERTY_INDEX, expected_msg); + assert_avif_shall(IMAGE_AVIF_IPMA_INVALID_PROPERTY_INDEX, Status::IpmaBadIndex); } #[test] fn public_avif_hdlr_first_in_meta() { - let expected_msg = "The HandlerBox shall be the first contained box within \ - the MetaBox \ - per MIAF (ISO 23000-22:2019) § 7.2.1.5"; - assert_avif_shall(IMAGE_AVIF_NO_HDLR, expected_msg); - assert_avif_shall(IMAGE_AVIF_HDLR_NOT_FIRST, expected_msg); + assert_avif_shall(IMAGE_AVIF_NO_HDLR, Status::HdlrNotFirst); + assert_avif_shall(IMAGE_AVIF_HDLR_NOT_FIRST, Status::HdlrNotFirst); } #[test] fn public_avif_hdlr_is_pict() { - let expected_msg = "The HandlerBox handler_type must be 'pict' \ - per MIAF (ISO 23000-22:2019) § 7.2.1.5"; - assert_avif_shall(IMAGE_AVIF_HDLR_NOT_PICT, expected_msg); + assert_avif_shall(IMAGE_AVIF_HDLR_NOT_PICT, Status::HdlrTypeNotPict); } #[test] fn public_avif_hdlr_nonzero_reserved() { - let expected_msg = "The HandlerBox 'reserved' fields shall be 0 \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2"; // This is a "should" despite the spec indicating a (somewhat ambiguous) // requirement that this field is set to zero. // See comments in read_hdlr - assert_avif_should(IMAGE_AVIF_HDLR_NONZERO_RESERVED, expected_msg); + assert_avif_should( + IMAGE_AVIF_HDLR_NONZERO_RESERVED, + Status::HdlrReservedNonzero, + ); } #[test] fn public_avif_hdlr_multiple_nul() { - let expected_msg = "The HandlerBox 'name' field shall have a NUL byte \ - only in the final position \ - per ISOBMFF (ISO 14496-12:2020) § 8.4.3.2"; - // This is a "should" despite the spec indicating a (somewhat ambiguous) // requirement about extra data in boxes // See comments in read_hdlr - assert_avif_should(IMAGE_AVIF_HDLR_MULTIPLE_NUL, expected_msg); + assert_avif_should(IMAGE_AVIF_HDLR_MULTIPLE_NUL, Status::HdlrNameMultipleNul); } #[test] fn public_avif_no_mif1() { - let expected_msg = "The FileTypeBox should contain 'mif1' in the compatible_brands list \ - per MIAF (ISO 23000-22:2019) § 7.2.1.2"; - assert_avif_should(IMAGE_AVIF_NO_MIF1, expected_msg); + assert_avif_should(IMAGE_AVIF_NO_MIF1, Status::MissingMif1Brand); } #[test] fn public_avif_no_pitm() { - assert_avif_shall2(IMAGE_AVIF_NO_PITM, Status::NoPrimaryItem); + assert_avif_shall(IMAGE_AVIF_NO_PITM, Status::PitmMissing); } #[test] fn public_avif_pixi_present_for_displayable_images() { - let expected_msg = "The pixel information property shall be associated with every image \ - that is displayable (not hidden) \ - per MIAF (ISO/IEC 23000-22:2019) specification § 7.3.6.6"; let pixi_test = if cfg!(feature = "missing-pixi-permitted") { assert_avif_should } else { assert_avif_shall }; - pixi_test(IMAGE_AVIF_NO_PIXI, expected_msg); - pixi_test(IMAGE_AVIF_NO_ALPHA_PIXI, expected_msg); + pixi_test(IMAGE_AVIF_NO_PIXI, Status::PixiMissing); + pixi_test(IMAGE_AVIF_NO_ALPHA_PIXI, Status::PixiMissing); } #[test] fn public_avif_av1c_present_for_av01() { - let expected_msg = "One AV1 Item Configuration Property (av1C) \ - is mandatory for an image item of type 'av01' \ - per AVIF specification § 2.2.1"; - assert_avif_shall(IMAGE_AVIF_NO_AV1C, expected_msg); - assert_avif_shall(IMAGE_AVIF_NO_ALPHA_AV1C, expected_msg); + assert_avif_shall(IMAGE_AVIF_NO_AV1C, Status::Av1cMissing); + assert_avif_shall(IMAGE_AVIF_NO_ALPHA_AV1C, Status::Av1cMissing); } #[test] fn public_avif_ispe_present() { - let expected_msg = "Missing 'ispe' property for primary item, required \ - per HEIF (ISO/IEC 23008-12:2017) § 6.5.3.1"; - assert_avif_shall(IMAGE_AVIF_NO_ISPE, expected_msg); + assert_avif_shall(IMAGE_AVIF_NO_ISPE, Status::IspeMissing); + assert_avif_shall(IMAGE_AVIF_NO_ALPHA_ISPE, Status::IspeMissing); +} + +#[test] +fn public_avif_transform_before_ispe() { + assert_avif_shall(IMAGE_AVIF_TRANSFORM_BEFORE_ISPE, Status::TxformBeforeIspe); +} + +#[test] +fn public_avif_transform_order() { + assert_avif_shall(IMAGE_AVIF_TRANSFORM_ORDER, Status::TxformOrder); } fn assert_unsupported_nonfatal(result: &mp4::Result, feature: mp4::Feature) { @@ -1192,7 +1147,7 @@ fn public_avif_a1lx() { #[test] fn public_avif_a1lx_marked_essential() { - assert_avif_shall2(IMAGE_AVIF_A1LX_MARKED_ESSENTIAL, Status::A1lxEssential); + assert_avif_shall(IMAGE_AVIF_A1LX_MARKED_ESSENTIAL, Status::A1lxEssential); } #[test] @@ -1202,7 +1157,7 @@ fn public_avif_a1op() { #[test] fn public_avif_a1op_missing_essential() { - assert_avif_shall2(IMAGE_AVIF_A1OP_MISSING_ESSENTIAL, Status::A1opNoEssential); + assert_avif_shall(IMAGE_AVIF_A1OP_MISSING_ESSENTIAL, Status::A1opNoEssential); } #[test] @@ -1212,7 +1167,7 @@ fn public_avif_lsel() { #[test] fn public_avif_lsel_missing_essential() { - assert_avif_shall2(IMAGE_AVIF_LSEL_MISSING_ESSENTIAL, Status::LselNoEssential); + assert_avif_shall(IMAGE_AVIF_LSEL_MISSING_ESSENTIAL, Status::LselNoEssential); } #[test] @@ -1237,8 +1192,8 @@ fn public_avis_major_no_pitm() { match mp4::read_avif(input, ParseStrictness::Normal) { Ok(context) => { assert_eq!(context.major_brand, mp4::AVIS_BRAND); - assert!(context.unsupported_features.contains(mp4::Feature::Avis)); assert!(context.primary_item_coded_data().is_none()); + assert!(context.sequence.is_some()); } Err(e) => panic!("Expected Ok(_), found {:?}", e), } @@ -1250,9 +1205,9 @@ fn public_avis_major_with_pitm_and_alpha() { match mp4::read_avif(input, ParseStrictness::Normal) { Ok(context) => { assert_eq!(context.major_brand, mp4::AVIS_BRAND); - assert!(context.unsupported_features.contains(mp4::Feature::Avis)); assert!(context.primary_item_coded_data().is_some()); assert!(context.alpha_item_coded_data().is_some()); + assert!(context.sequence.is_some()); } Err(e) => panic!("Expected Ok(_), found {:?}", e), } @@ -1260,7 +1215,7 @@ fn public_avis_major_with_pitm_and_alpha() { #[test] fn public_avif_avis_major_no_moov() { - assert_avif_shall2(AVIF_AVIS_MAJOR_NO_MOOV, Status::NoMoov); + assert_avif_shall(AVIF_AVIS_MAJOR_NO_MOOV, Status::MoovMissing); } #[test] diff --git a/third_party/rust/mp4parse_capi/.cargo-checksum.json b/third_party/rust/mp4parse_capi/.cargo-checksum.json index e6f11e0f5863..a3484b4bb656 100644 --- a/third_party/rust/mp4parse_capi/.cargo-checksum.json +++ b/third_party/rust/mp4parse_capi/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"5074d01f075fd3c870f6e7f864e5a9b1ac7eb2af671110b58d9b1f3b830f72df","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"f776ed4bbb7b58a5684402a9c5c28dfe1fa02b6b184139b2c2c49384cc1e3723","cbindgen.toml":"62066cd34285ab9e7f1cc5db8950a51e9e080f5a85bd55ad43d7022e4eae2758","examples/dump.rs":"a22630f5f1434d4832f9113dcb18161c0248465e8844d470da3c76bb9910677a","src/lib.rs":"21d0b024037be9ced0f4647925bde55ca5e3fd4272a89847a4431235244b2e34","tests/test_chunk_out_of_range.rs":"73ffb5b60e826f6136d22142c030d17d0f72b85c675ccbf1300c84f9deb73131","tests/test_encryption.rs":"196ba22efc3e693c940bcc1e45d29bec9cf290b81cf77a68c1d254f6b38e6ae3","tests/test_fragment.rs":"a4b275d7159c50b265db583a1cc8255bd0a141e3a44432355713b895a7970d37","tests/test_rotation.rs":"a5aa6cc88a327ec90d6898b2c4f5ac397667ce349d829deae1af46c230be9cb6","tests/test_sample_table.rs":"d191fe5836c58d4bdffd7390da029bb5371f8afb5b1a8d636e15ae0dd6b5f4c8","tests/test_workaround_stsc.rs":"85cd2546224b5c4891a60d86e2d302a56e0c0798c2636ad241603a00ebfa46b5"},"package":null} \ No newline at end of file +{"files":{"Cargo.toml":"31d4cece36ac4235873bc71953c450805290ddc7277e834d4d56fc7571dac4ed","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"f776ed4bbb7b58a5684402a9c5c28dfe1fa02b6b184139b2c2c49384cc1e3723","cbindgen.toml":"62066cd34285ab9e7f1cc5db8950a51e9e080f5a85bd55ad43d7022e4eae2758","examples/dump.rs":"7bc2898bc52b2f7feb5e0ddbe13bd93270dfc71b871067c35011902e5a8f4477","src/lib.rs":"0f4e5cf85a2c784d47bf13e4e720aca6efc86520e49835a0deea42025c5be120","tests/test_chunk_out_of_range.rs":"4039d0db0ee5973787e4ca14cea510fd958ae5d21856a79240a5e7b826caa18d","tests/test_encryption.rs":"f62131a36b0516caf9e2c48f8aea060d300b0f5c8a32bc54d31cbc97aa25b4e6","tests/test_fragment.rs":"b87fe0a967c5a3184f9264955b08209e64769e6358ff670665fc719380f22157","tests/test_rotation.rs":"23fa4898eca2e17255bc1ba2f538707a6554fb4644bb75f80548ae56a7cd2d44","tests/test_sample_table.rs":"6e2f5eaadede1e37a5ced722bc071506fd0eecf3cd17310479d3c9692632a2cd","tests/test_workaround_stsc.rs":"1d17a394f55e1524c30888bfe1e57e2b0457444b79c23eb91b02d2edf859c9ad"},"package":null} \ No newline at end of file diff --git a/third_party/rust/mp4parse_capi/Cargo.toml b/third_party/rust/mp4parse_capi/Cargo.toml index 57ae8fcfa12b..6b95a3ecb049 100644 --- a/third_party/rust/mp4parse_capi/Cargo.toml +++ b/third_party/rust/mp4parse_capi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mp4parse_capi" -version = "0.13.0" +version = "0.16.0" authors = [ "Ralph Giles ", "Matthew Gregan ", @@ -12,7 +12,7 @@ authors = [ description = "Parser for ISO base media file format (mp4)" documentation = "https://docs.rs/mp4parse_capi/" license = "MPL-2.0" - +edition = "2018" repository = "https://github.com/mozilla/mp4parse-rust" # Avoid complaints about trying to package test files. @@ -27,11 +27,11 @@ travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" } byteorder = "1.2.1" fallible_collections = { version = "0.4", features = ["std_io"] } log = "0.4" -mp4parse = { version = "0.13.0", path = "../mp4parse", features = ["unstable-api"] } +mp4parse = { version = "0.16.0", path = "../mp4parse", features = ["unstable-api"] } num-traits = "0.2.14" [dev-dependencies] -env_logger = "0.8" +env_logger = "0.9" [features] missing-pixi-permitted = ["mp4parse/missing-pixi-permitted"] diff --git a/third_party/rust/mp4parse_capi/examples/dump.rs b/third_party/rust/mp4parse_capi/examples/dump.rs index 1392b304f80b..f61693b9f9ec 100644 --- a/third_party/rust/mp4parse_capi/examples/dump.rs +++ b/third_party/rust/mp4parse_capi/examples/dump.rs @@ -1,11 +1,4 @@ -extern crate mp4parse; -extern crate mp4parse_capi; - -#[macro_use] -extern crate log; - -extern crate env_logger; - +use log::info; use mp4parse::ParseStrictness; use mp4parse_capi::*; use std::env; @@ -119,7 +112,9 @@ fn dump_file(filename: &str, strictness: ParseStrictness) { } } } - Mp4parseTrackType::Video => { + Mp4parseTrackType::Video + | Mp4parseTrackType::Picture + | Mp4parseTrackType::AuxiliaryVideo => { let mut video_info = Mp4parseTrackVideoInfo::default(); match mp4parse_get_track_video_info(parser, i, &mut video_info) { Mp4parseStatus::Ok => { diff --git a/third_party/rust/mp4parse_capi/src/lib.rs b/third_party/rust/mp4parse_capi/src/lib.rs index 627015e69f88..90a71e939d36 100644 --- a/third_party/rust/mp4parse_capi/src/lib.rs +++ b/third_party/rust/mp4parse_capi/src/lib.rs @@ -5,7 +5,6 @@ //! # Examples //! //! ```rust -//! extern crate mp4parse_capi; //! use std::io::Read; //! //! extern fn buf_read(buf: *mut u8, size: usize, userdata: *mut std::os::raw::c_void) -> isize { @@ -35,11 +34,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -extern crate byteorder; -extern crate log; -extern crate mp4parse; -extern crate num_traits; - use byteorder::WriteBytesExt; use std::convert::TryFrom; use std::convert::TryInto; @@ -51,6 +45,7 @@ use mp4parse::serialize_opus_header; use mp4parse::unstable::{ create_sample_table, media_time_to_us, track_time_to_us, CheckedInteger, Indice, Microseconds, }; +use mp4parse::AV1ConfigBox; use mp4parse::AudioCodecSpecific; use mp4parse::AvifContext; use mp4parse::CodecType; @@ -59,6 +54,7 @@ use mp4parse::MediaContext; pub use mp4parse::ParseStrictness; use mp4parse::SampleEntry; pub use mp4parse::Status as Mp4parseStatus; +use mp4parse::Track; use mp4parse::TrackType; use mp4parse::TryBox; use mp4parse::TryHashMap; @@ -76,11 +72,13 @@ struct HashMap; struct String; #[repr(C)] -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Eq, Debug)] pub enum Mp4parseTrackType { Video = 0, - Audio = 1, - Metadata = 2, + Picture = 1, + AuxiliaryVideo = 2, + Audio = 3, + Metadata = 4, } impl Default for Mp4parseTrackType { @@ -91,7 +89,7 @@ impl Default for Mp4parseTrackType { #[allow(non_camel_case_types, clippy::upper_case_acronyms)] #[repr(C)] -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Eq, Debug)] pub enum Mp4parseCodec { Unknown, Aac, @@ -120,7 +118,7 @@ impl Default for Mp4parseCodec { } #[repr(C)] -#[derive(PartialEq, Debug)] +#[derive(PartialEq, Eq, Debug)] pub enum Mp4ParseEncryptionSchemeType { None, Cenc, @@ -202,7 +200,7 @@ pub struct Mp4parsePsshInfo { } #[repr(u8)] -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum OptionalFourCc { None, Some([u8; 4]), @@ -316,15 +314,10 @@ pub struct Mp4parseParser { #[repr(C)] #[derive(Debug)] -pub struct Mp4parseAvifImageItem { - pub coded_data: Mp4parseByteData, - pub bits_per_channel: Mp4parseByteData, -} - -#[repr(C)] -#[derive(Debug)] -pub struct Mp4parseAvifImage { - pub primary_image: Mp4parseAvifImageItem, +pub struct Mp4parseAvifInfo { + pub premultiplied_alpha: bool, + pub major_brand: [u8; 4], + pub unsupported_features_bitfield: u32, /// The size of the image; should never be null unless using permissive parsing pub spatial_extents: *const mp4parse::ImageSpatialExtentsProperty, pub nclx_colour_information: *const mp4parse::NclxColourInformation, @@ -332,12 +325,33 @@ pub struct Mp4parseAvifImage { pub image_rotation: mp4parse::ImageRotation, pub image_mirror: *const mp4parse::ImageMirror, pub pixel_aspect_ratio: *const mp4parse::PixelAspectRatio, - /// If no alpha item exists, members' `.length` will be 0 and `.data` will be null - pub alpha_image: Mp4parseAvifImageItem, - pub premultiplied_alpha: bool, - pub major_brand: [u8; 4], + + /// Whether there is a `pitm` reference to the color image present. + pub has_primary_item: bool, + /// Bit depth for the item referenced by `pitm`, or 0 if values are inconsistent. + pub primary_item_bit_depth: u8, + /// Whether there is an `auxl` reference to the `pitm`-accompanying + /// alpha image present. + pub has_alpha_item: bool, + /// Bit depth for the alpha item used by the `pitm`, or 0 if values are inconsistent. + pub alpha_item_bit_depth: u8, + + /// Whether there is a sequence. Can be true with no primary image. pub has_sequence: bool, - pub unsupported_features_bitfield: u32, + /// The color track's ID, which must be valid if has_sequence is true. + pub color_track_id: u32, + pub color_track_bit_depth: u8, + /// The track ID of the alpha track, will be 0 if no alpha track is present. + pub alpha_track_id: u32, + pub alpha_track_bit_depth: u8, +} + +#[repr(C)] +#[derive(Debug)] +pub struct Mp4parseAvifImage { + pub primary_image: Mp4parseByteData, + /// If no alpha item exists, members' `.length` will be 0 and `.data` will be null + pub alpha_image: Mp4parseByteData, } /// A unified interface for the parsers which have different contexts, but @@ -381,8 +395,10 @@ impl ContextParser for Mp4parseParser { } } +#[derive(Default)] pub struct Mp4parseAvifParser { context: AvifContext, + sample_table: TryHashMap>, } impl Mp4parseAvifParser { @@ -395,7 +411,10 @@ impl ContextParser for Mp4parseAvifParser { type Context = AvifContext; fn with_context(context: Self::Context) -> Self { - Self { context } + Self { + context, + ..Default::default() + } } fn read(io: &mut T, strictness: ParseStrictness) -> mp4parse::Result { @@ -601,6 +620,8 @@ pub unsafe extern "C" fn mp4parse_get_track_info( info.track_type = match context.tracks[track_index].track_type { TrackType::Video => Mp4parseTrackType::Video, + TrackType::Picture => Mp4parseTrackType::Picture, + TrackType::AuxiliaryVideo => Mp4parseTrackType::AuxiliaryVideo, TrackType::Audio => Mp4parseTrackType::Audio, TrackType::Metadata => Mp4parseTrackType::Metadata, TrackType::Unknown => return Mp4parseStatus::Unsupported, @@ -1024,6 +1045,158 @@ fn mp4parse_get_track_video_info_safe( Ok(()) } +/// Return a struct containing meta information read by previous +/// `mp4parse_avif_new()` call. +/// +/// `color_track_id`and `alpha_track_id` will be 0 if has_sequence is false. +/// `alpha_track_id` will be 0 if no alpha aux track is present. +/// +/// # Safety +/// +/// This function is unsafe because it dereferences both the parser and +/// avif_info raw pointers passed into it. Callers should ensure the parser +/// pointer points to a valid `Mp4parseAvifParser`, and that the avif_info +/// pointer points to a valid `Mp4parseAvifInfo`. +#[no_mangle] +pub unsafe extern "C" fn mp4parse_avif_get_info( + parser: *const Mp4parseAvifParser, + avif_info: *mut Mp4parseAvifInfo, +) -> Mp4parseStatus { + if parser.is_null() || avif_info.is_null() { + return Mp4parseStatus::BadArg; + } + + if let Ok(info) = mp4parse_avif_get_info_safe((*parser).context()) { + *avif_info = info; + Mp4parseStatus::Ok + } else { + Mp4parseStatus::Invalid + } +} + +fn mp4parse_avif_get_info_safe(context: &AvifContext) -> mp4parse::Result { + let info = Mp4parseAvifInfo { + premultiplied_alpha: context.premultiplied_alpha, + major_brand: context.major_brand.value, + unsupported_features_bitfield: context.unsupported_features.into_bitfield(), + spatial_extents: context.spatial_extents_ptr()?, + nclx_colour_information: context + .nclx_colour_information_ptr() + .unwrap_or(Ok(std::ptr::null()))?, + icc_colour_information: Mp4parseByteData::with_data( + context.icc_colour_information().unwrap_or(Ok(&[]))?, + ), + image_rotation: context.image_rotation()?, + image_mirror: context.image_mirror_ptr()?, + pixel_aspect_ratio: context.pixel_aspect_ratio_ptr()?, + + has_primary_item: context.primary_item_is_present(), + primary_item_bit_depth: 0, + has_alpha_item: context.alpha_item_is_present(), + alpha_item_bit_depth: 0, + + has_sequence: false, + color_track_id: 0, + color_track_bit_depth: 0, + alpha_track_id: 0, + alpha_track_bit_depth: 0, + }; + + fn get_bit_depth(data: &[u8]) -> u8 { + if !data.is_empty() && data.iter().all(|v| *v == data[0]) { + data[0] + } else { + 0 + } + } + let primary_item_bit_depth = + get_bit_depth(context.primary_item_bits_per_channel().unwrap_or(Ok(&[]))?); + let alpha_item_bit_depth = + get_bit_depth(context.primary_item_bits_per_channel().unwrap_or(Ok(&[]))?); + + if let Some(sequence) = &context.sequence { + // Tracks must have track_id and samples + fn get_track(tracks: &TryVec, pred: T) -> Option<&Track> + where + T: Fn(&Track) -> bool, + { + tracks.iter().find(|track| { + if track.track_id.is_none() { + return false; + } + match &track.stsc { + Some(stsc) => { + if stsc.samples.is_empty() { + return false; + } + if !pred(track) { + return false; + } + stsc.samples.iter().any(|chunk| chunk.samples_per_chunk > 0) + } + _ => false, + } + }) + } + + // Color track will be the first track found + let color_track = match get_track(&sequence.tracks, |_| true) { + Some(v) => v, + _ => return Ok(info), + }; + + // Alpha track will be the first track found with auxl.aux_for_track_id set to color_track's id + let alpha_track = get_track(&sequence.tracks, |track| match &track.tref { + Some(tref) => tref.has_auxl_reference(color_track.track_id.unwrap()), + _ => false, + }); + + fn get_av1c(track: &Track) -> Option<&AV1ConfigBox> { + if let Some(stsd) = &track.stsd { + for entry in &stsd.descriptions { + if let SampleEntry::Video(video_entry) = entry { + if let VideoCodecSpecific::AV1Config(av1c) = &video_entry.codec_specific { + return Some(av1c); + } + } + } + } + + None + } + + let color_track_id = color_track.track_id.unwrap(); + let color_track_bit_depth = match get_av1c(color_track) { + Some(av1c) => av1c.bit_depth, + _ => return Ok(info), + }; + + let (alpha_track_id, alpha_track_bit_depth) = match alpha_track { + Some(track) => ( + track.track_id.unwrap(), + match get_av1c(track) { + Some(av1c) => av1c.bit_depth, + _ => return Ok(info), + }, + ), + _ => (0, 0), + }; + + return Ok(Mp4parseAvifInfo { + primary_item_bit_depth, + alpha_item_bit_depth, + has_sequence: true, + color_track_id, + color_track_bit_depth, + alpha_track_id, + alpha_track_bit_depth, + ..info + }); + } + + Ok(info) +} + /// Return a pointer to the primary item parsed by previous `mp4parse_avif_new()` call. /// /// # Safety @@ -1057,39 +1230,11 @@ pub fn mp4parse_avif_get_image_safe( parser: &Mp4parseAvifParser, ) -> mp4parse::Result { let context = parser.context(); - - let primary_image = Mp4parseAvifImageItem { - coded_data: Mp4parseByteData::with_data(context.primary_item_coded_data().unwrap_or(&[])), - bits_per_channel: Mp4parseByteData::with_data( - context.primary_item_bits_per_channel().unwrap_or(Ok(&[]))?, - ), - }; - - // If there is no alpha present, all the `Mp4parseByteData`s will be zero length - let alpha_image = Mp4parseAvifImageItem { - coded_data: Mp4parseByteData::with_data(context.alpha_item_coded_data().unwrap_or(&[])), - bits_per_channel: Mp4parseByteData::with_data( - context.alpha_item_bits_per_channel().unwrap_or(Ok(&[]))?, - ), - }; - Ok(Mp4parseAvifImage { - primary_image, - spatial_extents: context.spatial_extents_ptr()?, - nclx_colour_information: context - .nclx_colour_information_ptr() - .unwrap_or(Ok(std::ptr::null()))?, - icc_colour_information: Mp4parseByteData::with_data( - context.icc_colour_information().unwrap_or(Ok(&[]))?, + primary_image: Mp4parseByteData::with_data( + context.primary_item_coded_data().unwrap_or(&[]), ), - image_rotation: context.image_rotation()?, - image_mirror: context.image_mirror_ptr()?, - pixel_aspect_ratio: context.pixel_aspect_ratio_ptr()?, - alpha_image, - premultiplied_alpha: context.premultiplied_alpha, - major_brand: context.major_brand.value, - has_sequence: context.has_sequence, - unsupported_features_bitfield: context.unsupported_features.into_bitfield(), + alpha_image: Mp4parseByteData::with_data(context.alpha_item_coded_data().unwrap_or(&[])), }) } @@ -1114,26 +1259,66 @@ pub unsafe extern "C" fn mp4parse_get_indice_table( // Initialize fields to default values to ensure all fields are always valid. *indices = Default::default(); - get_indice_table(&mut *parser, track_id, &mut *indices).into() + get_indice_table( + &(*parser).context, + &mut (*parser).sample_table, + track_id, + &mut *indices, + ) + .into() +} + +/// Fill the supplied `Mp4parseByteData` with index information from `track`. +/// +/// # Safety +/// +/// This function is unsafe because it dereferences both the parser and +/// indices raw pointers passed to it. Callers should ensure the parser +/// points to a valid `Mp4parseAvifParser` and indices points to a valid +/// `Mp4parseByteData`. +#[no_mangle] +pub unsafe extern "C" fn mp4parse_avif_get_indice_table( + parser: *mut Mp4parseAvifParser, + track_id: u32, + indices: *mut Mp4parseByteData, +) -> Mp4parseStatus { + if parser.is_null() { + return Mp4parseStatus::BadArg; + } + + if indices.is_null() { + return Mp4parseStatus::BadArg; + } + + // Initialize fields to default values to ensure all fields are always valid. + *indices = Default::default(); + + if let Some(sequence) = &(*parser).context.sequence { + return get_indice_table( + sequence, + &mut (*parser).sample_table, + track_id, + &mut *indices, + ) + .into(); + } + + Mp4parseStatus::BadArg } fn get_indice_table( - parser: &mut Mp4parseParser, + context: &MediaContext, + sample_table_cache: &mut TryHashMap>, track_id: u32, indices: &mut Mp4parseByteData, ) -> Result<(), Mp4parseStatus> { - let Mp4parseParser { - context, - sample_table: index_table, - .. - } = parser; let tracks = &context.tracks; let track = match tracks.iter().find(|track| track.track_id == Some(track_id)) { Some(t) => t, _ => return Err(Mp4parseStatus::Invalid), }; - if let Some(v) = index_table.get(&track_id) { + if let Some(v) = sample_table_cache.get(&track_id) { indices.set_indices(v); return Ok(()); } @@ -1165,7 +1350,7 @@ fn get_indice_table( if let Some(v) = create_sample_table(track, offset_time) { indices.set_indices(&v); - index_table.insert(track_id, v)?; + sample_table_cache.insert(track_id, v)?; return Ok(()); } diff --git a/third_party/rust/mp4parse_capi/tests/test_chunk_out_of_range.rs b/third_party/rust/mp4parse_capi/tests/test_chunk_out_of_range.rs index b3a9543b4092..26c2f506e17a 100644 --- a/third_party/rust/mp4parse_capi/tests/test_chunk_out_of_range.rs +++ b/third_party/rust/mp4parse_capi/tests/test_chunk_out_of_range.rs @@ -1,4 +1,3 @@ -extern crate mp4parse_capi; use mp4parse_capi::*; use std::io::Read; diff --git a/third_party/rust/mp4parse_capi/tests/test_encryption.rs b/third_party/rust/mp4parse_capi/tests/test_encryption.rs index 1a47e329fcd5..03f59630445d 100644 --- a/third_party/rust/mp4parse_capi/tests/test_encryption.rs +++ b/third_party/rust/mp4parse_capi/tests/test_encryption.rs @@ -1,4 +1,3 @@ -extern crate mp4parse_capi; use mp4parse_capi::*; use std::io::Read; diff --git a/third_party/rust/mp4parse_capi/tests/test_fragment.rs b/third_party/rust/mp4parse_capi/tests/test_fragment.rs index d6ebe1f177d5..e4a018bc2a8c 100644 --- a/third_party/rust/mp4parse_capi/tests/test_fragment.rs +++ b/third_party/rust/mp4parse_capi/tests/test_fragment.rs @@ -1,4 +1,3 @@ -extern crate mp4parse_capi; use mp4parse_capi::*; use std::io::Read; diff --git a/third_party/rust/mp4parse_capi/tests/test_rotation.rs b/third_party/rust/mp4parse_capi/tests/test_rotation.rs index 918c9fbeaea7..2ea47a5d52aa 100644 --- a/third_party/rust/mp4parse_capi/tests/test_rotation.rs +++ b/third_party/rust/mp4parse_capi/tests/test_rotation.rs @@ -1,4 +1,3 @@ -extern crate mp4parse_capi; use mp4parse_capi::*; use std::io::Read; diff --git a/third_party/rust/mp4parse_capi/tests/test_sample_table.rs b/third_party/rust/mp4parse_capi/tests/test_sample_table.rs index ad030a94c545..ab42a12a6ba1 100644 --- a/third_party/rust/mp4parse_capi/tests/test_sample_table.rs +++ b/third_party/rust/mp4parse_capi/tests/test_sample_table.rs @@ -1,5 +1,3 @@ -extern crate mp4parse; -extern crate mp4parse_capi; use mp4parse::unstable::Indice; use mp4parse_capi::*; use std::io::Read; diff --git a/third_party/rust/mp4parse_capi/tests/test_workaround_stsc.rs b/third_party/rust/mp4parse_capi/tests/test_workaround_stsc.rs index 99c92a7fef99..197024086f40 100644 --- a/third_party/rust/mp4parse_capi/tests/test_workaround_stsc.rs +++ b/third_party/rust/mp4parse_capi/tests/test_workaround_stsc.rs @@ -1,4 +1,3 @@ -extern crate mp4parse_capi; use mp4parse_capi::*; use std::io::Read; diff --git a/toolkit/library/rust/shared/Cargo.toml b/toolkit/library/rust/shared/Cargo.toml index b566df980f91..aaa28954f201 100644 --- a/toolkit/library/rust/shared/Cargo.toml +++ b/toolkit/library/rust/shared/Cargo.toml @@ -12,7 +12,7 @@ mozglue-static = { path = "../../../../mozglue/static/rust" } geckoservo = { path = "../../../../servo/ports/geckolib" } kvstore = { path = "../../../components/kvstore" } lmdb-rkv-sys = { version = "0.11", features = ["mdb_idl_logn_9"] } -mp4parse_capi = { git = "https://github.com/mozilla/mp4parse-rust", rev = "3bfc47d9a571d0842676043ba60716318e946c06", features = ["missing-pixi-permitted"] } +mp4parse_capi = { git = "https://github.com/mozilla/mp4parse-rust", rev = "eb0b625bd7e888d05ebcfc7685e2501b34c3b374", features = ["missing-pixi-permitted"] } nserror = { path = "../../../../xpcom/rust/nserror" } nsstring = { path = "../../../../xpcom/rust/nsstring" } netwerk_helper = { path = "../../../../netwerk/base/rust-helper" }