diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2021-08-05 04:47:50 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-09-30 10:07:39 +0200 |
commit | 78eee7b5f110c9884c8ffd1dfcdd9c29296f3e43 (patch) | |
tree | 6097d71938653a137a4376fc84c89396511ae51f /drivers/media/pci | |
parent | media: Rename V4L2_PIX_FMT_SUNXI_TILED_NV12 to V4L2_PIX_FMT_NV12_32L32 (diff) | |
download | linux-78eee7b5f110c9884c8ffd1dfcdd9c29296f3e43.tar.xz linux-78eee7b5f110c9884c8ffd1dfcdd9c29296f3e43.zip |
media: Rename V4L2_PIX_FMT_HM12 to V4L2_PIX_FMT_NV12_16L16
The V4L2_PIX_FMT_HM12 format is actually a simple NV12 tiled format,
with 16x16 linear tiles. Rename the format and move its documentation
together with the other tiled NV12 formats.
Keep V4L2_PIX_FMT_HM12 for application compatibility.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/cx18/cx18-ioctl.c | 4 | ||||
-rw-r--r-- | drivers/media/pci/cx18/cx18-streams.c | 8 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-ioctl.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c index 4864def20676..ce3f0141f94e 100644 --- a/drivers/media/pci/cx18/cx18-ioctl.c +++ b/drivers/media/pci/cx18/cx18-ioctl.c @@ -276,7 +276,7 @@ static int cx18_s_fmt_vid_cap(struct file *file, void *fh, s->pixelformat = fmt->fmt.pix.pixelformat; /* HM12 YUV size is (Y=(h*720) + UV=(h*(720/2))) UYUV YUV size is (Y=(h*720) + UV=(h*(720))) */ - if (s->pixelformat == V4L2_PIX_FMT_HM12) { + if (s->pixelformat == V4L2_PIX_FMT_NV12_16L16) { s->vb_bytes_per_frame = h * 720 * 3 / 2; s->vb_bytes_per_line = 720; /* First plane */ } else { @@ -470,7 +470,7 @@ static int cx18_enum_fmt_vid_cap(struct file *file, void *fh, .index = 0, .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, .description = "HM12 (YUV 4:1:1)", - .pixelformat = V4L2_PIX_FMT_HM12, + .pixelformat = V4L2_PIX_FMT_NV12_16L16, }, { .index = 1, diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c index c41bae118415..16d37ab48906 100644 --- a/drivers/media/pci/cx18/cx18-streams.c +++ b/drivers/media/pci/cx18/cx18-streams.c @@ -133,7 +133,7 @@ static int cx18_prepare_buffer(struct videobuf_queue *q, /* HM12 YUV size is (Y=(h*720) + UV=(h*(720/2))) UYUV YUV size is (Y=(h*720) + UV=(h*(720))) */ - if (s->pixelformat == V4L2_PIX_FMT_HM12) + if (s->pixelformat == V4L2_PIX_FMT_NV12_16L16) s->vb_bytes_per_frame = height * 720 * 3 / 2; else s->vb_bytes_per_frame = height * 720 * 2; @@ -155,7 +155,7 @@ static int cx18_prepare_buffer(struct videobuf_queue *q, /* HM12 YUV size is (Y=(h*720) + UV=(h*(720/2))) UYUV YUV size is (Y=(h*720) + UV=(h*(720))) */ - if (s->pixelformat == V4L2_PIX_FMT_HM12) + if (s->pixelformat == V4L2_PIX_FMT_NV12_16L16) s->vb_bytes_per_frame = height * 720 * 3 / 2; else s->vb_bytes_per_frame = height * 720 * 2; @@ -287,7 +287,7 @@ static void cx18_stream_init(struct cx18 *cx, int type) s, &cx->serialize_lock); /* Assume the previous pixel default */ - s->pixelformat = V4L2_PIX_FMT_HM12; + s->pixelformat = V4L2_PIX_FMT_NV12_16L16; s->vb_bytes_per_frame = cx->cxhdl.height * 720 * 3 / 2; s->vb_bytes_per_line = 720; } @@ -733,7 +733,7 @@ static void cx18_stream_configure_mdls(struct cx18_stream *s) * Set the MDL size to the exact size needed for one frame. * Use enough buffers per MDL to cover the MDL size */ - if (s->pixelformat == V4L2_PIX_FMT_HM12) + if (s->pixelformat == V4L2_PIX_FMT_NV12_16L16) s->mdl_size = 720 * s->cx->cxhdl.height * 3 / 2; else s->mdl_size = 720 * s->cx->cxhdl.height * 2; diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index da19b2e95e6c..0cdf6b3210c2 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -339,7 +339,7 @@ static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f pixfmt->colorspace = V4L2_COLORSPACE_SMPTE170M; pixfmt->field = V4L2_FIELD_INTERLACED; if (id->type == IVTV_ENC_STREAM_TYPE_YUV) { - pixfmt->pixelformat = V4L2_PIX_FMT_HM12; + pixfmt->pixelformat = V4L2_PIX_FMT_NV12_16L16; /* YUV size is (Y=(h*720) + UV=(h*(720/2))) */ pixfmt->sizeimage = pixfmt->height * 720 * 3 / 2; pixfmt->bytesperline = 720; @@ -417,7 +417,7 @@ static int ivtv_g_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *f pixfmt->field = V4L2_FIELD_ANY; break; } - pixfmt->pixelformat = V4L2_PIX_FMT_HM12; + pixfmt->pixelformat = V4L2_PIX_FMT_NV12_16L16; pixfmt->bytesperline = 720; pixfmt->width = itv->yuv_info.v4l2_src_w; pixfmt->height = itv->yuv_info.v4l2_src_h; @@ -917,7 +917,7 @@ static int ivtv_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdes static const struct v4l2_fmtdesc hm12 = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, .description = "HM12 (YUV 4:2:0)", - .pixelformat = V4L2_PIX_FMT_HM12, + .pixelformat = V4L2_PIX_FMT_NV12_16L16, }; static const struct v4l2_fmtdesc mpeg = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, @@ -944,7 +944,7 @@ static int ivtv_enum_fmt_vid_out(struct file *file, void *fh, struct v4l2_fmtdes static const struct v4l2_fmtdesc hm12 = { .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, .description = "HM12 (YUV 4:2:0)", - .pixelformat = V4L2_PIX_FMT_HM12, + .pixelformat = V4L2_PIX_FMT_NV12_16L16, }; static const struct v4l2_fmtdesc mpeg = { .type = V4L2_BUF_TYPE_VIDEO_OUTPUT, |