| v_frmbuf_rd Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Enumerations | Functions
Overview

## Enumerations
enum | XVFrmbufRd_HandlerType { XVFRMBUFRD_HANDLER_DONE = 1, XVFRMBUFRD_HANDLER_READY }
| These constants specify different types of handler and used to differentiate interrupt requests from peripheral. More...

## Functions
XVidC_ColorFormat | RdMemory2Live (XVidC_ColorFormat MemFmt)
| This function maps the memory video formats to the live/stream video formats. More...
int | XVFrmbufRd_Initialize (XV_FrmbufRd_l2 *InstancePtr, u16 DeviceId)
| This function initializes the core instance. More...
void | XVFrmbufRd_InterruptEnable (XV_FrmbufRd_l2 *InstancePtr, u32 IrqMask)
| This function enables interrupts in the core. More...
void | XVFrmbufRd_InterruptDisable (XV_FrmbufRd_l2 *InstancePtr, u32 IrqMask)
| This function disables interrupts in the core. More...
void | XVFrmbufRd_Start (XV_FrmbufRd_l2 *InstancePtr)
| This function starts the core instance. More...
int | XVFrmbufRd_Stop (XV_FrmbufRd_l2 *InstancePtr)
| This function stops the core instance. More...
int | XVFrmbufRd_WaitForIdle (XV_FrmbufRd_l2 *InstancePtr)
| This function Waits for the core to reach idle state. More...
int | XVFrmbufRd_SetMemFormat (XV_FrmbufRd_l2 *InstancePtr, u32 StrideInBytes, XVidC_ColorFormat MemFmt, const XVidC_VideoStream *StrmOut)
| This function configures the frame buffer read memory input. More...
XVidC_VideoStream * | XVFrmbufRd_GetVideoStream (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the pointer to the output stream configuration. More...
int | XVFrmbufRd_SetBufferAddr (XV_FrmbufRd_l2 *InstancePtr, UINTPTR Addr)
| This function sets the buffer address. More...
UINTPTR | XVFrmbufRd_GetBufferAddr (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the buffer address. More...
int | XVFrmbufRd_SetVChromaBufferAddr (XV_FrmbufRd_l2 *InstancePtr, UINTPTR Addr)
| This function sets the buffer address for the V plane for 3 planar formats. More...
UINTPTR | XVFrmbufRd_GetVChromaBufferAddr (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the buffer address for the V plane for 3 planar formats. More...
int | XVFrmbufRd_SetChromaBufferAddr (XV_FrmbufRd_l2 *InstancePtr, UINTPTR Addr)
| This function sets the buffer address for the UV plane for semi-planar formats or Only U Plane for 3 planar formats. More...
UINTPTR | XVFrmbufRd_GetChromaBufferAddr (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the buffer address for the UV plane for semi-planar formats or Only U plane for 3 planar formats. More...
int | XVFrmbufRd_SetFieldID (XV_FrmbufRd_l2 *InstancePtr, u32 FieldID)
| This function sets the field ID. More...
u32 | XVFrmbufRd_GetFieldID (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the field ID. More...
int | XVFrmbufRd_Set_FidOutMode (XV_FrmbufRd_l2 *InstancePtr, u32 fidmodeval)
| This function sets the Fidout Mode Value. More...
u32 | XVFrmbufRd_Get_FidOutMode (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the Fidout Mode Value. More...
u32 | XVFrmbufRd_Get_FidErrorOut (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the Fid error Register and extract error flag. More...
u32 | XVFrmbufRd_Get_FidErrorCount (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the Fid error Register and extract error count. More...
u32 | XVFrmbufRd_Get_FieldOut (XV_FrmbufRd_l2 *InstancePtr)
| This function reads the field Out. More...
void | XVFrmbufRd_DbgReportStatus (XV_FrmbufRd_l2 *InstancePtr)
| This function reports the frame buffer read status. More...
int | XVFrmbufRd_SetCallback (XV_FrmbufRd_l2 *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
| This function installs an asynchronous callback function for the given HandlerType: More...
void | XVFrmbufRd_InterruptHandler (void *InstancePtr)
| This function is the interrupt handler for the frame buffer read core driver. More...

## Enumeration Type Documentation

enum XVFrmbufRd_HandlerType

These constants specify different types of handler and used to differentiate interrupt requests from peripheral.

Enumerator
XVFRMBUFRD_HANDLER_DONE | Handler for ap_done.
XVFRMBUFRD_HANDLER_READY | Handler for ap_ready.

## Function Documentation

XVidC_ColorFormat RdMemory2Live | ( | XVidC_ColorFormat | MemFmt | ) |

This function maps the memory video formats to the live/stream video formats.

Parameters

  MemFmt | is the video format read from memory

Returns
  Live/Stream Video Format associated with that memory format

Referenced by XVFrmbufRd_SetMemFormat().

void XVFrmbufRd_DbgReportStatus | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reports the frame buffer read status.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  none

Note
  none

References XV_frmbufrd_Config::AXIMMDataWidth, XV_frmbufrd_Config::BaseAddress, XV_frmbufrd_Config::BGR8En, XV_frmbufrd_Config::BGRA8En, XV_frmbufrd_Config::BGRX8En, XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, XV_frmbufrd_Config::Interlaced, XV_frmbufrd_Config::IsTileFormat, XV_frmbufrd_Config::MaxDataWidth, XV_frmbufrd_Config::PixPerClk, XV_frmbufrd_Config::RGB16En, XV_frmbufrd_Config::RGB8En, XV_frmbufrd_Config::RGBA8En, XV_frmbufrd_Config::RGBX10En, XV_frmbufrd_Config::RGBX12En, XV_frmbufrd_Config::RGBX8En, XV_frmbufrd_Config::UYVY8En, XV_frmbufrd_Config::Y10En, XV_frmbufrd_Config::Y12En, XV_frmbufrd_Config::Y16En, XV_frmbufrd_Config::Y8En, XV_frmbufrd_Config::Y_U_V10En, XV_frmbufrd_Config::Y_U_V12En, XV_frmbufrd_Config::Y_U_V8_420En, XV_frmbufrd_Config::Y_U_V8En, XV_frmbufrd_Config::Y_UV10_420En, XV_frmbufrd_Config::Y_UV10En, XV_frmbufrd_Config::Y_UV12_420En, XV_frmbufrd_Config::Y_UV12En, XV_frmbufrd_Config::Y_UV16_420En, XV_frmbufrd_Config::Y_UV16En, XV_frmbufrd_Config::Y_UV8_420En, XV_frmbufrd_Config::Y_UV8En, XV_frmbufrd_Config::YUV16En, XV_frmbufrd_Config::YUV8En, XV_frmbufrd_Config::YUVA8En, XV_frmbufrd_Config::YUVX10En, XV_frmbufrd_Config::YUVX12En, XV_frmbufrd_Config::YUVX8En, and XV_frmbufrd_Config::YUYV8En.

u32 XVFrmbufRd_Get_FidErrorCount | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the Fid error Register and extract error count.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Fid Error count

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::Interlaced.

u32 XVFrmbufRd_Get_FidErrorOut | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the Fid error Register and extract error flag.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Fid Error flag

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::Interlaced.

u32 XVFrmbufRd_Get_FidOutMode | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the Fidout Mode Value.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Fidout Mode Value

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::Interlaced.

u32 XVFrmbufRd_Get_FieldOut | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the field Out.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Field Out

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::Interlaced.

UINTPTR XVFrmbufRd_GetBufferAddr | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the buffer address.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Address of buffer in memory

References XV_FrmbufRd_l2::FrmbufRd.

UINTPTR XVFrmbufRd_GetChromaBufferAddr | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the buffer address for the UV plane for semi-planar formats or Only U plane for 3 planar formats.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Address of buffer in memory

References XV_FrmbufRd_l2::FrmbufRd.

u32 XVFrmbufRd_GetFieldID | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the field ID.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Field ID

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::Interlaced.

UINTPTR XVFrmbufRd_GetVChromaBufferAddr | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the buffer address for the V plane for 3 planar formats.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Address of buffer in memory

References XV_FrmbufRd_l2::FrmbufRd.

XVidC_VideoStream* XVFrmbufRd_GetVideoStream | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function reads the pointer to the output stream configuration.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  Pointer to output stream configuration

References XV_FrmbufRd_l2::Stream.

int XVFrmbufRd_Initialize | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | u16 | DeviceId
| ) |  |

This function initializes the core instance.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon
  DeviceId | is instance id of the core

Returns
  XST_SUCCESS if device is found and initialized XST_DEVICE_NOT_FOUND if device is not found

References XV_FrmbufRd_l2::FrmbufRd.

void XVFrmbufRd_InterruptDisable | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | u32 | IrqMask
| ) |  |

This function disables interrupts in the core.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  none

References XV_FrmbufRd_l2::FrmbufRd.

void XVFrmbufRd_InterruptEnable | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | u32 | IrqMask
| ) |  |

This function enables interrupts in the core.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  none

References XV_FrmbufRd_l2::FrmbufRd.

void XVFrmbufRd_InterruptHandler | ( | void * | InstancePtr | ) |

This function is the interrupt handler for the frame buffer read core driver.

This handler clears the pending interrupt and determined if the source is frame done signal. If yes, starts the next frame processing and calls the registered callback function

The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XVFrmbufRd_SetCallback() during initialization phase.

Parameters

  InstancePtr | is a pointer to the core instance that just interrupted.

Returns
  None.

Note
  None.

References XV_FrmbufRd_l2::CallbackDoneRef, XV_FrmbufRd_l2::CallbackReadyRef, XV_FrmbufRd_l2::FrameDoneCallback, XV_FrmbufRd_l2::FrameReadyCallback, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd::IsReady.

int XVFrmbufRd_Set_FidOutMode | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | u32 | fidmodeval
| ) |  |

This function sets the Fidout Mode Value.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon
  fidmodeval | is a value to be written

Returns
  XST_SUCCESS or XST_FAILURE

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::Interlaced.

int XVFrmbufRd_SetBufferAddr | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | UINTPTR | Addr
| ) |  |

This function sets the buffer address.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon
  Addr | is the absolute address of buffer in memory

Returns
  XST_SUCCESS or XST_FAILURE

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::PixPerClk.

int XVFrmbufRd_SetCallback | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | u32 | HandlerType,
|  | void * | CallbackFunc,
|  | void * | CallbackRef
| ) |  |

This function installs an asynchronous callback function for the given HandlerType:

    HandlerType                     Callback Function Type

    (XVFRMBUFRD_HANDLER_DONE)       DoneCallback
    (XVFRMBUFRD_HANDLER_READY)      ReadyCallback

    Parameters

        InstancePtris a pointer to the Frame Buffer Read core instance.

        CallbackFuncis the address of the callback function.

        CallbackRefis a user data item that will be passed to the
              callback function when it is invoked.

    Returns
    XST_SUCCESS if callback function installed successfully.
    XST_INVALID_PARAM when HandlerType is invalid.

    NoteInvoking this function for a handler that already has been
            installed replaces it with the new handler.

References XV_FrmbufRd_l2::CallbackDoneRef, XV_FrmbufRd_l2::CallbackReadyRef, XV_FrmbufRd_l2::FrameDoneCallback, XV_FrmbufRd_l2::FrameReadyCallback, XVFRMBUFRD_HANDLER_DONE, and XVFRMBUFRD_HANDLER_READY.

int XVFrmbufRd_SetChromaBufferAddr | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | UINTPTR | Addr
| ) |  |

This function sets the buffer address for the UV plane for semi-planar formats or Only U Plane for 3 planar formats.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon
  Addr | is the absolute address of buffer in memory

Returns
  XST_SUCCESS or XST_FAILURE

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::PixPerClk.

int XVFrmbufRd_SetFieldID | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | u32 | FieldID
| ) |  |

This function sets the field ID.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon
  Field | ID

Returns
  XST_SUCCESS or XST_FAILURE

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::Interlaced.

int XVFrmbufRd_SetMemFormat | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | u32 | StrideInBytes,
|  | XVidC_ColorFormat | MemFmt,
|  | const XVidC_VideoStream * | StrmOut
| ) |  |

