Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GPU based transfer to do chroma conversions of native decoder output #7682

Merged
merged 13 commits into from
Oct 11, 2024
Merged
7 changes: 4 additions & 3 deletions crates/store/re_video/examples/frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ fn main() {
video.config.coded_height
);

let mut decoder = create_decoder(&video);
let mut decoder = create_decoder(video_path, &video);

write_video_frames(&video, decoder.as_mut(), &output_dir);
}

fn create_decoder(video: &VideoData) -> Box<dyn SyncDecoder> {
fn create_decoder(debug_name: &str, video: &VideoData) -> Box<dyn SyncDecoder> {
if video.config.is_av1() {
Box::new(
re_video::decode::av1::SyncDav1dDecoder::new().expect("Failed to start AV1 decoder"),
re_video::decode::av1::SyncDav1dDecoder::new(debug_name.to_owned())
.expect("Failed to start AV1 decoder"),
)
} else {
panic!("Unsupported codec: {}", video.human_readable_codec_string());
Expand Down
Loading
Loading