From: Jim Bankoski Date: Fri, 1 Aug 2014 13:46:40 +0000 (-0700) Subject: avoid signed mismatch warning in gcc X-Git-Tag: v1.4.0~1098 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3591463f4d36207053f3f70217c66e61ccdf217;p=platform%2Fupstream%2Flibvpx.git avoid signed mismatch warning in gcc Change-Id: I9d995178fd764be252e571fa23901da0f991bbb8 --- diff --git a/vp9/encoder/vp9_rd.c b/vp9/encoder/vp9_rd.c index c149c61..f1c25be 100644 --- a/vp9/encoder/vp9_rd.c +++ b/vp9/encoder/vp9_rd.c @@ -313,8 +313,8 @@ void vp9_model_rd_from_var_lapndz(unsigned int var, unsigned int n, int d_q10, r_q10; const uint64_t xsq_q10_64 = ((((uint64_t)qstep * qstep * n) << 10) + (var >> 1)) / var; - const int xsq_q10 = xsq_q10_64 > MAX_XSQ_Q10 ? - MAX_XSQ_Q10 : (int)xsq_q10_64; + const int xsq_q10 = xsq_q10_64 > (uint64_t)MAX_XSQ_Q10 ? + (int)MAX_XSQ_Q10 : (int)xsq_q10_64; model_rd_norm(xsq_q10, &r_q10, &d_q10); *rate = (n * r_q10 + 2) >> 2; *dist = (var * (int64_t)d_q10 + 512) >> 10;