diff --git a/crates/ec-vp8/src/modes.rs b/crates/ec-vp8/src/modes.rs index 61d8cf75..1e64cfd5 100644 --- a/crates/ec-vp8/src/modes.rs +++ b/crates/ec-vp8/src/modes.rs @@ -480,10 +480,10 @@ pub fn find_near_mvs( /// `mb_to_*_edge`): distance from the MB's edge to the frame edge. pub fn mb_edges(col: usize, row: usize, mb_cols: usize, mb_rows: usize) -> (i32, i32, i32, i32) { ( - -((i32::try_from(col).unwrap() * 16) << 3), - ((i32::try_from(mb_cols - 1 - col).unwrap() * 16) << 3), - -((i32::try_from(row).unwrap() * 16) << 3), - ((i32::try_from(mb_rows - 1 - row).unwrap() * 16) << 3), + -(((col * 16) as i32) << 3), + (((mb_cols - 1 - col) * 16) as i32) << 3, + -(((row * 16) as i32) << 3), + (((mb_rows - 1 - row) * 16) as i32) << 3, ) }