File: bench_compare_l.rs

package info (click to toggle)
rust-fast-image-resize 5.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,772 kB
  • sloc: makefile: 2
file content (26 lines) | stat: -rw-r--r-- 708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use fast_image_resize::pixels::U8;
use resize::Pixel::Gray8;
use rgb::FromSlice;
use utils::testing::PixelTestingExt;

mod utils;

pub fn bench_compare_l(bench_group: &mut utils::BenchGroup) {
    type P = U8;
    let src_image = P::load_big_image();
    utils::image_resize(bench_group, &src_image);
    utils::resize_resize(
        bench_group,
        Gray8,
        src_image.as_raw().as_gray(),
        src_image.width(),
        src_image.height(),
    );
    utils::libvips_resize::<P>(bench_group, false);
    utils::fir_resize::<P>(bench_group, false);
}

fn main() {
    let res = utils::run_bench(bench_compare_l, "Compare resize of U8 image");
    utils::print_and_write_compare_result(&res);
}