Skip to content

Commit

Permalink
Update to latest core
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianEddy committed Jul 5, 2024
1 parent 6046435 commit 708bdd3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 35 deletions.
61 changes: 36 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ofx = "0.3"
log = "0.4"
itertools = "0.13"
lru = "0.12"
gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "e23fb5f", features = ["bundle-lens-profiles"] }
gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "d964ccc", features = ["bundle-lens-profiles"] }
#gyroflow-core = { path = "../gyroflow/src/core", default-features = false, features = ["bundle-lens-profiles"] }
log-panics = "2.1"
rfd = { version = "0.14", default-features = false, features = ["xdg-portal", "async-std"] }
Expand Down
15 changes: 6 additions & 9 deletions src/gyroflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ impl InstanceData {
let loaded = {
stab.params.write().calculate_ramped_timestamps(&stab.keyframes.read(), false, true);
let params = stab.params.read();
self.original_video_size = params.video_size;
self.original_output_size = params.video_output_size;
self.original_video_size = params.size;
self.original_output_size = params.output_size;
self.num_frames = params.frame_count;
self.fps = params.fps;
let loaded = params.duration_ms > 0.0;
Expand Down Expand Up @@ -359,16 +359,13 @@ impl InstanceData {

stab.set_fov_overview(self.param_toggle_overview.get_value()?);

let video_size = {
{
let mut params = stab.params.write();
params.framebuffer_inverted = true;
params.video_size
};
}

let org_ratio = video_size.0 as f64 / video_size.1 as f64;

let src_rect = Self::get_center_rect(in_size.0, in_size.1, org_ratio);
stab.set_size(src_rect.2, src_rect.3);
stab.init_size();
stab.set_output_size(out_size.0, out_size.1);

{
Expand Down Expand Up @@ -550,7 +547,7 @@ impl Execute for GyroflowPlugin {
let params = stab.params.read();
let fps = params.fps;
let src_fps = instance_data.source_clip.get_frame_rate().unwrap_or(fps);
let org_ratio = params.video_size.0 as f64 / params.video_size.1 as f64;
let org_ratio = params.size.0 as f64 / params.size.1 as f64;
let (has_accurate_timestamps, has_offsets) = {
let gyro = stab.gyro.read();
let md = gyro.file_metadata.read();
Expand Down

0 comments on commit 708bdd3

Please sign in to comment.