Decoder Integration Layer (DIL)
Introduction
The DIL (Decoder Integration Layer) is the V-Nova library used to integrate LCEVC decoding and rendering to an existing legacy decoder implementation.
The DIL can be used in both:
Application integration - the DIL renders directly onto an on-screen surface, provided by the client, of arbitrary size (generally different from the content resolution). Examples: ExoPlayer (Android).
OS Integration - the DIL decodes onto a buffer or draws onto an off screen texture of the same size of the content final resolution, it doesn’t handle the final render to display, including YUV to RGB conversion, and resizing to the destination surface. Examples: MFT (Windows), OMX (Android).
The following block diagram illustrates the role of the DIL more clearly. In conjunction with a base decoder, typically provided by the OS, it offers a complete solution from buffer to output.
DIL Types and Enumerations
DIL_NALFormat enum
DIL_NALFormat represents the two possible NAL Unit formats, for each of the MPEG base codecs the DIL currently supports: H264 (ISO/IEC 14496-10, aka AVC) and H265 (ISO/IEC 23008-2, aka HEVC) NAL, where Annex B indicates 3 byte 0x000001 or 4 byte 0x00000001 start code prefix as described in Annex B of (H264 or HEVC), LP (Length Prefix) indicates a 4 byte prefix with the length of the NAL unit as MSBF 32 bit unsigned int.
DIL_ReturnCode enum
DIL_ReturnCode represents the possible API return codes. Most of the API calls will return one of these values.
DIL_ColorFormat enum
This enum represents the supported colour formats, currently only 8 bit per sample formats are supported For a detailed description of the formats see: https://gstreamer.freedesktop.org/documentation/additional/design/mediatype-video-raw.html
DIL_ImageType enum
This enum identifies the type of planes the DIL_Image consists of; planes are non-overlapping sets of samples belonging to one or more colour channels with a constant sample stride, so RGB is a single plane, because R G and B pointed at separately would overlap UV from NV12 is a single plane, because U and V pointed at separately would overlap Y U and V from I420 are three planes because they do not overlap
DIL_ImageDesc struct
Holds configurations of a single DIL_Image instance
DIL_ContextSettings struct
This structure holds parameters related to the window surface the DIL would render into, in case of on screen rendering those parameters are normally provided by the windowing system, e.g. EGL, GLFW.
DIL_RenderInformation struct
This structure captures the properties related to the (on screen) window rendering, they do not apply for buffer or texture output (off screen). NOTE: rotation is a per frame property because it may change frame by frame due to for ex. the encoding device rotating while shooting.
DIL_DecodeInformation struct
This structure captures properties related to the decoding process, width and height of the output, whether LCEVC data has been found and whether it has been applied.
DIL_ImagePlaneBufferDesc struct
This struct describes a plane memory buffer
DIL_ImagePlaneTextureDesc struct
This struct describes a plane OpenGL texture
DIL_HardwareBufferUsageOption enum
This enum use used to set the UsageOption when creating HardwareBuffer DIL_Image types. It should be provided in the "hardware_buffer_usage_option" tag when configuring the DIL object
DIL_ImagePlaneHardwareBufferDesc struct
This struct describes a plane HardwareBuffer
DIL Properties API
DIL_QueryProperty
Obtain a specific named property. This function provides a way of looking up a property by name to observe it's current value, this may be of use for a user to query DIL properties
DIL_SetProperty
Set a specific named property. This function provides a way of changing a property by name
DIL_QueryPropertyGroup
Obtain all the available properties for a named group
DIL_ReleaseProperty
Release a previously queried property, this function provides a way of releasing any memory allocated by a call to DIL_QueryProperty. Any data contained in value maybe invalidated after this call
DIL_ReleasePropertyGroup
Release a previously queried property group, this function provides a way of releasing any memory allocated by a call to DIL_QueryPropertyGroup Any data contained in value maybe invalidated after this call
DILProperty struct.
This structure contains all relevant information used to query a property or metadata from the DIL.
DILPropertyGroup struct.
This structure contains a logical grouping of properties, this is a convenience feature to assist with providing a "pretty" command line, or GUI.
All properties are assigned to a group, and properties can only appear in one group.
Last updated
Was this helpful?

