From: tfiga@chromium.org (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/5] drm/rockchip: vop: support plane scale
Date: Fri, 3 Jul 2015 23:37:09 +0900 [thread overview]
Message-ID: <CAAFQd5AM1-w8ynyn_Usr8OitdXSUcU85scvcYCTEZebzLqLn0w@mail.gmail.com> (raw)
In-Reply-To: <5596626F.5050003@rock-chips.com>
On Fri, Jul 3, 2015 at 7:22 PM, Mark yao <mark.yao@rock-chips.com> wrote:
> 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.
Ah, I see, so internally it's always scalling to destination plane
size. This means that calculation for both Y and CbCr must be done
indeed, but even then you could use helper functions for that, since
they differ only in parameters.
Best regards,
Tomasz
next prev parent reply other threads:[~2015-07-03 14:37 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
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
2015-07-03 9:58 ` Tomasz Figa
2015-07-03 10:14 ` Russell King - ARM Linux
2015-07-03 10:22 ` Mark yao
2015-07-03 14:37 ` Tomasz Figa [this message]
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=CAAFQd5AM1-w8ynyn_Usr8OitdXSUcU85scvcYCTEZebzLqLn0w@mail.gmail.com \
--to=tfiga@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).