From: Magnus Damm <magnus.damm@gmail.com>
To: video4linux-list@redhat.com
Cc: g.liakhovetski@gmx.de
Subject: [PATCH 03/03] sh_mobile_ceu: add NV16 and NV61 support
Date: Wed, 10 Dec 2008 16:44:57 +0900 [thread overview]
Message-ID: <20081210074457.5727.59206.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20081210074435.5727.93374.sendpatchset@rx1.opensource.se>
From: Magnus Damm <damm@igel.co.jp>
This patch adds NV16/NV61 support to the sh_mobile_ceu driver.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/media/video/sh_mobile_ceu_camera.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
--- 0021/drivers/media/video/sh_mobile_ceu_camera.c
+++ work/drivers/media/video/sh_mobile_ceu_camera.c 2008-12-10 00:12:02.000000000 +0900
@@ -180,6 +180,8 @@ static void sh_mobile_ceu_capture(struct
switch (icd->current_fmt->fourcc) {
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
phys_addr += (icd->width * icd->height);
ceu_write(pcdev, CDACR, phys_addr);
}
@@ -412,6 +414,9 @@ static int sh_mobile_ceu_set_bus_param(s
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
yuv_lineskip = 1; /* skip for NV12/21, no skip for NV16/61 */
+ /* fall-through */
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
yuv_mode = 1;
switch (pcdev->camera_fmt->fourcc) {
case V4L2_PIX_FMT_UYVY:
@@ -431,8 +436,9 @@ static int sh_mobile_ceu_set_bus_param(s
}
}
- if (icd->current_fmt->fourcc == V4L2_PIX_FMT_NV21)
- value ^= 0x00000100; /* swap U, V to change from NV12->NV21 */
+ if ((icd->current_fmt->fourcc == V4L2_PIX_FMT_NV21) ||
+ (icd->current_fmt->fourcc == V4L2_PIX_FMT_NV61))
+ value ^= 0x00000100; /* swap U, V to change from NV1x->NVx1 */
value |= (common_flags & SOCAM_VSYNC_ACTIVE_LOW) ? (1 << 1) : 0;
value |= (common_flags & SOCAM_HSYNC_ACTIVE_LOW) ? (1 << 0) : 0;
@@ -514,6 +520,18 @@ static const struct soc_camera_data_form
.fourcc = V4L2_PIX_FMT_NV21,
.colorspace = V4L2_COLORSPACE_JPEG,
},
+ {
+ .name = "NV16",
+ .depth = 16,
+ .fourcc = V4L2_PIX_FMT_NV16,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ },
+ {
+ .name = "NV61",
+ .depth = 16,
+ .fourcc = V4L2_PIX_FMT_NV61,
+ .colorspace = V4L2_COLORSPACE_JPEG,
+ },
};
static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, int idx,
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-12-10 7:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 7:44 [PATCH 00/03] video: nv1x/nvx1 support for the sh_mobile_ceu driver V2 Magnus Damm
2008-12-10 7:44 ` [PATCH 01/03] sh_mobile_ceu: use new pixel format translation code Magnus Damm
2008-12-10 7:44 ` [PATCH 02/03] sh_mobile_ceu: add NV12 and NV21 support Magnus Damm
2008-12-13 21:52 ` Guennadi Liakhovetski
2008-12-15 2:40 ` Magnus Damm
2008-12-15 7:44 ` Guennadi Liakhovetski
2008-12-10 7:44 ` Magnus Damm [this message]
2008-12-13 21:56 ` [PATCH 03/03] sh_mobile_ceu: add NV16 and NV61 support Guennadi Liakhovetski
2008-12-14 1:21 ` Mauro Carvalho Chehab
2008-12-12 8:37 ` [PATCH 00/03] video: nv1x/nvx1 support for the sh_mobile_ceu driver V2 morimoto.kuninori
2008-12-12 9:03 ` Magnus Damm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081210074457.5727.59206.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox