ref: 2c7b94f6ecb7c1b3a6807259dcfd23dfa471d0c4
parent: 00a4b20fbecc1137ff9a0421d51f4131013bb70a
parent: 431cdc33eee902bbc1c4272a8551e3734fe4a16f
author: Deb Mukherjee <[email protected]>
date: Fri Oct 3 07:37:47 EDT 2014
Merge "Prevent negative cost for highbitdepth"
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -491,7 +491,9 @@
if (x->plane[plane].eobs[block]) {
int64_t dc_correct = coeff[0] * coeff[0] -
(coeff[0] - dqcoeff[0]) * (coeff[0] - dqcoeff[0]);
-
+#if CONFIG_VP9_HIGHBITDEPTH
+ dc_correct >>= ((xd->bd - 8) * 2);
+#endif
if (tx_size != TX_32X32)
dc_correct >>= 2;