From: Denys Dmytriyenko <denys@ti.com>
To: Eric Ruei <e-ruei1@ti.com>
Cc: meta-arago@arago-project.org
Subject: Re: [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support
Date: Thu, 16 Mar 2017 14:04:07 -0400 [thread overview]
Message-ID: <20170316180406.GK14484@edge> (raw)
In-Reply-To: <1489685377-53666-2-git-send-email-e-ruei1@ti.com>
On Thu, Mar 16, 2017 at 01:29:36PM -0400, Eric Ruei wrote:
> Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> ---
> .../0002-kmssink-add-YUYV-support.patch | 81 ++++++++++++++++++++++
> .../gstreamer1.0-plugins-bad_1.6.3.bbappend | 2 +
> 2 files changed, 83 insertions(+)
> create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
>
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
> new file mode 100644
> index 0000000..a5791cc
> --- /dev/null
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-kmssink-add-YUYV-support.patch
> @@ -0,0 +1,81 @@
> +From af348c890c04ce9626d411055aae0974f410219f Mon Sep 17 00:00:00 2001
> +From: Eric Ruei <e-ruei1@ti.com>
> +Date: Tue, 14 Mar 2017 17:24:07 -0400
> +Subject: [PATCH 2/2] kmssink: add YUYV support
> +
> +Signed-off-by: Eric Ruei <e-ruei1@ti.com>
> +---
> + sys/kms/gstkmsbufferpriv.c | 32 +++++++++++++++++++++++++++-----
> + sys/kms/gstkmssink.c | 2 +-
> + 2 files changed, 28 insertions(+), 6 deletions(-)
> +
> +diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c
> +index 172a4c3..57c01f8 100644
> +--- a/sys/kms/gstkmsbufferpriv.c
> ++++ b/sys/kms/gstkmsbufferpriv.c
> +@@ -41,22 +41,44 @@
> + static int
> + create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink)
> + {
> ++
> + /* TODO get format, etc from caps.. and query device for
> + * supported formats, and make this all more flexible to
> + * cope with various formats:
> + */
> +- uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
> +-
> ++ GstVideoFormat format = sink->format;
> ++ uint32_t fourcc;
> + uint32_t handles[4] = {
> +- omap_bo_handle (priv->bo), omap_bo_handle (priv->bo),
> ++ omap_bo_handle (priv->bo),
> + };
> + uint32_t pitches[4] = {
> +- GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width),
> ++ GST_ROUND_UP_4 (sink->input_width),
> + };
> + uint32_t offsets[4] = {
> +- 0, pitches[0] * sink->input_height
> ++ 0,
> + };
> +
> ++ /**
> ++ * Only two formats are supported:
> ++ * AM3/4: YUYV
> ++ * AM5: NV12, YUYV
> ++ */
> ++ if(format == GST_VIDEO_FORMAT_YUY2)
> ++ {
> ++ /* YUYV */
> ++ fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V');
> ++ pitches[0] = GST_ROUND_UP_4 (sink->input_width*2);
> ++ }
> ++ else
> ++ {
> ++ /* NV12 */
> ++ fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
> ++ handles[1] = omap_bo_handle (priv->bo);
> ++ pitches[1] = GST_ROUND_UP_4 (sink->input_width);
> ++ offsets[1] = pitches[0] * sink->input_height;
> ++ }
> ++
> ++
> + return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height,
> + fourcc, handles, pitches, offsets, &priv->fb_id, 0);
> + }
> +diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c
> +index 9795bdf..b36d88f 100644
> +--- a/sys/kms/gstkmssink.c
> ++++ b/sys/kms/gstkmssink.c
> +@@ -50,7 +50,7 @@ static GstStaticPadTemplate gst_kms_sink_template_factory =
> + GST_STATIC_PAD_TEMPLATE ("sink",
> + GST_PAD_SINK,
> + GST_PAD_ALWAYS,
> +- GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12"))
> ++ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("{NV12,YUY2}"))
YUY2 or YUYV?
> + );
> +
> + enum
> +--
> +1.9.1
> +
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> index 2c903d4..317b19e 100644
> --- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bbappend
> @@ -21,10 +21,12 @@ DEPENDS_append_ti33x = " \
>
> SRC_URI_append_omap-a15 = " \
> file://0001-kmssink-remove-DCE-dependencies.patch \
> + file://0002-kmssink-add-YUYV-support.patch \
> "
>
> SRC_URI_append_ti43x = " \
> file://0001-kmssink-remove-DCE-dependencies.patch \
> + file://0002-kmssink-add-YUYV-support.patch \
> "
>
> SRC_URI_append_ti33x = " \
> --
> 1.9.1
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
next prev parent reply other threads:[~2017-03-16 18:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 17:29 [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Eric Ruei
2017-03-16 17:29 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei
2017-03-16 18:04 ` Denys Dmytriyenko [this message]
2017-03-16 18:21 ` Ruei, Eric
2017-03-16 17:29 ` [krogoth][PATCH 3/3] gstreamer1.0-plugins-bad: waylandsink: add input format I420 support Eric Ruei
2017-03-16 18:02 ` [krogoth][PATCH 1/3] gstreamer1.0-plugins-bad: kmssink: remove DCE dependencies Denys Dmytriyenko
2017-03-16 18:19 ` Ruei, Eric
2017-03-16 18:46 ` Denys Dmytriyenko
2017-03-16 19:09 ` Ruei, Eric
2017-03-16 19:13 ` Denys Dmytriyenko
2017-03-16 19:23 ` Ruei, Eric
-- strict thread matches above, loose matches on Subject: below --
2017-03-16 17:26 Eric Ruei
2017-03-16 17:26 ` [krogoth][PATCH 2/3] gstreamer1.0-plugins-bad: kmssink: add YUYV support Eric Ruei
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=20170316180406.GK14484@edge \
--to=denys@ti.com \
--cc=e-ruei1@ti.com \
--cc=meta-arago@arago-project.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.