Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
russelltg committed May 31, 2024
1 parent b01f95c commit a0660c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,7 @@ fn video_filter(
Transform::Flipped90 => ",transpose_vaapi=dir=cclock_flip",
Transform::Flipped180 => ",transpose_vaapi=dir=vflip",
Transform::Flipped270 => ",transpose_vaapi=dir=clock_flip",
Transform::Normal | _ => "",
_ => "",
};

// it seems intel's vaapi driver doesn't support transpose in RGB space, so we have to transpose
Expand Down
5 changes: 3 additions & 2 deletions src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ fn screen_point_to_frame(
Transform::Flipped180 | Transform::_90 => (0, capture_h),
Transform::Flipped270 | Transform::_180 => (capture_w, capture_h),
Transform::Flipped | Transform::_270 => (capture_w, 0),
Transform::Flipped90 | Transform::Normal | _ => (0, 0),
Transform::Flipped90 | Transform::Normal => (0, 0),
_ => (0, 0),
};

let screen_basis_frame_coord = transform_basis(transform);
Expand All @@ -56,7 +57,7 @@ fn transform_basis(transform: Transform) -> ([i32; 2], [i32; 2]) {
Transform::Flipped90 => ([0, 1], [1, 0]),
Transform::Flipped180 => ([1, 0], [0, -1]),
Transform::Flipped270 => ([0, -1], [-1, 0]),
Transform::Normal | _ => ([1, 0], [0, 1]),
_ => ([1, 0], [0, 1]),
}
}

Expand Down

0 comments on commit a0660c1

Please sign in to comment.