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 792040 - omxvideodec: add hack to pass color format from caps to OMX decoder
omxvideodec: add hack to pass color format from caps to OMX decoder
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-12-29 11:58 UTC by Guillaume Desmottes
Modified: 2018-01-30 09:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
omxvideodec: add hack to pass color format from caps to OMX decoder (6.39 KB, patch)
2017-12-29 11:58 UTC, Guillaume Desmottes
none Details | Review
omxvideoenc: factor out get_output_caps() (1.76 KB, patch)
2017-12-29 11:58 UTC, Guillaume Desmottes
none Details | Review
omxvideoenc: expose chroma format and bit depth in output caps (2.86 KB, patch)
2017-12-29 11:58 UTC, Guillaume Desmottes
none Details | Review
omxvideodec: add hack to pass color format from caps to OMX decoder (6.39 KB, patch)
2018-01-30 09:02 UTC, Guillaume Desmottes
committed Details | Review
omxvideoenc: factor out get_output_caps() (1.76 KB, patch)
2018-01-30 09:02 UTC, Guillaume Desmottes
committed Details | Review
omxvideoenc: expose chroma format and bit depth in output caps (2.84 KB, patch)
2018-01-30 09:02 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2017-12-29 11:58:12 UTC
Use the extra info from the caps parser (bug #792039) and pass them to OMX.
Comment 1 Guillaume Desmottes 2017-12-29 11:58:31 UTC
Created attachment 366072 [details] [review]
omxvideodec: add hack to pass color format from caps to OMX decoder

This hack tries to pass as much information as possible from caps to the
decoder before it receives any buffer. These information can be used by
the OMX decoder to, for example, pre-allocate its internal buffers
before starting to decode and so reduce its initial latency.

This mechanism is currently supported by the zynqultrascaleplus decoder.
Comment 2 Guillaume Desmottes 2017-12-29 11:58:37 UTC
Created attachment 366073 [details] [review]
omxvideoenc: factor out get_output_caps()

No semantic change so far.
Comment 3 Guillaume Desmottes 2017-12-29 11:58:42 UTC
Created attachment 366074 [details] [review]
omxvideoenc: expose chroma format and bit depth in output caps

As we added in the parser (bgo#792039) expose the chroma and bit
depth information in output caps.
Comment 4 Nicolas Dufresne (ndufresne) 2018-01-29 15:10:08 UTC
Review of attachment 366072 [details] [review]:

Good.
Comment 5 Nicolas Dufresne (ndufresne) 2018-01-29 15:11:47 UTC
Review of attachment 366074 [details] [review]:

::: omx/gstomxvideoenc.c
@@ +570,3 @@
+      *bit_depth_luma = *bit_depth_chroma = 8;
+      break;
+#if 0

Caugh ... Caugh ...
Comment 6 Nicolas Dufresne (ndufresne) 2018-01-29 15:12:23 UTC
Review of attachment 366073 [details] [review]:

Correct, it does not mention, but it's to support next patch, will merge when the next patch is fixed.
Comment 7 Guillaume Desmottes 2018-01-30 09:01:48 UTC
(In reply to Nicolas Dufresne (stormer) from comment #5)
> Review of attachment 366074 [details] [review] [review]:
> 
> ::: omx/gstomxvideoenc.c
> @@ +570,3 @@
> +      *bit_depth_luma = *bit_depth_chroma = 8;
> +      break;
> +#if 0
> 
> Caugh ... Caugh ...

I removed the #if 0 now that the 10 bits formats have been merged to base.
Comment 8 Guillaume Desmottes 2018-01-30 09:02:02 UTC
Created attachment 367615 [details] [review]
omxvideodec: add hack to pass color format from caps to OMX decoder

This hack tries to pass as much information as possible from caps to the
decoder before it receives any buffer. These information can be used by
the OMX decoder to, for example, pre-allocate its internal buffers
before starting to decode and so reduce its initial latency.

This mechanism is currently supported by the zynqultrascaleplus decoder.
Comment 9 Guillaume Desmottes 2018-01-30 09:02:08 UTC
Created attachment 367616 [details] [review]
omxvideoenc: factor out get_output_caps()

No semantic change so far.
Comment 10 Guillaume Desmottes 2018-01-30 09:02:13 UTC
Created attachment 367617 [details] [review]
omxvideoenc: expose chroma format and bit depth in output caps

As we added in the parser (bgo#792039) expose the chroma and bit
depth information in output caps.
Comment 11 Nicolas Dufresne (ndufresne) 2018-01-30 09:32:33 UTC
Attachment 367615 [details] pushed as 2ca3cf5 - omxvideodec: add hack to pass color format from caps to OMX decoder
Attachment 367616 [details] pushed as 1990580 - omxvideoenc: factor out get_output_caps()
Attachment 367617 [details] pushed as 6c57d06 - omxvideoenc: expose chroma format and bit depth in output caps