increase initial alpha of bg and update deps for the video player.
This commit is contained in:
parent
b02da2c6d0
commit
5b0168660f
5 changed files with 802 additions and 949 deletions
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -1630,6 +1630,7 @@ dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"thiserror 2.0.12",
|
"thiserror 2.0.12",
|
||||||
"url",
|
"url",
|
||||||
|
"yuvutils-rs",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -4630,6 +4631,15 @@ dependencies = [
|
||||||
"synstructure",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "yuvutils-rs"
|
||||||
|
version = "0.8.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "909db140691d64f8ca83054be5108332926f05019f16f13a29559e6ef6fc50a4"
|
||||||
|
dependencies = [
|
||||||
|
"num-traits",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zeno"
|
name = "zeno"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
|
|
1715
iced_video_player/Cargo.lock
generated
1715
iced_video_player/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -18,13 +18,14 @@ exclude = [
|
||||||
[dependencies]
|
[dependencies]
|
||||||
iced = { git = "https://github.com/iced-rs/iced.git", rev = "482d54118a733231cdceb4ab8eef2419fbec385e", features = ["smol", "wgpu", "image", "advanced"], default-features = false }
|
iced = { git = "https://github.com/iced-rs/iced.git", rev = "482d54118a733231cdceb4ab8eef2419fbec385e", features = ["smol", "wgpu", "image", "advanced"], default-features = false }
|
||||||
iced_wgpu = { git = "https://github.com/iced-rs/iced.git", rev = "482d54118a733231cdceb4ab8eef2419fbec385e" }
|
iced_wgpu = { git = "https://github.com/iced-rs/iced.git", rev = "482d54118a733231cdceb4ab8eef2419fbec385e" }
|
||||||
gstreamer = "0.23"
|
gstreamer = "0.23.5"
|
||||||
gstreamer-app = "0.23" # appsink
|
gstreamer-app = "0.23.5" # appsink
|
||||||
gstreamer-base = "0.23" # basesrc
|
gstreamer-base = "0.23.5" # basesrc
|
||||||
glib = "0.20" # gobject traits and error type
|
glib = "0.20.9" # gobject traits and error type
|
||||||
log = "0.4"
|
log = "0.4.27"
|
||||||
thiserror = "2.0.12"
|
thiserror = "2.0.12"
|
||||||
url = "2" # media uri
|
url = "2.5.4" # media uri
|
||||||
|
yuvutils-rs = "0.8.2"
|
||||||
|
|
||||||
[package.metadata.nix]
|
[package.metadata.nix]
|
||||||
systems = ["x86_64-linux"]
|
systems = ["x86_64-linux"]
|
||||||
|
|
|
@ -635,14 +635,13 @@ fn yuv_to_rgba(yuv: &[u8], width: u32, height: u32, downscale: u32) -> Vec<u8> {
|
||||||
|
|
||||||
let uv_i = uv_start + width * (y_src / 2) + x_src / 2 * 2;
|
let uv_i = uv_start + width * (y_src / 2) + x_src / 2 * 2;
|
||||||
|
|
||||||
let brightness_adjustment = 10.0;
|
let y = yuv[(y_src * width + x_src) as usize] as f32;
|
||||||
let y = yuv[(y_src * width + x_src) as usize] as f32 * brightness_adjustment;
|
|
||||||
let u = yuv[uv_i as usize] as f32;
|
let u = yuv[uv_i as usize] as f32;
|
||||||
let v = yuv[(uv_i + 1) as usize] as f32;
|
let v = yuv[(uv_i + 1) as usize] as f32;
|
||||||
|
|
||||||
let r = y + 1.5748 * v;
|
let r = 1.164 * (y - 16.0) + 1.596 * (v - 128.0);
|
||||||
let g = y - 0.1873 * u - 0.4681 * v;
|
let g = 1.164 * (y - 16.0) - 0.813 * (v - 128.0) - 0.391 * (u - 128.0);
|
||||||
let b = y + 1.8556 * u;
|
let b = 1.164 * (y - 16.0) + 2.018 * (u - 128.0);
|
||||||
|
|
||||||
rgba.push(r as u8);
|
rgba.push(r as u8);
|
||||||
rgba.push(g as u8);
|
rgba.push(g as u8);
|
||||||
|
|
|
@ -173,7 +173,7 @@ fn style_container(direction: f32) -> container::Style {
|
||||||
background: Some(
|
background: Some(
|
||||||
gradient::Linear::new(angle)
|
gradient::Linear::new(angle)
|
||||||
.add_stop(0.0, Color::from_rgba8(0, 0, 0, 0.0))
|
.add_stop(0.0, Color::from_rgba8(0, 0, 0, 0.0))
|
||||||
.add_stop(1.0, Color::from_rgba8(0, 0, 0, 0.45))
|
.add_stop(1.0, Color::from_rgba8(0, 0, 0, 0.8))
|
||||||
.into(),
|
.into(),
|
||||||
),
|
),
|
||||||
..container::Style::default()
|
..container::Style::default()
|
||||||
|
|
Loading…
Reference in a new issue