SEI Decoder API - 2020.2 English

H.264/H.265 Video Codec Unit v1.2 Solutions LogiCORE IP Product Guide (PG252)

Document ID
PG252
Release Date
2020-11-24
Version
2020.2 English

The SEI message can be retrieved from the decoder. The AL_CB_ParsedSEI callback is invoked each time the decoder parses an SEI. The sei_payload data is provided as described in Annex D.3 of ITU-T. Anti-emulation has been removed by the decoder. The control software application shows an example of API usage which can be triggered using the -sei-file option on the command-line. The VCU-SW supports parsing of SEI meta-data using the omx/gstreamer application too.

When an SEI is parsed, the OMX component should call EventHandle with eEvent based on the SEI type: OMX_ALG_EventSEIPrefixParsed and OMX_ALG_EventSEISuffixParsed. The following is the reference implementation to handle SEI event using Gstreamer application:

static gboolean bus_call (GstBus * bus, GstMessage * msg, gpointer data)
{
    GMainLoop *loop = (GMainLoop *) data;
    switch (GST_MESSAGE_TYPE (msg)) {
    case GST_MESSAGE_APPLICATION: {
            const GstStructure *s;
guint sei_type;
GstBuffer *buf;
gboolean is_prefix;
s = gst_message_get_structure (msg);

if (gst_structure_has_name (s, "omx-alg/sei-parsed")) {
    gst_structure_get (s, "payload-type", G_TYPE_UINT, &sei_type, "payload", GST_TYPE_BUFFER, &buf, "prefix", G_TYPE_BOOLEAN, &is_prefix, NULL);
    gst_util_dump_buffer (buf);
    gst_buffer_unref (buf);
}
break;
}
}
return TRUE;
}

The limitations are:

  • These are non-blocking callbacks.
  • These extraction call-backs are asynchronous to display order; as soon as SEI NAL unit is parsed in the decoder, the callback is triggered from the control software. You must maintain a FIFO, if there is any re-ordering due to B-frames.

Refer to the Xilinx VCU Control Software API for more details.