diff options
author | Mark Yao <mark.yao@rock-chips.com> | 2016-06-06 03:58:46 -0400 |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2016-07-18 21:42:20 -0400 |
commit | ee8662fc1f8c1a87f56db54d2539dcbb0252a21d (patch) | |
tree | 0e236a523a2282c99589c5df876ab9f316c8858a | |
parent | 7a1ff36c2cdfeed9bef2d5ce0aa13d72eccc773f (diff) |
drm/rockchip: vop: correct the source size of uv scale factor setting
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>
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 |
1 files 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 e01c43560669..aad105ba735f 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c | |||
@@ -328,9 +328,9 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win, | |||
328 | scl_cal_scale2(src_h, dst_h)); | 328 | scl_cal_scale2(src_h, dst_h)); |
329 | if (is_yuv) { | 329 | if (is_yuv) { |
330 | VOP_SCL_SET(vop, win, scale_cbcr_x, | 330 | VOP_SCL_SET(vop, win, scale_cbcr_x, |
331 | scl_cal_scale2(src_w, dst_w)); | 331 | scl_cal_scale2(cbcr_src_w, dst_w)); |
332 | VOP_SCL_SET(vop, win, scale_cbcr_y, | 332 | VOP_SCL_SET(vop, win, scale_cbcr_y, |
333 | scl_cal_scale2(src_h, dst_h)); | 333 | scl_cal_scale2(cbcr_src_h, dst_h)); |
334 | } | 334 | } |
335 | return; | 335 | return; |
336 | } | 336 | } |