Avoid setting rate multiplier as 0 In high bitdepth setting, the rate multipier may be set as 0. In lossless mode, the RD cost would always be 0, resulting in bad partition and prediction mode choices. Change-Id: I297014dd8bfa8a07ff0ab480119f75678300ff68
diff --git a/vp10/encoder/rd.c b/vp10/encoder/rd.c index 999a6ac..dad1d2a 100644 --- a/vp10/encoder/rd.c +++ b/vp10/encoder/rd.c
@@ -177,6 +177,8 @@ rdmult = (rdmult * rd_frame_type_factor[frame_type]) >> 7; rdmult += ((rdmult * rd_boost_factor[boost_index]) >> 7); } + if (rdmult < 1) + rdmult = 1; return (int)rdmult; }
diff --git a/vp9/encoder/vp9_rd.c b/vp9/encoder/vp9_rd.c index 3ee6fbe..2f2f7c1 100644 --- a/vp9/encoder/vp9_rd.c +++ b/vp9/encoder/vp9_rd.c
@@ -177,6 +177,8 @@ rdmult = (rdmult * rd_frame_type_factor[frame_type]) >> 7; rdmult += ((rdmult * rd_boost_factor[boost_index]) >> 7); } + if (rdmult < 1) + rdmult = 1; return (int)rdmult; }