GNOME Bugzilla – Bug 784379
omxh264enc: add property to control the number of B-frames
Last modified: 2017-07-03 14:38:41 UTC
.
Created attachment 354729 [details] [review] omxh264enc: fix typo in 'set_avc_intra_period'
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.
Better try it in all case imho.
Also, wen testing, make sure you select a profile that supports b-frames, baseline don't.
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.
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.
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 ?
(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.
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.
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.
So I'm just waiting for feedback/update on the other patch and will merge all this together.
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