mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-03 20:34:58 +08:00
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>
This commit is contained in:
parent
7a1ff36c2c
commit
ee8662fc1f
@ -328,9 +328,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user