<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 2015年12月17日 11:37, Mark Yao wrote:<br>
</div>
<blockquote
cite="mid:1450323426-32109-5-git-send-email-mark.yao@rock-chips.com"
type="cite">
<pre wrap="">@@ -242,6 +247,11 @@ static inline uint16_t scl_cal_scale(int src, int dst, int shift)
return ((src * 2 - 3) << (shift - 1)) / (dst - 1);
}
+static inline uint16_t scl_cal_scale2(int src, int dst)
+{
+ return (src - 1) << 12 / (dst - 1);
+}
+</pre>
</blockquote>
<br>
Sorry, There is a mistake here, lose a parenthesis
<meta http-equiv="content-type" content="text/html; charset=utf-8">
after code formating, it should be:<br>
<pre wrap="">+static inline uint16_t scl_cal_scale2(int src, int dst)
+{
+ return <font color="#ff0000"><b>(</b></font>(src - 1) << 12<font color="#ff0000"><b>)</b></font> / (dst - 1);
+}
+</pre>
Without the parenthesis would cause rk3036 scale abnormal.<br>
I would send v1.1 patch to fix it.<br>
<br>
Thanks.<br>
<pre class="moz-signature" cols="72">--
Mark Yao</pre>
</body>
</html>