From patchwork Sat Oct 3 11:16:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 51517 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n93BGCdL018324 for ; Sat, 3 Oct 2009 11:16:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755097AbZJCLP7 (ORCPT ); Sat, 3 Oct 2009 07:15:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755063AbZJCLP7 (ORCPT ); Sat, 3 Oct 2009 07:15:59 -0400 Received: from mail.gmx.net ([213.165.64.20]:60682 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754909AbZJCLP7 (ORCPT ); Sat, 3 Oct 2009 07:15:59 -0400 Received: (qmail invoked by alias); 03 Oct 2009 11:16:01 -0000 Received: from p57BD15C7.dip0.t-ipconnect.de (EHLO axis700.grange) [87.189.21.199] by mail.gmx.net (mp006) with SMTP; 03 Oct 2009 13:16:01 +0200 X-Authenticated: #20450766 X-Provags-ID: V01U2FsdGVkX18SpFVJxM0S8F2t9JtwZkaGYorYx838aGOQdV3UEr CnauRUmBGk2yxg Received: from lyakh (helo=localhost) by axis700.grange with local-esmtp (Exim 4.63) (envelope-from ) id 1Mu2aw-0001fB-3A for linux-media@vger.kernel.org; Sat, 03 Oct 2009 13:16:10 +0200 Date: Sat, 3 Oct 2009 13:16:10 +0200 (CEST) From: Guennadi Liakhovetski To: Linux Media Mailing List Subject: [PATCH] sh_mobile_ceu_camera: fix cropping for scaling clients Message-ID: MIME-Version: 1.0 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.66 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 65ac474..2f78b4f 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -1173,8 +1173,8 @@ static int get_scales(struct soc_camera_device *icd, width_in = scale_up(cam->ceu_rect.width, *scale_h); height_in = scale_up(cam->ceu_rect.height, *scale_v); - *scale_h = calc_generic_scale(cam->ceu_rect.width, icd->user_width); - *scale_v = calc_generic_scale(cam->ceu_rect.height, icd->user_height); + *scale_h = calc_generic_scale(width_in, icd->user_width); + *scale_v = calc_generic_scale(height_in, icd->user_height); return 0; }