OSUOSL/Nero are experiencing Internet connectivity problems. This affects us as we're hosted with OSUOSL. We apologize for the inconvenience.

Commit 6ecd3a78 authored by David Michael Barr's avatar David Michael Barr

Annotate prediction benchmarks with throughput

parent 4273e67d
...@@ -34,18 +34,35 @@ pub fn generate_block_u8(rng: &mut ChaChaRng) -> (Vec<u8>, Vec<u8>, Vec<u8>) { ...@@ -34,18 +34,35 @@ pub fn generate_block_u8(rng: &mut ChaChaRng) -> (Vec<u8>, Vec<u8>, Vec<u8>) {
(block, above_context, left_context) (block, above_context, left_context)
} }
pub fn bench_pred_fn<F>(c: &mut Criterion, id: &str, f: F)
F: FnMut(&mut Bencher) + 'static
let b = Benchmark::new(id, f);
if id.ends_with("_4x4_u8") {
} else if id.ends_with("_4x4") {
} else {
pub fn pred_bench(c: &mut Criterion) { pub fn pred_bench(c: &mut Criterion) {
c.bench_function("intra_dc_4x4", |b| intra_dc_4x4(b)); bench_pred_fn(c, "intra_dc_4x4", intra_dc_4x4);
c.bench_function("intra_dc_128_4x4_u8", |b| intra_dc_128_4x4_u8(b)); bench_pred_fn(c, "intra_dc_128_4x4_u8", intra_dc_128_4x4_u8);
c.bench_function("intra_dc_left_4x4", |b| intra_dc_left_4x4(b)); bench_pred_fn(c, "intra_dc_left_4x4", intra_dc_left_4x4);
c.bench_function("intra_dc_top_4x4", |b| intra_dc_top_4x4(b)); bench_pred_fn(c, "intra_dc_top_4x4", intra_dc_top_4x4);
c.bench_function("intra_h_4x4", |b| intra_h_4x4(b)); bench_pred_fn(c, "intra_h_4x4", intra_h_4x4);
c.bench_function("intra_v_4x4", |b| intra_v_4x4(b)); bench_pred_fn(c, "intra_v_4x4", intra_v_4x4);
c.bench_function("intra_paeth_4x4", |b| intra_paeth_4x4(b)); bench_pred_fn(c, "intra_paeth_4x4", intra_paeth_4x4);
c.bench_function("intra_smooth_4x4", |b| intra_smooth_4x4(b)); bench_pred_fn(c, "intra_smooth_4x4", intra_smooth_4x4);
c.bench_function("intra_smooth_h_4x4", |b| intra_smooth_h_4x4(b)); bench_pred_fn(c, "intra_smooth_h_4x4", intra_smooth_h_4x4);
c.bench_function("intra_smooth_v_4x4", |b| intra_smooth_v_4x4(b)); bench_pred_fn(c, "intra_smooth_v_4x4", intra_smooth_v_4x4);
c.bench_function("intra_cfl_4x4", |b| intra_cfl_4x4(b)); bench_pred_fn(c, "intra_cfl_4x4", intra_cfl_4x4);
} }
pub fn intra_dc_4x4(b: &mut Bencher) { pub fn intra_dc_4x4(b: &mut Bencher) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment