UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 68227

Video Common Library - How do I add support for custom resolutions to the Video Timing Table?

Description

How do I add support for custom resolutions to the Video Timing Table?

The default timing table in the video common library covers many of the common timing tables, but how do I add a resolution for my application?

Solution

The Video Common has an API for creating a custom resolution table, and registering it.

Here is an example of how to register a specific resolution. Both 1 and 2 can be placed wherever the constant declarations are made, such as a .h file. However, 3 will need to be done at run time.

1) Assign Mode ID Enumeration. These must be greater than the XVIDC_VM_CUSTOM constant.

/* Assign Mode ID Enumeration. First entry Must be > XVIDC_VM_CUSTOM */
typedef enum {
    XVIDC_VM_3840x2160_30_P_SB = (XVIDC_VM_CUSTOM + 1),
    XVIDC_CM_NUM_SUPPORTED
} XVIDC_CUSTOM_MODES;

2) Create a custom table with entries for each of the custom resolutions that the user wants to support.

/* Create entry for each mode in the custom table */
const XVidC_VideoTimingMode XVidC_MyVideoTimingMode[(XVIDC_CM_NUM_SUPPORTED - (XVIDC_VM_CUSTOM + 1))] =
{
    { XVIDC_VM_3840x2160_30_P_SB, "3840x2160@30Hz (SB)", XVIDC_FR_30HZ,
        {3840, 48, 32, 80, 4000, 1,
         2160, 3, 5, 23, 2191, 0, 0, 0, 0, 1} }
};

3) The user will then need to register this table in their application.  This can be done prior to initializing peripherals.

/* User registers custom timing table */
  xil_printf("INFO> Registering Custom Timing Table with %d entries \r\n", (XVIDC_CM_NUM_SUPPORTED - (XVIDC_VM_CUSTOM + 1)));
  Status = XVidC_RegisterCustomTimingModes(XVidC_MyVideoTimingMode, (XVIDC_CM_NUM_SUPPORTED - (XVIDC_VM_CUSTOM + 1)));
  if (Status != XST_SUCCESS) {
      xil_printf("ERR: Unable to register custom timing table\r\n\r\n");
  }
AR# 68227
Date Created 11/15/2016
Last Updated 11/21/2016
Status Active
Type General Article
IP
  • HDMI
  • DisplayPort
  • Video Processing Subsystem