After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 775959 - Support OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888
Support OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
git master
Other Linux
: Normal normal
: 1.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-11 19:50 UTC by minfrin
Modified: 2016-12-22 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add autodetection for OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888 in gst_omx_video_get_format_from_omx() (1.24 KB, patch)
2016-12-11 19:56 UTC, minfrin
committed Details | Review

Description minfrin 2016-12-11 19:50:35 UTC
Add autodetection for OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888 in gst_omx_video_get_format_from_omx().

Silences complaints on the RPi3 that these formats are not recognised.
Comment 1 minfrin 2016-12-11 19:56:02 UTC
Created attachment 341775 [details] [review]
Add autodetection for OMX_COLOR_FormatYUV420PackedSemiPlanar  and OMX_COLOR_Format24bitBGR888 in gst_omx_video_get_format_from_omx()
Comment 2 Sebastian Dröge (slomo) 2016-12-12 08:47:52 UTC
Review of attachment 341775 [details] [review]:

According to the spec:

> This format differs from OMX_COLOR_FormatYUV420Se
> miPlanar in that each slice of data shall contain a plane of Y, U and V 
> data, whereas the OMX_COLOR_FormatYUV420Se
> miPlanar format transfers each plane in its entirety. 

This sounds to me like the Packed version is not actually planar but indeed packed. So not the same as NV12.
Can you confirm that it is the same on the RPi? If so, we should probably add some configuration to gstomx.conf, some new hack flag, that maps the Packed*Planar things to the same as the non-Packed*Planar.


But it's not clear to me how exactly that should look like.

::: omx/gstomxvideo.c
@@ +78,3 @@
       break;
+    case OMX_COLOR_Format24bitBGR888:
+      format = GST_VIDEO_FORMAT_BGR;

This one seems ok
Comment 3 minfrin 2016-12-12 16:17:44 UTC
I asked the RPi firmware people, and they said this:

https://github.com/raspberrypi/firmware/issues/697#issuecomment-266473365
Comment 4 Sebastian Dröge (slomo) 2016-12-12 21:44:11 UTC
Understood what the difference is now while I was away from the computer.

They are the same if sliceHeight == frameHeight. If a slice is smaller than that, with packed you have all 3 planes in there. With non-packed, I have no idea what you get then but not data for all 3 planes apparently.

So yes, as we don't support sliceHeight < frameHeight, it's indeed equivalent for us.
Comment 5 Sebastian Dröge (slomo) 2016-12-12 21:46:39 UTC
Comment on attachment 341775 [details] [review]
Add autodetection for OMX_COLOR_FormatYUV420PackedSemiPlanar  and OMX_COLOR_Format24bitBGR888 in gst_omx_video_get_format_from_omx()

Will merge tomorrow
Comment 6 Sebastian Dröge (slomo) 2016-12-13 09:19:08 UTC
commit 8b01b06af6c181ff21f5c60b5adbb232feeeea2c
Author: Graham Leggett <minfrin@sharp.fm>
Date:   Sun Dec 11 19:52:37 2016 +0000

    Add support for OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775959