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",
|
||||
"thiserror 2.0.12",
|
||||
"url",
|
||||
"yuvutils-rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -4630,6 +4631,15 @@ dependencies = [
|
|||
"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]]
|
||||
name = "zeno"
|
||||
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]
|
||||
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" }
|
||||
gstreamer = "0.23"
|
||||
gstreamer-app = "0.23" # appsink
|
||||
gstreamer-base = "0.23" # basesrc
|
||||
glib = "0.20" # gobject traits and error type
|
||||
log = "0.4"
|
||||
gstreamer = "0.23.5"
|
||||
gstreamer-app = "0.23.5" # appsink
|
||||
gstreamer-base = "0.23.5" # basesrc
|
||||
glib = "0.20.9" # gobject traits and error type
|
||||
log = "0.4.27"
|
||||
thiserror = "2.0.12"
|
||||
url = "2" # media uri
|
||||
url = "2.5.4" # media uri
|
||||
yuvutils-rs = "0.8.2"
|
||||
|
||||
[package.metadata.nix]
|
||||
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 brightness_adjustment = 10.0;
|
||||
let y = yuv[(y_src * width + x_src) as usize] as f32 * brightness_adjustment;
|
||||
let y = yuv[(y_src * width + x_src) as usize] as f32;
|
||||
let u = yuv[uv_i as usize] as f32;
|
||||
let v = yuv[(uv_i + 1) as usize] as f32;
|
||||
|
||||
let r = y + 1.5748 * v;
|
||||
let g = y - 0.1873 * u - 0.4681 * v;
|
||||
let b = y + 1.8556 * u;
|
||||
let r = 1.164 * (y - 16.0) + 1.596 * (v - 128.0);
|
||||
let g = 1.164 * (y - 16.0) - 0.813 * (v - 128.0) - 0.391 * (u - 128.0);
|
||||
let b = 1.164 * (y - 16.0) + 2.018 * (u - 128.0);
|
||||
|
||||
rgba.push(r as u8);
|
||||
rgba.push(g as u8);
|
||||
|
@ -652,4 +651,4 @@ fn yuv_to_rgba(yuv: &[u8], width: u32, height: u32, downscale: u32) -> Vec<u8> {
|
|||
}
|
||||
|
||||
rgba
|
||||
}
|
||||
}
|
|
@ -173,7 +173,7 @@ fn style_container(direction: f32) -> container::Style {
|
|||
background: Some(
|
||||
gradient::Linear::new(angle)
|
||||
.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(),
|
||||
),
|
||||
..container::Style::default()
|
||||
|
|
Loading…
Reference in a new issue