dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Tomasz Figa <tfiga@chromium.org>
Cc: Mark yao <mark.yao@rock-chips.com>,
	zwl@rock-chips.com, Daniel Vetter <daniel@ffwll.ch>,
	David Airlie <airlied@linux.ie>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Daniel Kurtz <djkurtz@chromium.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Rob Clark <robdclark@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	xw@rock-chips.com, dkm@rock-chips.com,
	sandy.huang@rock-chips.com,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Heiko Stuebner <heiko@sntech.de>
Subject: Re: [PATCH v2 3/5] drm/rockchip: vop: support plane scale
Date: Fri, 3 Jul 2015 11:14:27 +0100	[thread overview]
Message-ID: <20150703101427.GT7557@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAAFQd5B3NnUQRqdaXUz6BGCn-5rh1iXnfZXnQRDK3=nF_Ya7SA@mail.gmail.com>

On Fri, Jul 03, 2015 at 06:58:44PM +0900, Tomasz Figa wrote:
> On Fri, Jul 3, 2015 at 6:17 PM, Mark yao <mark.yao@rock-chips.com> 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.

This is about displaying a NV12 image with arbitary scaling, right?
If so, think about what happens when you want to display such an image.
You don't display the raw NV12 image, the image gets converted to an
appropriate format first (be that RGB or YUV with no sub-sampling.)

What that means is that you need to scale each component to be the
same resolution.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-07-03 10:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26 10:07 [PATCH v2 0/5] drm/rockchip: support yuv overlay and plane scale Mark Yao
2015-06-26 10:07 ` [PATCH v2 1/5] drm/rockchip: vop: optimize virtual stride calculate Mark Yao
2015-07-02  4:59   ` Tomasz Figa
2015-07-02  6:13     ` Mark yao
2015-06-26 10:07 ` [PATCH v2 2/5] drm/rockchip: vop: fix yuv plane support Mark Yao
2015-07-02  6:00   ` Tomasz Figa
2015-07-02  6:53     ` Mark yao
     [not found]       ` <5594DFF2.8020609-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-07-02  7:07         ` Tomasz Figa
2015-06-26 10:07 ` [PATCH v2 3/5] drm/rockchip: vop: support plane scale Mark Yao
2015-07-03  7:46   ` Tomasz Figa
2015-07-03  9:17     ` Mark yao
     [not found]       ` <55965344.5050502-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-07-03  9:58         ` Tomasz Figa
2015-07-03 10:14           ` Russell King - ARM Linux [this message]
2015-07-03 10:22           ` Mark yao
2015-07-03 14:37             ` Tomasz Figa
2015-06-26 10:07 ` [PATCH v2 4/5] drm/rockchip: vop: switch cursor plane to window 3 Mark Yao
2015-07-03  7:55   ` Tomasz Figa
2015-07-21  7:38   ` Tomasz Figa
2015-06-26 10:10 ` [PATCH v2 5/5] drm/rockchip: default enable win2/3 area0 bit Mark Yao
2015-07-03  8:02   ` Tomasz Figa
2015-07-03  8:19     ` Mark yao
2015-07-03  9:24       ` Tomasz Figa
2015-07-03 10:08         ` Mark yao
2015-07-21  7:33           ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150703101427.GT7557@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=djkurtz@chromium.org \
    --cc=dkm@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.yao@rock-chips.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robdclark@gmail.com \
    --cc=sandy.huang@rock-chips.com \
    --cc=tfiga@chromium.org \
    --cc=xw@rock-chips.com \
    --cc=zwl@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).