[PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats

STALE3456d

8 messages, 3 authors, 2017-02-13 · open the first message on its own page

[PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats

From: Javier Martinez Canillas <hidden>
Date: 2017-02-01 20:05:44

Hello,

Commit 652bb68018a5 ("[media] exynos-gsc: do proper bytesperline and
sizeimage calculation") fixed corrupted frames for most exynos-gsc
formats, but even after that patch two issues were still remaining:

1) Frames were still not correct for NV21 and NV61 formats.
2) Y42B format didn't work when used as output (only as input).

This patch series fixes (1).

Best regards,
Javier


Thibault Saunier (2):
  [media] exynos-gsc: Do not swap cb/cr for semi planar formats
  [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats

 drivers/media/platform/exynos-gsc/gsc-core.c | 29 ++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

-- 
2.7.4

[PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats

From: Javier Martinez Canillas <hidden>
Date: 2017-02-01 20:05:50

From: Thibault Saunier <redacted>

In the case of semi planar formats cb and cr are in the same plane
in memory, meaning that will be set to 'cb' whatever the format is,
and whatever the (packed) order of those components are.

Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Thibault Saunier <redacted>
Signed-off-by: Javier Martinez Canillas <redacted>
---

 drivers/media/platform/exynos-gsc/gsc-core.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index 40aff08dd51d..a846659ae5c1 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -861,9 +861,7 @@ int gsc_prepare_addr(struct gsc_ctx *ctx, struct vb2_buffer *vb,
 
 	if ((frame->fmt->pixelformat == V4L2_PIX_FMT_VYUY) ||
 		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVYU) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_NV61) ||
 		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) ||
-		(frame->fmt->pixelformat == V4L2_PIX_FMT_NV21) ||
 		(frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420M))
 		swap(addr->cb, addr->cr);
 
-- 
2.7.4

Re: [PATCH 1/2] [media] exynos-gsc: Do not swap cb/cr for semi planar formats

From: Sylwester Nawrocki <s.nawrocki@samsung.com>
Date: 2017-02-13 14:35:30

On 02/01/2017 09:05 PM, Javier Martinez Canillas wrote:
From: Thibault Saunier <redacted>

In the case of semi planar formats cb and cr are in the same plane
in memory, meaning that will be set to 'cb' whatever the format is,
and whatever the (packed) order of those components are.

Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Thibault Saunier <redacted>
Signed-off-by: Javier Martinez Canillas <redacted>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

[PATCH 2/2] [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats

From: Javier Martinez Canillas <hidden>
Date: 2017-02-01 20:06:06

From: Thibault Saunier <redacted>

Those are useful formats that should be handled.

Signed-off-by: Thibault Saunier <redacted>
Signed-off-by: Javier Martinez Canillas <redacted>

---

 drivers/media/platform/exynos-gsc/gsc-core.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index a846659ae5c1..eff636d4502b 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -112,6 +112,15 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
+		.name		= "YUV 4:2:2 non-contig, Y/CbCr",
+		.pixelformat	= V4L2_PIX_FMT_NV16M,
+		.depth		= { 8, 8 },
+		.color		= GSC_YUV422,
+		.yorder		= GSC_LSB_Y,
+		.corder		= GSC_CBCR,
+		.num_planes	= 2,
+		.num_comp	= 2,
+	}, {
 		.name		= "YUV 4:2:2 planar, Y/CrCb",
 		.pixelformat	= V4L2_PIX_FMT_NV61,
 		.depth		= { 16 },
@@ -121,6 +130,15 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
+		.name		= "YUV 4:2:2 non-contig, Y/CrCb",
+		.pixelformat	= V4L2_PIX_FMT_NV61M,
+		.depth		= { 8, 8 },
+		.color		= GSC_YUV422,
+		.yorder		= GSC_LSB_Y,
+		.corder		= GSC_CRCB,
+		.num_planes	= 2,
+		.num_comp	= 2,
+	}, {
 		.name		= "YUV 4:2:0 planar, YCbCr",
 		.pixelformat	= V4L2_PIX_FMT_YUV420,
 		.depth		= { 12 },
@@ -158,6 +176,15 @@ static const struct gsc_fmt gsc_formats[] = {
 		.num_planes	= 1,
 		.num_comp	= 2,
 	}, {
+		.name		= "YUV 4:2:0 non-contig. 2p, Y/CrCb",
+		.pixelformat	= V4L2_PIX_FMT_NV21M,
+		.depth		= { 8, 4 },
+		.color		= GSC_YUV420,
+		.yorder		= GSC_LSB_Y,
+		.corder		= GSC_CRCB,
+		.num_planes	= 2,
+		.num_comp	= 2,
+	}, {
 		.name		= "YUV 4:2:0 non-contig. 2p, Y/CbCr",
 		.pixelformat	= V4L2_PIX_FMT_NV12M,
 		.depth		= { 8, 4 },
-- 
2.7.4

Re: [PATCH 2/2] [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats

From: Sylwester Nawrocki <s.nawrocki@samsung.com>
Date: 2017-02-13 14:36:17

On 02/01/2017 09:05 PM, Javier Martinez Canillas wrote:
From: Thibault Saunier <redacted>

Those are useful formats that should be handled.

Signed-off-by: Thibault Saunier <redacted>
Signed-off-by: Javier Martinez Canillas <redacted>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

Re: [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats

From: Javier Martinez Canillas <javier@dowhile0.org>
Date: 2017-02-13 12:53:16

Hello,

On Wed, Feb 1, 2017 at 5:05 PM, Javier Martinez Canillas
[off-list ref] wrote:
Hello,

Commit 652bb68018a5 ("[media] exynos-gsc: do proper bytesperline and
sizeimage calculation") fixed corrupted frames for most exynos-gsc
formats, but even after that patch two issues were still remaining:

1) Frames were still not correct for NV21 and NV61 formats.
2) Y42B format didn't work when used as output (only as input).

This patch series fixes (1).

Best regards,
Javier


Thibault Saunier (2):
  [media] exynos-gsc: Do not swap cb/cr for semi planar formats
  [media] exynos-gsc: Add support for NV{16,21,61}M pixel formats

 drivers/media/platform/exynos-gsc/gsc-core.c | 29 ++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)
Any comments on this series?

Best regards,
Javier

Re: [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats

From: Sylwester Nawrocki <s.nawrocki@samsung.com>
Date: 2017-02-13 14:34:42

Hi Javier,

On 02/13/2017 01:53 PM, Javier Martinez Canillas wrote:
Any comments on this series?
The patches look good to me, I will Ack the patches in case
Mauro wants to apply them directly.  Alternatively I will
add them to my tree for v4.12 after the merge window.

-- 
Thanks,
Sylwester

Re: [PATCH 0/2] [media] exynos-gsc: Fix support for NV21 and NV61 formats

From: Javier Martinez Canillas <hidden>
Date: 2017-02-13 14:37:28

Hello Sylwester,

On 02/13/2017 11:34 AM, Sylwester Nawrocki wrote:
Hi Javier,

On 02/13/2017 01:53 PM, Javier Martinez Canillas wrote:
quoted
Any comments on this series?
The patches look good to me, I will Ack the patches in case
Mauro wants to apply them directly.  Alternatively I will
add them to my tree for v4.12 after the merge window.
Great, thanks a lot for your help!

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help