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 784379 - omxh264enc: add property to control the number of B-frames
omxh264enc: add property to control the number of B-frames
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-omx
git master
Other Linux
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-30 13:08 UTC by Guillaume Desmottes
Modified: 2017-07-03 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omxh264enc: fix typo in 'set_avc_intra_period' (1.19 KB, patch)
2017-06-30 13:09 UTC, Guillaume Desmottes
committed Details | Review
omxh264enc: add 'b-frames' property (6.37 KB, patch)
2017-06-30 13:09 UTC, Guillaume Desmottes
none Details | Review
omxh264enc: add 'b-frames' property (5.94 KB, patch)
2017-07-03 08:57 UTC, Guillaume Desmottes
committed Details | Review
omxh264enc: raise a warning if AVCIntraPeriod is not supported (1.14 KB, patch)
2017-07-03 08:58 UTC, Guillaume Desmottes
none Details | Review
omxh264enc: raise a warning if AVCIntraPeriod is not supported (1.31 KB, patch)
2017-07-03 13:44 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2017-06-30 13:08:35 UTC
.
Comment 1 Guillaume Desmottes 2017-06-30 13:09:27 UTC
Created attachment 354729 [details] [review]
omxh264enc: fix typo in 'set_avc_intra_period'
Comment 2 Guillaume Desmottes 2017-06-30 13:09:33 UTC
Created attachment 354730 [details] [review]
omxh264enc: add 'b-frames' property

Add a property to control the number of B-frames produced by the
encoder using the OMX_VIDEO_PARAM_AVCTYPE OMX API.

Only add it for the 'Zynq UltraScale+' platform for now as
that's where I've got it working.
Comment 3 Nicolas Dufresne (ndufresne) 2017-06-30 13:38:32 UTC
Better try it in all case imho.
Comment 4 Nicolas Dufresne (ndufresne) 2017-06-30 13:39:18 UTC
Also, wen testing, make sure you select a profile that supports b-frames, baseline don't.
Comment 5 Guillaume Desmottes 2017-07-03 08:57:51 UTC
Created attachment 354825 [details] [review]
omxh264enc: add 'b-frames' property

Add a property to control the number of B-frames produced by the
encoder using the OMX_VIDEO_PARAM_AVCTYPE OMX API.
Comment 6 Guillaume Desmottes 2017-07-03 08:58:19 UTC
Created attachment 354826 [details] [review]
omxh264enc: raise a warning if AVCIntraPeriod is not supported

Some platforms may not implement OMX_IndexConfigVideoAVCIntraPeriod and
use OMX_IndexParamVideoAvc instead to configure the GOP pattern.
So raise a warning instead of an error if this API is not implemented.
Comment 7 Nicolas Dufresne (ndufresne) 2017-07-03 13:31:47 UTC
Review of attachment 354826 [details] [review]:

::: omx/gstomxh264enc.c
@@ -439,2 @@
         "can't get OMX_IndexConfigVideoAVCIntraPeriod %s (0x%08x)",
         gst_omx_error_to_string (err), err);

How is this patch related to this bug ? Other then that, would handling OMX_ErrorNotImplemented be a better approach ?
Comment 8 Guillaume Desmottes 2017-07-03 13:43:32 UTC
(In reply to Nicolas Dufresne (stormer) from comment #7)
> Review of attachment 354826 [details] [review] [review]:
> 
> ::: omx/gstomxh264enc.c
> @@ -439,2 @@
>          "can't get OMX_IndexConfigVideoAVCIntraPeriod %s (0x%08x)",
>          gst_omx_error_to_string (err), err);
> 
> How is this patch related to this bug ?

While fixing this bug we introduced a second way to configure the GOP pattern, so it's less critical if the current one is not supported.

> Other then that, would handling
> OMX_ErrorNotImplemented be a better approach ?

Good point. Doing that.
Comment 9 Guillaume Desmottes 2017-07-03 13:44:31 UTC
Created attachment 354836 [details] [review]
omxh264enc: raise a warning if AVCIntraPeriod is not supported

Some platforms may not implement OMX_IndexConfigVideoAVCIntraPeriod and
use OMX_IndexParamVideoAvc instead to configure the GOP pattern.
So raise a warning instead of an error if this API is not implemented.
Comment 10 Nicolas Dufresne (ndufresne) 2017-07-03 14:09:50 UTC
Review of attachment 354825 [details] [review]:

That looks good, it's unsual to do validation on GST side, but considering component might not do that, it's a good idea for OMX.
Comment 11 Nicolas Dufresne (ndufresne) 2017-07-03 14:13:14 UTC
So I'm just waiting for feedback/update on the other patch and will merge all this together.
Comment 12 Nicolas Dufresne (ndufresne) 2017-07-03 14:38:13 UTC
Attachment 354729 [details] pushed as 1fbb8a3 - omxh264enc: fix typo in 'set_avc_intra_period'
Attachment 354825 [details] pushed as ebeae6d - omxh264enc: add 'b-frames' property
Attachment 354836 [details] pushed as 8e0dc1d - omxh264enc: raise a warning if AVCIntraPeriod is not supported