Mesa (main): gallium/omx: add video codec supported hook for decode paths.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 28 23:04:35 UTC 2022


Module: Mesa
Branch: main
Commit: 2c3178329b5356f4ca26497c5e118d4a427705c2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c3178329b5356f4ca26497c5e118d4a427705c2

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Mar 23 13:11:42 2022 +1000

gallium/omx: add video codec supported hook for decode paths.

These never asked the driver for what was supported.

Acked-by: Christian König <christian.koenig at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15258>

---

 src/gallium/frontends/omx/bellagio/vid_dec.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/frontends/omx/bellagio/vid_dec.c b/src/gallium/frontends/omx/bellagio/vid_dec.c
index 8cca05f675d..08c936cafd3 100644
--- a/src/gallium/frontends/omx/bellagio/vid_dec.c
+++ b/src/gallium/frontends/omx/bellagio/vid_dec.c
@@ -51,6 +51,8 @@
 #include "vl/vl_video_buffer.h"
 #include "util/vl_vlc.h"
 
+#include "vl/vl_codec.h"
+
 #include "entrypoint.h"
 #include "vid_dec.h"
 #include "vid_omx_common.h"
@@ -198,6 +200,10 @@ static OMX_ERRORTYPE vid_dec_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
       return OMX_ErrorInsufficientResources;
 
    screen = priv->screen->pscreen;
+
+   if (!vl_codec_supported(screen, priv->profile, false))
+      return OMX_ErrorInsufficientResources;
+
    priv->pipe = pipe_create_multimedia_context(screen);
    if (!priv->pipe)
       return OMX_ErrorInsufficientResources;



More information about the mesa-commit mailing list