From c152f571671940a993d0baf4fa5db8c2b0af6051 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Sat, 24 Aug 2024 07:47:42 +0000 Subject: [PATCH] dav1d test --- Cargo.toml | 4 ++-- src/main.rs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b4344e8..607e12c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rust_opengl_helloworld" +name = "rust_opengl" version = "1.0.0" edition = "2021" @@ -12,8 +12,8 @@ codegen-units = 1 [dependencies] gl = "0.14.0" glfw = { version = "0.57.0", features = ["wayland"] } +image = { version = "0.25.2", default-features = false, features = ["rayon", "avif-native"] } #jxl-oxide = { version = "0.8.1" } -rav1d = { version = "1.0.0", default-features = false, features = ["bitdepth_8", "bitdepth_16"] } #bytemuck = "1" #ogl33 = { version = "0.2.0", features = ["debug_error_checks"]} #beryllium = "0.13.3" diff --git a/src/main.rs b/src/main.rs index 8234599..6c56391 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,6 @@ use std::convert::TryInto; // use jxl_oxide::JxlImage; -use rav1d::include::dav1d; -use rav1d; +use image::ImageReader; use glfw; use glfw::Context; use gl; @@ -11,6 +10,8 @@ const HEIGHT: u32 = 320; const TITLE: &str = "Hello From OpenGL World!"; fn main() { + let img = ImageReader::open("combined.avif").unwrap().decode(); + println!("{:?}", img); // let image = JxlImage::builder().open("combined.jxl").expect("Failed to read image header"); // println!("{:?}", image.image_header()); // Prints the image header //let image = dav1d::rav1d_open("combined.avif");