diff --git a/Cargo.lock b/Cargo.lock index f6d6146..4a353a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -360,9 +360,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bitreader" @@ -747,16 +747,19 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "libloading 0.8.1", "winapi", ] [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +dependencies = [ + "powerfmt", +] [[package]] name = "derive_more" @@ -969,9 +972,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1210,7 +1213,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "gpu-alloc-types", ] @@ -1220,7 +1223,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", ] [[package]] @@ -1234,7 +1237,7 @@ dependencies = [ "presser", "thiserror", "winapi", - "windows 0.51.1", + "windows", ] [[package]] @@ -1243,7 +1246,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "gpu-descriptor-types", "hashbrown 0.14.1", ] @@ -1254,7 +1257,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", ] [[package]] @@ -1278,7 +1281,7 @@ dependencies = [ [[package]] name = "gyroflow-core" version = "1.5.3" -source = "git+https://github.com/gyroflow/gyroflow.git?rev=e1dee88#e1dee8896f9da0e1cf296d575d100ab52bd4b22a" +source = "git+https://github.com/gyroflow/gyroflow.git?rev=838f1d2#838f1d223d526e86ee7b2e69ce98d137d09b6150" dependencies = [ "ahrs", "akaze", @@ -1288,7 +1291,7 @@ dependencies = [ "bincode", "biquad", "bitarray", - "bitflags 2.4.0", + "bitflags 2.4.1", "bytemuck", "byteorder", "ciborium", @@ -1353,7 +1356,7 @@ dependencies = [ "wgpu-hal", "wgpu-types", "winapi", - "windows 0.51.1", + "windows", ] [[package]] @@ -1479,16 +1482,16 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -1875,7 +1878,7 @@ name = "metal" version = "0.26.0" source = "git+https://github.com/gfx-rs/metal-rs/?rev=d24f1a4#d24f1a4ae92470bf87a0c65ecfe78c9299835505" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "block", "core-graphics-types", "foreign-types", @@ -1920,10 +1923,10 @@ dependencies = [ [[package]] name = "naga" version = "0.13.0" -source = "git+https://github.com/gfx-rs/naga?rev=33b75a27d93c6574b11b4dd4492b85b5783d6c52#33b75a27d93c6574b11b4dd4492b85b5783d6c52" +source = "git+https://github.com/gfx-rs/naga?rev=9eb3a1dc8a522e627b266f9157442f0fe8b65ec9#9eb3a1dc8a522e627b266f9157442f0fe8b65ec9" dependencies = [ "bit-set", - "bitflags 2.4.0", + "bitflags 2.4.1", "codespan-reporting", "hexf-parse", "indexmap 2.0.2", @@ -2004,15 +2007,16 @@ dependencies = [ [[package]] name = "ndk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "jni-sys", + "log", "ndk-sys", "num_enum", - "raw-window-handle", + "raw-window-handle 0.6.0", "thiserror", ] @@ -2024,9 +2028,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.4.1+23.1.7779620" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] @@ -2172,23 +2176,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.11" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.11" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] @@ -2460,6 +2464,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2663,6 +2673,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" + [[package]] name = "rawpointer" version = "0.2.1" @@ -2706,9 +2722,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.0" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d119d7c7ca818f8a53c300863d4f87566aac09943aef5b355bb83969dae75d87" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", @@ -2718,9 +2734,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465c6fc0621e4abc4187a2bda0937bfd4f722c2730b29562e19689ea796c9a4b" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -2729,9 +2745,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d84fdd47036b038fc80dd333d10b6aab10d5d31f4a366e20014def75328d33" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "renderdoc-sys" @@ -2755,7 +2771,7 @@ dependencies = [ "objc", "objc-foundation", "objc_id", - "raw-window-handle", + "raw-window-handle 0.5.2", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2904,9 +2920,9 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] @@ -2923,9 +2939,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", @@ -3113,7 +3129,7 @@ checksum = "5cce2183deb9e7ada727867823fb8bbbc8b56e503801a332d155dde613130e1b" [[package]] name = "stabilize_spirv" version = "0.0.0" -source = "git+https://github.com/gyroflow/gyroflow.git?rev=e1dee88#e1dee8896f9da0e1cf296d575d100ab52bd4b22a" +source = "git+https://github.com/gyroflow/gyroflow.git?rev=838f1d2#838f1d223d526e86ee7b2e69ce98d137d09b6150" dependencies = [ "spirv-std", ] @@ -3285,13 +3301,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "libc", "num_threads", + "powerfmt", "serde", "time-core", ] @@ -3614,7 +3631,7 @@ checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "wgpu" version = "0.17.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35ebd4a#35ebd4a5286443d1b652cc801fff91fd9decbe93" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=5034756#5034756948da6e11603f962e12a7074ae607f139" dependencies = [ "arrayvec 0.7.4", "cfg-if", @@ -3623,7 +3640,7 @@ dependencies = [ "naga", "parking_lot", "profiling", - "raw-window-handle", + "raw-window-handle 0.5.2", "smallvec", "static_assertions", "wasm-bindgen", @@ -3637,17 +3654,17 @@ dependencies = [ [[package]] name = "wgpu-core" version = "0.17.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35ebd4a#35ebd4a5286443d1b652cc801fff91fd9decbe93" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=5034756#5034756948da6e11603f962e12a7074ae607f139" dependencies = [ "arrayvec 0.7.4", "bit-vec", - "bitflags 2.4.0", + "bitflags 2.4.1", "codespan-reporting", "log", "naga", "parking_lot", "profiling", - "raw-window-handle", + "raw-window-handle 0.5.2", "rustc-hash", "smallvec", "thiserror", @@ -3659,13 +3676,13 @@ dependencies = [ [[package]] name = "wgpu-hal" version = "0.17.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35ebd4a#35ebd4a5286443d1b652cc801fff91fd9decbe93" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=5034756#5034756948da6e11603f962e12a7074ae607f139" dependencies = [ "android_system_properties", "arrayvec 0.7.4", "ash", "bit-set", - "bitflags 2.4.0", + "bitflags 2.4.1", "block", "core-graphics-types", "d3d12", @@ -3685,7 +3702,7 @@ dependencies = [ "parking_lot", "profiling", "range-alloc", - "raw-window-handle", + "raw-window-handle 0.5.2", "renderdoc-sys", "rustc-hash", "smallvec", @@ -3699,9 +3716,9 @@ dependencies = [ [[package]] name = "wgpu-types" version = "0.17.0" -source = "git+https://github.com/gfx-rs/wgpu.git?rev=35ebd4a#35ebd4a5286443d1b652cc801fff91fd9decbe93" +source = "git+https://github.com/gfx-rs/wgpu.git?rev=5034756#5034756948da6e11603f962e12a7074ae607f139" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "js-sys", "web-sys", ] @@ -3717,9 +3734,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebecebefc38ff1860b4bc47550bbfa63af5746061cf0d29fcd7fa63171602598" +checksum = "c68938b57b33da363195412cfc5fc37c9ed49aa9cfe2156fde64b8d2c9498242" dependencies = [ "bytemuck", "safe_arch", @@ -3762,15 +3779,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows" version = "0.51.1" @@ -3924,9 +3932,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.16" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 619b8d8..9863507 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ ofx = "0.3" log = "0.4" itertools = "0.11" lru = "0.12" -gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "e1dee88", features = ["bundle-lens-profiles"] } +gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "838f1d2", features = ["bundle-lens-profiles"] } #gyroflow-core = { path = "../gyroflow/src/core", default-features = false, features = ["bundle-lens-profiles"] } log-panics = "2.1" rfd = "0.12" diff --git a/src/gyroflow.rs b/src/gyroflow.rs index 9ee4171..d6e89b0 100644 --- a/src/gyroflow.rs +++ b/src/gyroflow.rs @@ -140,6 +140,15 @@ impl InstanceData { let _ = self.param_open_in_gyroflow.set_label(if loaded { "Open in Gyroflow" } else { "Open Gyroflow" }); } + fn set_keyframe_provider(&self, stab: &StabilizationManager) { + let kparams = self.keyframable_params.clone(); + stab.keyframes.write().set_custom_provider(move |kf, typ, timestamp_ms| -> Option { + let params = kparams.read(); + if params.use_gyroflows_cached && kf.is_keyframed_internally(typ) { return None; } + params.cached_keyframes.value_at_video_timestamp(typ, timestamp_ms) + }); + } + fn gyrodata(&mut self, bit_depth: BitDepth, output_rect: RectI, loading_pending_video_file: bool) -> Result> { let disable_stretch = self.param_disable_stretch.get_value()?; @@ -169,6 +178,7 @@ impl InstanceData { if !self.gyrodata.contains(&key) { self.gyrodata.put(key.to_owned(), stab.clone()); } + self.set_keyframe_provider(&stab); stab } else { let mut stab = StabilizationManager::default(); @@ -362,12 +372,7 @@ impl InstanceData { stab.interpolation = gyroflow_core::stabilization::Interpolation::Lanczos4; } - let kparams = self.keyframable_params.clone(); - stab.keyframes.write().set_custom_provider(move |kf, typ, timestamp_ms| -> Option { - let params = kparams.read(); - if params.use_gyroflows_cached && kf.is_keyframed_internally(typ) { return None; } - params.cached_keyframes.value_at_video_timestamp(typ, timestamp_ms) - }); + self.set_keyframe_provider(&stab); stab.invalidate_smoothing(); stab.recompute_blocking(); @@ -527,6 +532,7 @@ impl Execute for GyroflowPlugin { instance_data.param_status.set_hint("OK")?; if !instance_data.param_status.get_value()? { instance_data.param_status.set_value(true)?; + instance_data.update_loaded_state(true); } }