mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: rockchip: vpss: support ver_stride input config
Signed-off-by: Wei Dun <willam.wei@rock-chips.com> Change-Id: I7bda66e3f3b10ebec49476141f3e0225895df4c3
This commit is contained in:
@@ -846,7 +846,9 @@ static int read_config(struct rkvpss_offline_dev *ofl,
|
||||
case V4L2_PIX_FMT_NV16:
|
||||
if (cfg->input.stride < ALIGN(cfg->input.width, 16))
|
||||
cfg->input.stride = ALIGN(cfg->input.width, 16);
|
||||
in_c_offs = cfg->input.stride * cfg->input.height;
|
||||
in_c_offs = cfg->input.ver_stride ?
|
||||
cfg->input.stride * cfg->input.ver_stride :
|
||||
cfg->input.stride * cfg->input.height;
|
||||
in_size = cfg->input.stride * cfg->input.height * 2;
|
||||
in_ctrl |= RKVPSS_MI_RD_INPUT_422SP;
|
||||
unite_off = 8;
|
||||
@@ -854,7 +856,9 @@ static int read_config(struct rkvpss_offline_dev *ofl,
|
||||
case V4L2_PIX_FMT_NV12:
|
||||
if (cfg->input.stride < ALIGN(cfg->input.width, 16))
|
||||
cfg->input.stride = ALIGN(cfg->input.width, 16);
|
||||
in_c_offs = cfg->input.stride * cfg->input.height;
|
||||
in_c_offs = cfg->input.ver_stride ?
|
||||
cfg->input.stride * cfg->input.ver_stride :
|
||||
cfg->input.stride * cfg->input.height;
|
||||
in_size = cfg->input.stride * cfg->input.height * 3 / 2;
|
||||
in_ctrl |= RKVPSS_MI_RD_INPUT_420SP;
|
||||
unite_off = 8;
|
||||
@@ -862,7 +866,9 @@ static int read_config(struct rkvpss_offline_dev *ofl,
|
||||
case V4L2_PIX_FMT_NV61:
|
||||
if (cfg->input.stride < ALIGN(cfg->input.width, 16))
|
||||
cfg->input.stride = ALIGN(cfg->input.width, 16);
|
||||
in_c_offs = cfg->input.stride * cfg->input.height;
|
||||
in_c_offs = cfg->input.ver_stride ?
|
||||
cfg->input.stride * cfg->input.ver_stride :
|
||||
cfg->input.stride * cfg->input.height;
|
||||
in_size = cfg->input.stride * cfg->input.height * 2;
|
||||
in_ctrl |= RKVPSS_MI_RD_INPUT_422SP | RKVPSS_MI_RD_UV_SWAP;
|
||||
unite_off = 8;
|
||||
@@ -870,7 +876,9 @@ static int read_config(struct rkvpss_offline_dev *ofl,
|
||||
case V4L2_PIX_FMT_NV21:
|
||||
if (cfg->input.stride < ALIGN(cfg->input.width, 16))
|
||||
cfg->input.stride = ALIGN(cfg->input.width, 16);
|
||||
in_c_offs = cfg->input.stride * cfg->input.height;
|
||||
in_c_offs = cfg->input.ver_stride ?
|
||||
cfg->input.stride * cfg->input.ver_stride :
|
||||
cfg->input.stride * cfg->input.height;
|
||||
in_size = cfg->input.stride * cfg->input.height * 3 / 2;
|
||||
in_ctrl |= RKVPSS_MI_RD_INPUT_420SP | RKVPSS_MI_RD_UV_SWAP;
|
||||
unite_off = 8;
|
||||
@@ -2274,9 +2282,9 @@ int rkvpss_prepare_run(struct rkvpss_offline_dev *ofl,
|
||||
t = ktime_get();
|
||||
|
||||
v4l2_info(&ofl->v4l2_dev,
|
||||
"%s dev_id:%d seq:%d mirror:%d input:%dx%d buffd:%d format:%c%c%c%c stride:%d rotate:%d\n",
|
||||
"%s dev_id:%d seq:%d mirror:%d input:%dx%d [%dx%d] buffd:%d format:%c%c%c%c stride:%d rotate:%d\n",
|
||||
__func__, cfg->dev_id, cfg->sequence, cfg->mirror,
|
||||
cfg->input.width, cfg->input.height, cfg->input.buf_fd,
|
||||
cfg->input.width, cfg->input.height, cfg->input.stride, cfg->input.ver_stride, cfg->input.buf_fd,
|
||||
cfg->input.format, cfg->input.format >> 8,
|
||||
cfg->input.format >> 16, cfg->input.format >> 24,
|
||||
cfg->input.stride, cfg->input.rotate);
|
||||
|
||||
@@ -244,6 +244,7 @@ struct rkvpss_module_sel {
|
||||
* height: height of input image, range: 32~3504(rk3576) 32~3072(rv1126b)
|
||||
* stride: virtual width of input image, 16 align. auto calculate according to width and
|
||||
* format if 0.
|
||||
* ver_stride: virtual height of input image.
|
||||
* format: V4L2_PIX_FMT_NV12/V4L2_PIX_FMT_NV16/V4L2_PIX_FMT_RGB565/V4L2_PIX_FMT_RGB24/
|
||||
* V4L2_PIX_FMT_XBGR32/
|
||||
* V4L2_PIX_FMT_NV61/V4L2_PIX_FMT_NV21/V4L2_PIX_FMT_RGB565X/V4L2_PIX_FMT_BGR24/
|
||||
@@ -259,6 +260,7 @@ struct rkvpss_input_cfg {
|
||||
int width;
|
||||
int height;
|
||||
int stride;
|
||||
int ver_stride;
|
||||
int format;
|
||||
int buf_fd;
|
||||
int rotate;
|
||||
|
||||
Reference in New Issue
Block a user