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 792039 - h26{4,5}parse: expose chroma format and bit depth in caps
h26{4,5}parse: expose chroma format and bit depth in caps
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-29 11:30 UTC by Guillaume Desmottes
Modified: 2018-01-24 17:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
h26{4,5}parse: expose chroma format and bit depth in caps (3.74 KB, patch)
2017-12-29 11:31 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2017-12-29 11:30:51 UTC
Our plan is to use this in the OMX decoder of the ZynqUscale+.
Comment 1 Guillaume Desmottes 2017-12-29 11:31:37 UTC
Created attachment 366071 [details] [review]
h26{4,5}parse: expose chroma format and bit depth in caps

This information could be used for example to pick a decoder supporting
a specific chroma and/or bit depth, like 4:2:2 10 bits.
It can also be used to inform earlier decoder about the format it is
about to decode.
Comment 2 Guillaume Desmottes 2017-12-29 11:59:12 UTC
See bug #792040 for the OMX patches.
Comment 3 Nicolas Dufresne (ndufresne) 2018-01-24 16:18:28 UTC
Review of attachment 366071 [details] [review]:

Looks good.
Comment 4 Tim-Philipp Müller 2018-01-24 16:30:57 UTC
Why is it not enough to pick decoders based on supported profiles here?
Comment 5 Nicolas Dufresne (ndufresne) 2018-01-24 16:51:05 UTC
Attachment 366071 [details] pushed as a1b271d - h26{4,5}parse: expose chroma format and bit depth in caps
Comment 6 Nicolas Dufresne (ndufresne) 2018-01-24 16:59:45 UTC
(In reply to Tim-Philipp Müller from comment #4)
> Why is it not enough to pick decoders based on supported profiles here?

It's a hint to the decoder so it can reduce the size of the first output buffer allocation. If you only look at the profile, you endup always allocating that buffer as if it was going to be the higher depth supported. In general this field can be ignored. I only expect to see this appear in fixed caps to be honest.

In the specific figure, we have limited RAM considering we are handling 8 x 4K streams. In addition to that, we are still using CMA, so allocating memory takes a lot of time. By guessing better the output allocation, we end up not having to reallocated and copy later on, saving in startup latency and RAM at the same time.
Comment 7 Nicolas Dufresne (ndufresne) 2018-01-24 17:02:08 UTC
Obviously, the decoder could parse it, but I forgot to mention that to get rid of the startup latency issues, this decoder will pre-allocate when the caps are set. We make sure these caps are out of band, and then we can ensure the pre-allocation is done before the streams starts flowing (even before the first buffer was encoded/capture).