forge
Explore
Log in

Don't you dare go Hollow

S7: vp8 mb_edges drops try_from().unwrap(); cast is exact for MB counts (same values)

Browse files at this commit

381f98cb7194ae8ff4a75d065d9bd33b9b081e3eAhmet Kaan GümüşParent: 4d4e82e
crates/ec-vp8/src/modes.rsmodified+4 -4
@@ -480,10 +480,10 @@ pub fn find_near_mvs(
480 /// `mb_to_*_edge`): distance from the MB's edge to the frame edge.480 /// `mb_to_*_edge`): distance from the MB's edge to the frame edge.
481 pub fn mb_edges(col: usize, row: usize, mb_cols: usize, mb_rows: usize) -> (i32, i32, i32, i32) {481 pub fn mb_edges(col: usize, row: usize, mb_cols: usize, mb_rows: usize) -> (i32, i32, i32, i32) {
482 (482 (
483- -((i32::try_from(col).unwrap() * 16) << 3),483+ -(((col * 16) as i32) << 3),
484- ((i32::try_from(mb_cols - 1 - col).unwrap() * 16) << 3),484+ (((mb_cols - 1 - col) * 16) as i32) << 3,
485- -((i32::try_from(row).unwrap() * 16) << 3),485+ -(((row * 16) as i32) << 3),
486- ((i32::try_from(mb_rows - 1 - row).unwrap() * 16) << 3),486+ (((mb_rows - 1 - row) * 16) as i32) << 3,
487 )487 )
488 }488 }
489 489