Commit f2541f8a authored by James Zern's avatar James Zern

rdopt: fix use of uninitialized value in addition

rd_pick_intra4x4mby_modes / rd_pick_intra8x8mby_modes would both use the
input value of 'rate_y' in the return calculation. In many places this
value is uninitialized. Remove the unneeded sum.

Change-Id: Icbd3df685303000301e69291c0ebc06f74bd548d
parent a721e5cb
......@@ -1180,7 +1180,7 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb, int *Rat
cost += vp9_cost_bit(128, allow_comp);
#endif
*Rate = cost;
*rate_y += tot_rate_y;
*rate_y = tot_rate_y;
*Distortion = distortion;
return RDCOST(mb->rdmult, mb->rddiv, cost, distortion);
......@@ -1516,7 +1516,7 @@ static int64_t rd_pick_intra8x8mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
#endif
}
*Rate = cost;
*rate_y += tot_rate_y;
*rate_y = tot_rate_y;
*Distortion = distortion;
return RDCOST(mb->rdmult, mb->rddiv, cost, distortion);
}
......
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