From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755042AbbGCKWx (ORCPT ); Fri, 3 Jul 2015 06:22:53 -0400 Received: from regular1.263xmail.com ([211.150.99.138]:50871 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754888AbbGCKWq (ORCPT ); Fri, 3 Jul 2015 06:22:46 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-RL-SENDER: mark.yao@rock-chips.com X-FST-TO: tfiga@chromium.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: mark.yao@rock-chips.com X-UNIQUE-TAG: <1ac3dc2d3639b0eccd61f4b804863648> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Message-ID: <5596626F.5050003@rock-chips.com> Date: Fri, 03 Jul 2015 18:22:39 +0800 From: Mark yao User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Tomasz Figa CC: dri-devel , David Airlie , Heiko Stuebner , Daniel Kurtz , Philipp Zabel , Daniel Vetter , Rob Clark , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/Rockchip SoC..." , "linux-kernel@vger.kernel.org" , sandy.huang@rock-chips.com, dkm@rock-chips.com, zwl@rock-chips.com, xw@rock-chips.com Subject: Re: [PATCH v2 3/5] drm/rockchip: vop: support plane scale References: <1435313249-4549-1-git-send-email-mark.yao@rock-chips.com> <1435313249-4549-4-git-send-email-mark.yao@rock-chips.com> <55965344.5050502@rock-chips.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015年07月03日 17:58, Tomasz Figa wrote: >>> >>Aren't the scl_modes for CbCr planes always the same as for Y plane? >> > >> > >> >No, such as src(1920 x 1080) -> dst(1280x800), yuv format is NV12. >> >so Y plane horizontal and vertical is scale down. >> > >> >but src_w = 1920 / 2 = 960 < 1280 >> > src_h = 1080 / 2 = 540 < 800. >> > >> >So Cbcr horizontal and vertical is scale up. > Sorry, I don't follow. > > If we scale down Y plane in NV12 from 1920x1080 to 1280x800, then > original CbCr plane will be 960x540 and destination CbCr plane will be > 640x400 (because CbCr plane of NV12 is subsampled 2x2, which is half > the width and half the height of Y plane), so both planes are being > scaled down. > destination CbCr plane is 1280x800, destination can't be subsample. -- Mark