Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1415606

Re: [PATCH 2/2] drm/rockchip: vop: correct the source size of uv scale factor setting

From Mark yao <mark.yao@rock-chips.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] drm/rockchip: vop: correct the source size of uv scale factor setting
Date 2016-06-07 03:00 +0200
Message-ID <rHdx7-3Ri-13@gated-at.bofh.it> (permalink)
References <rGXC1-1Xz-3@gated-at.bofh.it> <rGXC1-1Xz-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016年06月06日 15:58, Yakir Yang wrote:
> From: Mark Yao <mark.yao@rock-chips.com>
>
> When the input color format is YUV, we need to do some external scale
> for CBCR. Like,
>   * In YUV420 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h * 2;
>   * In YUV422 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h;
>   * In YUV444 data format
>       cbcr_xscale = dst_w / src_w;
>       cbcr_yscale = dst_h / src_h;
>
> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
> ---
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 1c4d5b5..b28cda7 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -324,9 +324,9 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
>   			    scl_cal_scale2(src_h, dst_h));
>   		if (is_yuv) {
>   			VOP_SCL_SET(vop, win, scale_cbcr_x,
> -				    scl_cal_scale2(src_w, dst_w));
> +				    scl_cal_scale2(cbcr_src_w, dst_w));
>   			VOP_SCL_SET(vop, win, scale_cbcr_y,
> -				    scl_cal_scale2(src_h, dst_h));
> +				    scl_cal_scale2(cbcr_src_h, dst_h));
>   		}
>   		return;
>   	}
Thanks for this fix, Applied to my drm-fixes.

-- 
Mark Yao

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] drm/rockchip: vop: correct the source size of uv scale factor setting Yakir Yang <ykk@rock-chips.com> - 2016-06-06 10:00 +0200
  Re: [PATCH 2/2] drm/rockchip: vop: correct the source size of uv  scale factor setting Mark yao <mark.yao@rock-chips.com> - 2016-06-07 03:00 +0200

csiph-web