From patchwork Tue Apr 26 07:36:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Pantelic X-Patchwork-Id: 731782 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3Q7fxWX029276 for ; Tue, 26 Apr 2011 07:42:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757888Ab1DZHg4 (ORCPT ); Tue, 26 Apr 2011 03:36:56 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:46840 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757513Ab1DZHgz (ORCPT ); Tue, 26 Apr 2011 03:36:55 -0400 Received: by bwz15 with SMTP id 15so286202bwz.19 for ; Tue, 26 Apr 2011 00:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type; bh=M0FeBwAkGwiIOiwOcs5BqvdGyfv7PfTODQo/pjws08o=; b=xl0LZ+jNppIXD/phQwgdhu8XoHbP/10bJrRPM/W2h1piVr+F+zLlcRpd1z6PJ09Z0D DxcmBu7PUq4Aw24cbFEfdfyu1oq8qylMQ1y8yvFZyYJ//231c6e6TLa2Gvi77pZBmJ5p G2FqW4ShKjDdsOwOKccNN4ZEG2PXWesLuhZ/U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type; b=GVhC/VIZzG5vTDwypTv27y9r0s4n55mFak6LH6SJ5lQOZUInd0NchfJ0gjZiMMhbj6 YMssAC46SSh/GOzi/EtTqqMHXRioBOoKrGiNEXSgUNNbOHEWrRmrxDJaN9a07Ollskox fx+QBM5r5AFA+TdnhALwNhdpg745iMdzzgV3o= Received: by 10.205.81.76 with SMTP id zx12mr384962bkb.82.1303803413516; Tue, 26 Apr 2011 00:36:53 -0700 (PDT) Received: from [192.168.1.22] (ip-95-223-110-54.unitymediagroup.de [95.223.110.54]) by mx.google.com with ESMTPS id q18sm3678434bka.3.2011.04.26.00.36.52 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 00:36:52 -0700 (PDT) Message-ID: <4DB67614.7030008@gmail.com> Date: Tue, 26 Apr 2011 09:36:52 +0200 From: Vladimir Pantelic User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0pre) Gecko/20110408 Firefox/4.0pre SeaMonkey/2.1b3 MIME-Version: 1.0 To: Kernel development list CC: linux-omap@vger.kernel.org, "Hiremath, Vaibhav" Subject: [PATCH] omap v4l2: fix wrong resizer calculation Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Apr 2011 07:42:00 +0000 (UTC) From 47473f26bda2ef2e3a5e8f0203fde0c74c412c36 Mon Sep 17 00:00:00 2001 From: Vladimir Pantelic Date: Tue, 26 Apr 2011 09:28:11 +0200 Subject: [PATCH] omap v4l2: fix wrong resizer calculation in omap_vout_new_crop(), "crop" is the output parameter and therefore new_crop/try_crop should be used to calculate the resizer values Signed-off-by: Vladimir Pantelic --- drivers/media/video/omap/omap_voutlib.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/omap/omap_voutlib.c b/drivers/media/video/omap/omap_voutlib.c index 2aa6a76..8ae7481 100644 --- a/drivers/media/video/omap/omap_voutlib.c +++ b/drivers/media/video/omap/omap_voutlib.c @@ -193,7 +193,7 @@ int omap_vout_new_crop(struct v4l2_pix_format *pix, return -EINVAL; if (cpu_is_omap24xx()) { - if (crop->height != win->w.height) { + if (try_crop.height != win->w.height) { /* If we're resizing vertically, we can't support a * crop width wider than 768 pixels. */ @@ -202,7 +202,7 @@ int omap_vout_new_crop(struct v4l2_pix_format *pix, } } /* vertical resizing */ - vresize = (1024 * crop->height) / win->w.height; + vresize = (1024 * try_crop.height) / win->w.height; if (cpu_is_omap24xx() && (vresize > 2048)) vresize = 2048; else if (cpu_is_omap34xx() && (vresize > 4096)) @@ -221,7 +221,7 @@ int omap_vout_new_crop(struct v4l2_pix_format *pix, try_crop.height = 2; } /* horizontal resizing */ - hresize = (1024 * crop->width) / win->w.width; + hresize = (1024 * try_crop.width) / win->w.width; if (cpu_is_omap24xx() && (hresize > 2048)) hresize = 2048; else if (cpu_is_omap34xx() && (hresize > 4096)) -- 1.6.0.2