Function
test_decoder
(format: CodecFormat, h26xs: &Vec<Vec<u8>>)
Source from the content-addressed store, hash-verified
| 321 | } |
| 322 | |
| 323 | fn test_decoder(format: CodecFormat, h26xs: &Vec<Vec<u8>>) { |
| 324 | let mut decoder = HwRamDecoder::new(format).unwrap(); |
| 325 | let start = Instant::now(); |
| 326 | let mut cnt = 0; |
| 327 | for h26x in h26xs { |
| 328 | let _ = decoder.decode(h26x).unwrap(); |
| 329 | cnt += 1; |
| 330 | } |
| 331 | let device = format!("{:?}", decoder.info.hwdevice).to_lowercase(); |
| 332 | let device = device.split("_").last().unwrap(); |
| 333 | println!( |
| 334 | "{} {}: {:?}", |
| 335 | decoder.info.name, |
| 336 | device, |
| 337 | start.elapsed() / cnt |
| 338 | ); |
| 339 | } |
| 340 | } |
Tested by
no test coverage detected