This function configures the frame buffer read memory input.

Parameters

  InstancePtr | is a pointer to the core instance to be worked on.
  StrideInBytes | is the memory stride in bytes
  MemFormat | is the video format to be read from memory
  StrmOut | is the pointer to output stream configuration

Returns
  none

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, XV_frmbufrd_Config::PixPerClk, RdMemory2Live(), XV_FrmbufRd_l2::Stream, XVFrmbufRd_IsBGR8Enabled, XVFrmbufRd_IsBGRA8Enabled, XVFrmbufRd_IsBGRX8Enabled, XVFrmbufRd_IsRGB16Enabled, XVFrmbufRd_IsRGB8Enabled, XVFrmbufRd_IsRGBA8Enabled, XVFrmbufRd_IsRGBX10Enabled, XVFrmbufRd_IsRGBX12Enabled, XVFrmbufRd_IsRGBX8Enabled, XVFrmbufRd_IsUYVY8Enabled, XVFrmbufRd_IsY10Enabled, XVFrmbufRd_IsY12Enabled, XVFrmbufRd_IsY16Enabled, XVFrmbufRd_IsY8Enabled, XVFrmbufRd_IsY_U_V10Enabled, XVFrmbufRd_IsY_U_V12Enabled, XVFrmbufRd_IsY_U_V8_420Enabled, XVFrmbufRd_IsY_U_V8Enabled, XVFrmbufRd_IsY_UV10_420Enabled, XVFrmbufRd_IsY_UV10Enabled, XVFrmbufRd_IsY_UV12_420Enabled, XVFrmbufRd_IsY_UV12Enabled, XVFrmbufRd_IsY_UV16_420Enabled, XVFrmbufRd_IsY_UV16Enabled, XVFrmbufRd_IsY_UV8_420Enabled, XVFrmbufRd_IsY_UV8Enabled, XVFrmbufRd_IsYUV16Enabled, XVFrmbufRd_IsYUV8Enabled, XVFrmbufRd_IsYUVA8Enabled, XVFrmbufRd_IsYUVX10Enabled, XVFrmbufRd_IsYUVX12Enabled, XVFrmbufRd_IsYUVX8Enabled, and XVFrmbufRd_IsYUYV8Enabled.

int XVFrmbufRd_SetVChromaBufferAddr | ( | XV_FrmbufRd_l2 * | InstancePtr,
|  | UINTPTR | Addr
| ) |  |

This function sets the buffer address for the V plane for 3 planar formats.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon
  Addr | is the absolute address of buffer in memory

Returns
  XST_SUCCESS or XST_FAILURE

References XV_frmbufrd::Config, XV_FrmbufRd_l2::FrmbufRd, and XV_frmbufrd_Config::PixPerClk.

void XVFrmbufRd_Start | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function starts the core instance.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  none

References XV_FrmbufRd_l2::FrmbufRd.

int XVFrmbufRd_Stop | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function stops the core instance.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  XST_SUCCESS if the core in stop state XST_FAILURE if the core is not in stop state

References XV_FrmbufRd_l2::FrmbufRd.

int XVFrmbufRd_WaitForIdle | ( | XV_FrmbufRd_l2 * | InstancePtr | ) |

This function Waits for the core to reach idle state.

Parameters

  InstancePtr | is a pointer to core instance to be worked upon

Returns
  XST_SUCCESS if the core is in idle state XST_FAILURE if the core is not in idle state

References XV_FrmbufRd_l2::FrmbufRd.