From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark yao Subject: Re: [PATCH v2 3/5] drm/rockchip: vop: support plane scale Date: Fri, 03 Jul 2015 18:22:39 +0800 Message-ID: <5596626F.5050003@rock-chips.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; Format="flowed" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Tomasz Figa Cc: xw@rock-chips.com, zwl@rock-chips.com, "linux-kernel@vger.kernel.org" , "open list:ARM/Rockchip SoC..." , dri-devel , dkm@rock-chips.com, sandy.huang@rock-chips.com, "linux-arm-kernel@lists.infradead.org" List-Id: linux-rockchip.vger.kernel.org T24gMjAxNeW5tDA35pyIMDPml6UgMTc6NTgsIFRvbWFzeiBGaWdhIHdyb3RlOgo+Pj4gPj5BcmVu J3QgdGhlIHNjbF9tb2RlcyBmb3IgQ2JDciBwbGFuZXMgYWx3YXlzIHRoZSBzYW1lIGFzIGZvciBZ IHBsYW5lPwo+PiA+Cj4+ID4KPj4gPk5vLCBzdWNoIGFzIHNyYygxOTIwIHggMTA4MCkgLT4gZHN0 KDEyODB4ODAwKSwgeXV2IGZvcm1hdCBpcyBOVjEyLgo+PiA+c28gWSBwbGFuZSBob3Jpem9udGFs IGFuZCB2ZXJ0aWNhbCBpcyBzY2FsZSBkb3duLgo+PiA+Cj4+ID5idXQgc3JjX3cgPSAxOTIwIC8g MiA9IDk2MCA8IDEyODAKPj4gPiAgICAgICBzcmNfaCA9IDEwODAgLyAyID0gNTQwIDwgODAwLgo+ PiA+Cj4+ID5TbyBDYmNyIGhvcml6b250YWwgYW5kIHZlcnRpY2FsIGlzIHNjYWxlIHVwLgo+IFNv cnJ5LCBJIGRvbid0IGZvbGxvdy4KPgo+IElmIHdlIHNjYWxlIGRvd24gWSBwbGFuZSBpbiBOVjEy IGZyb20gMTkyMHgxMDgwIHRvIDEyODB4ODAwLCB0aGVuCj4gb3JpZ2luYWwgQ2JDciBwbGFuZSB3 aWxsIGJlIDk2MHg1NDAgYW5kIGRlc3RpbmF0aW9uIENiQ3IgcGxhbmUgd2lsbCBiZQo+IDY0MHg0 MDAgKGJlY2F1c2UgQ2JDciBwbGFuZSBvZiBOVjEyIGlzIHN1YnNhbXBsZWQgMngyLCB3aGljaCBp cyBoYWxmCj4gdGhlIHdpZHRoIGFuZCBoYWxmIHRoZSBoZWlnaHQgb2YgWSBwbGFuZSksIHNvIGJv dGggcGxhbmVzIGFyZSBiZWluZwo+IHNjYWxlZCBkb3duLgo+CmRlc3RpbmF0aW9uIENiQ3IgcGxh bmUgaXMgMTI4MHg4MDAsIGRlc3RpbmF0aW9uIGNhbid0IGJlIHN1YnNhbXBsZS4KCi0tIArvvK1h cmsKCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpkcmkt ZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1kZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cDov L2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1kZXZlbAo= From mboxrd@z Thu Jan 1 00:00:00 1970 From: mark.yao@rock-chips.com (Mark yao) Date: Fri, 03 Jul 2015 18:22:39 +0800 Subject: [PATCH v2 3/5] drm/rockchip: vop: support plane scale In-Reply-To: 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> Message-ID: <5596626F.5050003@rock-chips.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.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. -- ?ark 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