Main Content

SDL Video Display

Display video on a monitor connected to the NVIDIA target

Since R2020b

Add-On Required: This feature requires the MATLAB Coder Support Package for NVIDIA Jetson and NVIDIA DRIVE Platforms add-on.

  • INVIDIA SDL Video Display block

Libraries:
NVIDIA Jetson and NVIDIA DRIVE / Audio and Video

Description

Display video data using the Simple Directmedia Layer (SDL) multimedia library. A Simulink® model can contain only one SDL Video Display block.

This block takes planar video data in YCbCr 4:2:2 or RGB formats.

Install the Simple DirectMedia Layer (SDL) library on the target. For more information, see Install and Setup Prerequisites for NVIDIA Boards

Examples

Ports

Input

expand all

Input port to specify red component of each pixel.

Dependencies

This port appears only when you select the RGB from Pixel format.

Data Types: uint8

Input port to specify green component of each pixel.

Dependencies

This port appears only when you select the RGB from Pixel format.

Data Types: uint8

Input port to specify blue component of each pixel.

Dependencies

This port appears only when you select the RGB from Pixel format.

Data Types: uint8

Input port to specify the luma component of each pixel.

Dependencies

This port appears only when you select the YCbCr 4:2:2 from Pixel format.

Data Types: uint8

Input port to specify the blue difference component of each pixel.

Dependencies

This port appears only when you select the YCbCr 4:2:2 from Pixel format.

Data Types: uint8

Input port to specify the red difference component of each pixel.

Dependencies

This port appears only when you select the YCbCr 4:2:2 from Pixel format.

Data Types: uint8

Parameters

expand all

Specify the format of the input video stream: YCbCr 4:2:2 or RGB.

YCbCr 4:2:2 uses three channels to represent color image data for each pixel:

  • Y is the luma component (essentially a grayscale signal).

  • Cb is the blue-difference chroma component.

  • Cr is the red-difference chroma component.

Cb and Cr are sampled at half the rate of Y. Therefore, if the dimensions of Y are M*N, the dimensions of Cb and Cr are each (M/2) by N.

RGB uses three 8-bit values to represent the red, green, and blue components of each pixel.

Programmatic Use

Block Parameter: pixelFormat
Type: character vector
Values: 'RGB'|'YCbCr 4:2:2'
Default: 'RGB'

Version History

Introduced in R2020b