<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 8/7/2019 8:26 PM, Nicolas Dufresne-5
[via GStreamer-devel] wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKQmDh8G-8ztrMuiYSQGPVPT6t2TyBttWFeedjxVRXX6WzAX+A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div><br>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le mer. 7 août 2019 02 h
55, Yan Wang <<a
href="/user/SendEmail.jtp?type=node&node=4691633&i=0"
target="_top" rel="nofollow" link="external"
moz-do-not-send="true">[hidden email]</a>> a écrit :<br>
</div>
<blockquote style="border-left:2px solid #CCCCCC;padding:0
1em" class="gmail_quote">
<div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="m_6399927642507458517moz-cite-prefix">On
8/7/2019 9:40 AM, Nicolas Dufresne-5 [via
GStreamer-devel] wrote:<br>
</div>
<blockquote style="border-left:2px solid
#CCCCCC;padding:0 1em" type="cite"> Le mardi 06 août
2019 à 14:31 +0800, Yan Wang a écrit :
<div class="m_6399927642507458517shrinkable-quote"><br>
> <br>
> On 8/5/2019 9:29 PM, Nicolas Dufresne-5 [via
GStreamer-devel] wrote: <br>
> > <br>
> > Le lun. 5 août 2019 02 h 55, Yan Wang
<[hidden email]> a écrit : <br>
> > > <br>
> > > On 8/3/2019 9:25 PM, Nicolas
Dufresne-5 [via GStreamer-devel] wrote: <br>
> > > > Le vendredi 02 août 2019 à 20:45
-0500, kmliu a écrit : <br>
> > > > <br>
> > > > > I need to decode H.264
video via VAAPI and then extract the decoded frames
to <br>
> > > > > main memory. Since I intend
to crop the frames anyway, I'd like to crop them <br>
> > > > > while they're still in
graphics memory, to reduce memory bandwidth <br>
> > > > > consumption. So
conceptually, I want to do this: <br>
> > > > > <br>
> > > > > gst-launch-1.0 rtspsrc
location=rtsp_uri ! rtph264depay ! vaapih264dec ! <br>
> > > > > videocrop left=x right=x
top=x bottom=x ! filesink location=video.yuv <br>
> > > > > <br>
> > > > > But I think this will end
up copying the whole frames to main memory before <br>
> > > > > cropping it there. It would
be nice if vaapipostproc supports cropping? <br>
> > > > <br>
> > > > Another (simplier) option is to
use gltransformation, but apparently <br>
> > > > not all distro ship this plugin.
<br>
> > > <br>
> > > May I add the crop option for
vaapih264dec? <br>
> > > <br>
> > > It may be more direct. <br>
> > > <br>
> > > <br>
> > <br>
> > Sounds wrong to me, and I doubt you'll
find an API to support that. If there is one element
in VAAPI that may have an API for this it would be
vaapipostproc. <br>
> <br>
> Yes. I know vaapipostproc can do this. <br>
> <br>
> IMHO, this could be done in decode context too
if VAConfigAttribDecProcessing can support it. <br>
> <br>
> <a
href="https://github.com/intel/libva/blob/master/va/va.h#L520"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">https://github.com/intel/libva/blob/master/va/va.h#L520</a><br>
> <br>
> Currently It can do scaling (1/8 ~ 8x at most,
CSC). Cropping can be the special case of scaling. <br>
> <br>
> If vaapih264dec provides the interface, it can
reduce the overhead and power because it is fixed
function. And no need vaapipostproc context. <br>
> <br>
> But it may make vaapih264dec more complex and
cannot support multiply pipelines of decoding. So it
is just one possible option. </div>
<br>
If you know how it works, just give it a try. You can
find similar code <br>
in -good/sys/gstv4l2videodec.c, but only for the CSC
bit. Scaling is <br>
more complex though, because of the pixel aspect ratio
handling. It's <br>
this a proper scaler or just multiple of 2 ? <br>
</blockquote>
<p>I will check -good/sys/gstv4l2videodec.c.</p>
<p>This scaling/CSC has some limitation. It could be
attached only one decoding pipeline.</p>
<p>So it is different with normal videopostproc pipeline
but videopostproc pipeline could select it too. The
logic of the selection should be in media driver
currently.</p>
<p>Of course, it can also be selected in gstreamer-vaapi
directly.<br>
</p>
<p>Thanks for your comments.</p>
</div>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Yes, I'm familiar with those CSC, Coda IP from
chip&media and Hantro IP (used in rockchip and imx8) have
similar features. I guess when enabled, there will be two set
of output surfaces ?<br>
</div>
</div>
</blockquote>
<p>Yes. If enabled, there could be 2 output surfaces at the same
time which could have the different format and size.</p>
<p>I will try it. <br>
</p>
<p>Thanks.</p>
<p>Yan Wang<br>
</p>
<blockquote type="cite"
cite="mid:CAKQmDh8G-8ztrMuiYSQGPVPT6t2TyBttWFeedjxVRXX6WzAX+A@mail.gmail.com">
<div dir="auto">
<div dir="auto"><br>
</div>
<div dir="auto">
<div class="gmail_quote">
<blockquote style="border-left:2px solid #CCCCCC;padding:0
1em" class="gmail_quote">
<div text="#000000" bgcolor="#FFFFFF">
<p>Yan Wang<br>
</p>
<blockquote style="border-left:2px solid
#CCCCCC;padding:0 1em" type="cite">
<div class="m_6399927642507458517shrinkable-quote"><br>
> <br>
> Thanks. <br>
> <br>
> Yan Wang <br>
> <br>
> > <br>
> > > Thanks. <br>
> > > <br>
> > > Yan Wang <br>
> > > <br>
> > > <br>
> > > <br>
> > > > > <br>
> > > > > <br>
> > > > > <br>
> > > > > -- <br>
> > > > > Sent from: <a
href="http://gstreamer-devel.966125.n4.nabble.com/"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
> > > > >
_______________________________________________ <br>
> > > > > gstreamer-devel mailing
list <br>
> > > > > [hidden email] <br>
> > > > > <a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> > > > <br>
> > > >
_______________________________________________ <br>
> > > > gstreamer-devel mailing list <br>
> > > > [hidden email] <br>
> > > > <a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
<br>
> > > > <br>
> > > > If you reply to this email, your
message will be added to the discussion below: <br>
> > > > <a
href="http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691569.html"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691569.html</a><br>
> > > > To start a new topic under
GStreamer-devel, email [hidden email] <br>
> > > > To unsubscribe from
GStreamer-devel, click here. <br>
> > > > NAML <br>
> > > <br>
> > >
_______________________________________________ <br>
> > > gstreamer-devel mailing list <br>
> > > [hidden email] <br>
> > > <a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
> > <br>
> >
_______________________________________________ <br>
> > gstreamer-devel mailing list <br>
> > [hidden email] <br>
> > <a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
<br>
> > <br>
> > If you reply to this email, your message
will be added to the discussion below: <br>
> > <a
href="http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691583.html"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691583.html</a><br>
> > To start a new topic under
GStreamer-devel, email <a
href="http:///user/SendEmail.jtp?type=node&node=4691613&i=0"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">[hidden email]</a> <br>
> > To unsubscribe from GStreamer-devel, click
here. <br>
> > NAML <br>
> <br>
> _______________________________________________
<br>
> gstreamer-devel mailing list <br>
> <a
href="http:///user/SendEmail.jtp?type=node&node=4691613&i=1"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">[hidden email]</a> <br>
> <a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></div>
<br>
_______________________________________________ <br>
gstreamer-devel mailing list <br>
<a
href="http:///user/SendEmail.jtp?type=node&node=4691613&i=2"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">[hidden email]</a> <br>
<a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
rel="nofollow" link="external" target="_blank"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
<br>
<br>
<hr size="1" noshade="noshade" color="#cccccc">
<div style="color:#444;font:12px
tahoma,geneva,helvetica,arial,sans-serif">
<div style="font-weight:bold">If you reply to this
email, your message will be added to the
discussion below:</div>
<a
href="http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691613.html"
target="_blank" rel="nofollow" link="external"
moz-do-not-send="true">http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691613.html</a>
</div>
<div style="color:#666;font:11px
tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To start a new topic under GStreamer-devel, email <a
href="/user/SendEmail.jtp?type=node&node=4691633&i=1"
target="_top" rel="nofollow" link="external"
moz-do-not-send="true">[hidden email]</a> <br>
To unsubscribe from GStreamer-devel, <a href=""
target="_blank" rel="nofollow" link="external"
moz-do-not-send="true">click here</a>.<br>
<a
href="http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
rel="nofollow" style="font:9px serif"
target="_blank" link="external"
moz-do-not-send="true">NAML</a> </div>
</blockquote>
</div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a
href="/user/SendEmail.jtp?type=node&node=4691633&i=2"
target="_top" rel="nofollow" link="external"
moz-do-not-send="true">[hidden email]</a><br>
<a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
rel="nofollow" target="_blank" link="external"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a></blockquote>
</div>
</div>
</div>
<br>
_______________________________________________
<br>
gstreamer-devel mailing list
<br>
<a href="/user/SendEmail.jtp?type=node&node=4691633&i=3"
target="_top" rel="nofollow" link="external"
moz-do-not-send="true">[hidden email]</a>
<br>
<a
href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
target="_top" rel="nofollow" link="external"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
<br>
<br>
<hr size="1" noshade="noshade" color="#cccccc">
<div style="color:#444; font: 12px
tahoma,geneva,helvetica,arial,sans-serif;">
<div style="font-weight:bold">If you reply to this email, your
message will be added to the discussion below:</div>
<a
href="http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691633.html"
moz-do-not-send="true">http://gstreamer-devel.966125.n4.nabble.com/Is-there-a-way-to-crop-in-VAAPI-tp4691566p4691633.html</a>
</div>
<div style="color:#666; font: 11px
tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To start a new topic under GStreamer-devel, email
<a class="moz-txt-link-abbreviated" href="mailto:ml+s966125n966125h86@n4.nabble.com">ml+s966125n966125h86@n4.nabble.com</a> <br>
To unsubscribe from GStreamer-devel, <a
href="http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=966125&code=eWFuLndhbmdAbGludXguaW50ZWwuY29tfDk2NjEyNXwxMDk4MzUzMzA="
moz-do-not-send="true">click here</a>.<br>
<a
href="http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml"
rel="nofollow" style="font:9px serif" moz-do-not-send="true">NAML</a>
</div>
</blockquote>
</body>
</html>