| 1 |
// This Source Code Form is subject to the terms of the Mozilla Public |
| 2 |
// License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 |
// file, You can obtain one at https://mozilla.org/MPL/2.0/. |
| 4 |
|
| 5 |
use criterion::{criterion_group, criterion_main, Criterion}; |
| 6 |
use std::fs::File; |
| 7 |
|
| 8 |
fn criterion_benchmark(c: &mut Criterion) { |
| 9 |
c.bench_function("avif_largest", |b| b.iter(avif_largest)); |
| 10 |
} |
| 11 |
|
| 12 |
criterion_group!(benches, criterion_benchmark); |
| 13 |
criterion_main!(benches); |
| 14 |
|
| 15 |
fn avif_largest() { |
| 16 |
let input = &mut File::open( |
| 17 |
"av1-avif/testFiles/Netflix/avif/cosmos_frame05000_yuv444_12bpc_bt2020_pq_qlossless.avif", |
| 18 |
) |
| 19 |
.expect("Unknown file"); |
| 20 |
assert!(mp4parse::read_avif(input, mp4parse::ParseStrictness::Normal).is_ok()); |
| 21 |
} |