ref: f2541f8a4a1a6503c43de0ea8954f4b7ea2d2499
parent: a721e5cb0f1dbb9ca973329a71d89deec9899f8a
author: James Zern <jzern@google.com>
date: Mon Nov 5 07:50:16 EST 2012
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
--- a/vp9/encoder/rdopt.c
+++ b/vp9/encoder/rdopt.c
@@ -1180,7 +1180,7 @@
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 @@
#endif
}
*Rate = cost;
- *rate_y += tot_rate_y;
+ *rate_y = tot_rate_y;
*Distortion = distortion;
return RDCOST(mb->rdmult, mb->rddiv, cost, distortion);
}
--
⑨