[Bug 787093] omx: add dynamic buffer mode from OMX 1.2.0

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Oct 2 13:47:49 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=787093

--- Comment #6 from Guillaume Desmottes <gdesmott at gnome.org> ---
(In reply to Nicolas Dufresne (stormer) from comment #5)
> Review of attachment 358874 [details] [review]:
> 
> ::: omx/gstomxvideoenc.c
> @@ +1155,3 @@
> +  if (input_size >= self->enc_in_port->port_def.nBufferSize &&
> +      (self->enc_in_port->port_def.nBufferAlignment == 0 ||
> +          input_size % self->enc_in_port->port_def.nBufferAlignment == 0)) {
> 
> That is not what alignment means. To check the alignment you need to map the
> memory and check that the pointer value is a multiple of nBufferAlignment.
> For video buffers, you should check that the stride matches the port
> definition and that you have only 1 memory object.

Ok, I suppose we have to do check this for the decoder as well then.

> To be robust, this check need to be done for every incoming buffers, in case
> it changed. The dynamic buffer mode can't handle it, but this way you'll be
> able to at least warn that buffers are dropped. Of course, bonus point if
> you want a proper way to fallback.

We can't really fallback so maybe dynamic mode should only be implemented if
nBufferAlignment == 0?
It's a bit risky to enable it automatically if, by chance, the first buffer is
mapped on an address fitting the alignment and then fail later when another
buffer doesn't.
Do we have a way to know for sure if all incoming buffers will satisfy this
requirement ? GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT doesn't seem to give us
that.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list