Skip to content

Commit

Permalink
benches: Shorten conversion steps in YUV422 -> RGB bench
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher N. Hesse <[email protected]>
  • Loading branch information
raymanfx committed Oct 29, 2023
1 parent db39235 commit 37aaec0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ffimage-yuv/benches/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ pub fn yuv422_to_rgb(c: &mut Criterion) {
.copied()
.pixels::<Yuv422<u8, 0, 2, 1, 3>>()
.colorconvert::<[Yuv<u8>; 2]>()
.map(|yuv422| <[Yuv<u8>; 2]>::from(yuv422))
.flatten()
.map(|yuv| Rgb::<u8>::from(yuv))
.write(&mut rgb);
.colorconvert::<Rgb<u8>>()
.write(black_box(&mut rgb));
})
},
);
Expand Down

0 comments on commit 37aaec0

Please sign in to comment.