GNOME Bugzilla – Bug 775959
Support OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888
Last modified: 2016-12-22 12:48:18 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.
Created attachment 341775 [details] [review] Add autodetection for OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888 in gst_omx_video_get_format_from_omx()
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
I asked the RPi firmware people, and they said this: https://github.com/raspberrypi/firmware/issues/697#issuecomment-266473365
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 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
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