<div dir="ltr"><div>Hi Sebastian.<br><br></div>See replies further down.<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 23, 2016 at 10:14 AM, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Mo, 2016-02-22 at 16:30 +0100, Peter Maersk-Moller wrote:<br>
> Hi Sebastian.<br>
> Seems you wrote most of the omx modules.<br>
> Is it possible to extend omxh264enc and omxh264dec to accept<br>
> respectively provide BGRA in addition to the RGBA format they already<br>
> support?<br>
> Such an addition can make a big difference on the RasPi platform in<br>
> case BGRA is needed due to the high penalty one has to pay when<br>
> converting from RGBA to BGRA. As far as I can see, the hardware<br>
> encoder/decoder on the RasPi supports BGRA in addition to the<br>
> selected RGBA format.<br>
> I420 may also be useful.<br>
<br>
</span>I420 is already supported, no?<br></blockquote><div><br></div><div>My mistake. So far it seems I420 is the only one that works.<br></div><div>Testing the following pipeline:<br><br><div style="margin-left:40px">gst-launch-1.0 -v videotestsrc is-live=1 ! 'video/x-raw,format='$format ! omxh264enc ! fakesink<br></div><br>with these formats :I420 YV12 YUY2 UYVY AYUV RGBx BGRx xRGB xBGR RGBA BGRA ARGB ABGR RGB BGR Y41B Y42B YVYU Y444 v210 v216 NV12 NV21 NV16 NV61 NV24 GRAY8 GRAY16_BE GRAY16_LE v308 RGB16 BGR16 RGB15 BGR15 UYVP A420 RGB8P YUV9 YVU9 IYU1 ARGB64 AYUV64 r210 I420_10LE I420_10BE I422_10LE I422_10BE Y444_10LE Y444_10BE GBR GBR_10LE GBR_10BE NV12_64Z32 A420_10LE A420_10BE A422_10LE A422_10BE A444_10LE A444_10BE<br><br></div><div>Then only format that works is I420.<br><br>Shouldn't 'gst-inspect-1.0 omxh264enc' report that the only format it takes is I420?<br><br>The format RGB16 with the above pipeline reports :<br><br><div style="margin-left:40px">ERROR:gstomxvideoenc.c:1072:gst_omx_video_enc_set_format: code should not be reached<br></div><br></div><div>while all the other formats reports:<br><br><div style="margin-left:40px">ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.<br></div><br></div><div>When using this pipeline:<br><br><div style="margin-left:40px">gst-launch-1.0 -v videotestsrc is-live=1 ! 'video/x-raw,format='$format ! videoconvert ! omxh264enc ! fakesink<br><br></div>the following formats works (<b>but gets converted to I420 by videoconvert</b>):<br><br><div style="margin-left:40px">I420, YV12, NV12, NV21, A420, YUV9, YVU9, I420_10LE, I420_10BE, NV12_64Z32, A420_10LE, A420_10BE,<br></div><br></div><div>while the rest does not producing this error:<br><br><div style="margin-left:40px">ERROR:gstomxvideoenc.c:1072:gst_omx_video_enc_set_format: code should not be reached<br></div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
For the other formats, adding support for them would definitely be a<br>
good idea. Can you file a bug for this, ideally with a patch?<br></blockquote><div><br></div><div>I can. Is the above description enough for the bug report?<br><br></div><div>For the patch, can you point to the code where you detect hardware capabilities before reporting it for the sink pad of omxh264enc ?<br></div><div>Is the code in omxh264enc prepared for reporting multiple sink capabilities, or just one. Not sure I know how to extend the code to report multiple capabilities. When done, I can try to look into how to make the hardware encoder accept other formats than I420 as it should be able to. Maybe it needs some of these *broadcom tunnels* for conversion that some of the encoding examples for BCM2835/2836 shows.<br><br></div><div>Best regards<br></div><div>Peter Maersk-Moller<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="noreferrer" target="_blank">http://www.centricular.com</a><br>
<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div></div>