Commit 52bde846 authored by Yaowu Xu's avatar Yaowu Xu Committed by Cheng Chen
Browse files

Prevent integer overflow

Change-Id: Ibe4f7bb61837b6bae6717f0c683fa23f78de5b80
parent 4489c267
...@@ -10238,7 +10238,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data, ...@@ -10238,7 +10238,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
} }
if (sf->skip_intra_in_interframe) { if (sf->skip_intra_in_interframe) {
if (best_rd != INT64_MAX && this_rd > (best_rd + (best_rd >> 1))) if (best_rd < (INT64_MAX / 2) && this_rd > (best_rd + (best_rd >> 1)))
skip_intra_modes = 1; skip_intra_modes = 1;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment