From e211a5f0fa13db81f8ec71ed35e47bef7462ac3a Mon Sep 17 00:00:00 2001 From: chenli Date: Mon, 26 Dec 2011 15:32:08 +0800 Subject: [PATCH] fix the setting bug of pre_scale and post_scale --- drivers/staging/rk29/ipp/rk29-ipp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rk29/ipp/rk29-ipp.c b/drivers/staging/rk29/ipp/rk29-ipp.c index 5537824910be..853138558088 100755 --- a/drivers/staging/rk29/ipp/rk29-ipp.c +++ b/drivers/staging/rk29/ipp/rk29-ipp.c @@ -575,11 +575,11 @@ int ipp_blit(const struct rk29_ipp_req *req) /*Configure Pre_scale*/ if((IPP_ROT_90 == rotate) || (IPP_ROT_270 == rotate)) { - pre_scale = ((req->dst0.w < req->src0.h) ? 1 : 0)||((req->dst0.h < req->src0.w) ? 1 : 0); + pre_scale = ((req->dst0.w <= req->src0.h/2) ? 1 : 0)||((req->dst0.h <= req->src0.w/2) ? 1 : 0); } else //other degree { - pre_scale = ((req->dst0.w < req->src0.w) ? 1 : 0)||((req->dst0.h < req->src0.h) ? 1 : 0); + pre_scale = ((req->dst0.w <= req->src0.w/2) ? 1 : 0)||((req->dst0.h <= req->src0.h/2) ? 1 : 0); } if(pre_scale) @@ -704,7 +704,7 @@ int ipp_blit(const struct rk29_ipp_req *req) if((IPP_ROT_90 == rotate) || (IPP_ROT_270 == rotate)) { if (( (req->src0.h%req->dst0.w)!=0)||( (req->src0.w%req->dst0.h)!= 0)//non-interger down-scaling - ||((req->src0.h/req->dst0.w)>8)||((req->src0.h%req->dst0.w)>8) //down-scaling ratio > 8 + ||((req->src0.h/req->dst0.w)>8)||((req->src0.h/req->dst0.w)>8) //down-scaling ratio > 8 ||(req->dst0.w > req->src0.h) ||(req->dst0.h > req->src0.w)) //up-scaling { @@ -718,7 +718,7 @@ int ipp_blit(const struct rk29_ipp_req *req) else //0 180 x-flip y-flip { if (( (req->src0.w%req->dst0.w)!=0)||( (req->src0.h%req->dst0.h)!= 0)//non-interger down-scaling - ||((req->src0.w/req->dst0.w)>8)||((req->src0.h%req->dst0.h)>8) //down-scaling ratio > 8 + ||((req->src0.w/req->dst0.w)>8)||((req->src0.h/req->dst0.h)>8) //down-scaling ratio > 8 ||(req->dst0.w > req->src0.w) ||(req->dst0.h > req->src0.h)) //up-scaling { post_scale = 1; -- 2.34.1