| v_frmbuf_wr Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Enumerations | Functions
Overview

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

## Functions
XVidC_ColorFormat | WrMemory2Live (XVidC_ColorFormat MemFmt)
| This function maps the memory video formats to the live/stream video formats. More...
int | XVFrmbufWr_Initialize (XV_FrmbufWr_l2 *InstancePtr, u16 DeviceId)
| This function initializes the core instance. More...
void | XVFrmbufWr_InterruptEnable (XV_FrmbufWr_l2 *InstancePtr, u32 IrqMask)
| This function enables interrupts in the core. More...
void | XVFrmbufWr_InterruptDisable (XV_FrmbufWr_l2 *InstancePtr, u32 IrqMask)
| This function disables interrupts in the core. More...
void | XVFrmbufWr_Start (XV_FrmbufWr_l2 *InstancePtr)
| This function starts the core instance. More...
int | XVFrmbufWr_Stop (XV_FrmbufWr_l2 *InstancePtr)
| This function stops the core instance. More...
int | XVFrmbufWr_WaitForIdle (XV_FrmbufWr_l2 *InstancePtr)
| This function Waits for the core to reach idle state. More...
int | XVFrmbufWr_SetMemFormat (XV_FrmbufWr_l2 *InstancePtr, u32 StrideInBytes, XVidC_ColorFormat MemFmt, const XVidC_VideoStream *StrmIn)
| This function configures the frame buffer write memory output. More...
XVidC_VideoStream * | XVFrmbufWr_GetVideoStream (XV_FrmbufWr_l2 *InstancePtr)
| This function reads the pointer to the output stream configuration. More...
int | XVFrmbufWr_SetBufferAddr (XV_FrmbufWr_l2 *InstancePtr, UINTPTR Addr)
| This function sets the buffer address. More...
UINTPTR | XVFrmbufWr_GetBufferAddr (XV_FrmbufWr_l2 *InstancePtr)
| This function reads the buffer address. More...
int | XVFrmbufWr_SetChromaBufferAddr (XV_FrmbufWr_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 | XVFrmbufWr_GetChromaBufferAddr (XV_FrmbufWr_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 | XVFrmbufWr_SetVChromaBufferAddr (XV_FrmbufWr_l2 *InstancePtr, UINTPTR Addr)
| This function sets the buffer address for the V plane for 3 planar formats. More...
UINTPTR | XVFrmbufWr_GetVChromaBufferAddr (XV_FrmbufWr_l2 *InstancePtr)
| This function reads the buffer address for the V plane for 3 planar formats. More...
u32 | XVFrmbufWr_GetFieldID (XV_FrmbufWr_l2 *InstancePtr)
| This function reads the field ID. More...
void | XVFrmbufWr_DbgReportStatus (XV_FrmbufWr_l2 *InstancePtr)
| This function reports the frame buffer write status. More...
int | XVFrmbufWr_SetCallback (XV_FrmbufWr_l2 *InstancePtr, u32 HandlerType, void *CallbackFunc, void *CallbackRef)
| This function installs an asynchronous callback function for the given HandlerType: More...
void | XVFrmbufWr_InterruptHandler (void *InstancePtr)
| This function is the interrupt handler for the frame buffer write core driver. More...

## Enumeration Type Documentation

enum XVFrmbufWr_HandlerType

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

Enumerator
XVFRMBUFWR_HANDLER_DONE | Handler for ap_done.
XVFRMBUFWR_HANDLER_READY | Handler for ap_ready.

## Function Documentation

XVidC_ColorFormat WrMemory2Live | ( | XVidC_ColorFormat | MemFmt | ) |

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

Parameters

  MemFmt | is the video format written to memory

Returns
  Live/Stream Video Format associated with that memory format

Referenced by XVFrmbufWr_SetMemFormat().

void XVFrmbufWr_DbgReportStatus | ( | XV_FrmbufWr_l2 * | InstancePtr | ) |

This function reports the frame buffer write status.

Parameters

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

Returns
  none

Note
  none

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

UINTPTR XVFrmbufWr_GetBufferAddr | ( | XV_FrmbufWr_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_FrmbufWr_l2::FrmbufWr.

UINTPTR XVFrmbufWr_GetChromaBufferAddr | ( | XV_FrmbufWr_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_FrmbufWr_l2::FrmbufWr.

u32 XVFrmbufWr_GetFieldID | ( | XV_FrmbufWr_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_frmbufwr::Config, XV_FrmbufWr_l2::FrmbufWr, and XV_frmbufwr_Config::Interlaced.

UINTPTR XVFrmbufWr_GetVChromaBufferAddr | ( | XV_FrmbufWr_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_FrmbufWr_l2::FrmbufWr.

XVidC_VideoStream* XVFrmbufWr_GetVideoStream | ( | XV_FrmbufWr_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_FrmbufWr_l2::Stream.

int XVFrmbufWr_Initialize | ( | XV_FrmbufWr_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_FrmbufWr_l2::FrmbufWr.

void XVFrmbufWr_InterruptDisable | ( | XV_FrmbufWr_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_FrmbufWr_l2::FrmbufWr.

void XVFrmbufWr_InterruptEnable | ( | XV_FrmbufWr_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_FrmbufWr_l2::FrmbufWr.

void XVFrmbufWr_InterruptHandler | ( | void * | InstancePtr | ) |

This function is the interrupt handler for the frame buffer write 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 XVFrmbufWr_SetCallback() during initialization phase.

Parameters

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

Returns
  None.

Note
  None.

References XV_FrmbufWr_l2::CallbackDoneRef, XV_FrmbufWr_l2::CallbackReadyRef, XV_FrmbufWr_l2::FrameDoneCallback, XV_FrmbufWr_l2::FrameReadyCallback, XV_FrmbufWr_l2::FrmbufWr, and XV_frmbufwr::IsReady.

int XVFrmbufWr_SetBufferAddr | ( | XV_FrmbufWr_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_frmbufwr::Config, XV_FrmbufWr_l2::FrmbufWr, and XV_frmbufwr_Config::PixPerClk.

int XVFrmbufWr_SetCallback | ( | XV_FrmbufWr_l2 * | InstancePtr,
|  | u32 | HandlerType,
|  | void * | CallbackFunc,
|  | void * | CallbackRef
| ) |  |

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

    HandlerType                     Callback Function Type

    (XVFRMBUFWR_HANDLER_DONE)       DoneCallback
    (XVFRMBUFWR_HANDLER_READY)      ReadyCallback

    Parameters

        InstancePtris a pointer to the Frame Buffer Write 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_FrmbufWr_l2::CallbackDoneRef, XV_FrmbufWr_l2::CallbackReadyRef, XV_FrmbufWr_l2::FrameDoneCallback, XV_FrmbufWr_l2::FrameReadyCallback, XVFRMBUFWR_HANDLER_DONE, and XVFRMBUFWR_HANDLER_READY.

int XVFrmbufWr_SetChromaBufferAddr | ( | XV_FrmbufWr_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_frmbufwr::Config, XV_FrmbufWr_l2::FrmbufWr, and XV_frmbufwr_Config::PixPerClk.

int XVFrmbufWr_SetMemFormat | ( | XV_FrmbufWr_l2 * | InstancePtr,
|  | u32 | StrideInBytes,
|  | XVidC_ColorFormat | MemFmt,
|  | const XVidC_VideoStream * | StrmIn
| ) |  |

This function configures the frame buffer write memory output.

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 written to memory
  StrmIn | is the pointer to output stream configuration

Returns
  none

References XV_frmbufwr::Config, XV_FrmbufWr_l2::FrmbufWr, XV_frmbufwr_Config::PixPerClk, XV_FrmbufWr_l2::Stream, WrMemory2Live(), XVFrmbufWr_IsBGR8Enabled, XVFrmbufWr_IsBGRA8Enabled, XVFrmbufWr_IsBGRX8Enabled, XVFrmbufWr_IsRGB16Enabled, XVFrmbufWr_IsRGB8Enabled, XVFrmbufWr_IsRGBA8Enabled, XVFrmbufWr_IsRGBX10Enabled, XVFrmbufWr_IsRGBX12Enabled, XVFrmbufWr_IsRGBX8Enabled, XVFrmbufWr_IsUYVY8Enabled, XVFrmbufWr_IsY10Enabled, XVFrmbufWr_IsY12Enabled, XVFrmbufWr_IsY16Enabled, XVFrmbufWr_IsY8Enabled, XVFrmbufWr_IsY_U_V10Enabled, XVFrmbufWr_IsY_U_V12Enabled, XVFrmbufWr_IsY_U_V8_420Enabled, XVFrmbufWr_IsY_U_V8Enabled, XVFrmbufWr_IsY_UV10_420Enabled, XVFrmbufWr_IsY_UV10Enabled, XVFrmbufWr_IsY_UV12_420Enabled, XVFrmbufWr_IsY_UV12Enabled, XVFrmbufWr_IsY_UV16_420Enabled, XVFrmbufWr_IsY_UV16Enabled, XVFrmbufWr_IsY_UV8_420Enabled, XVFrmbufWr_IsY_UV8Enabled, XVFrmbufWr_IsYUV16Enabled, XVFrmbufWr_IsYUV8Enabled, XVFrmbufWr_IsYUVA8Enabled, XVFrmbufWr_IsYUVX10Enabled, XVFrmbufWr_IsYUVX12Enabled, XVFrmbufWr_IsYUVX8Enabled, and XVFrmbufWr_IsYUYV8Enabled.

int XVFrmbufWr_SetVChromaBufferAddr | ( | XV_FrmbufWr_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_frmbufwr::Config, XV_FrmbufWr_l2::FrmbufWr, and XV_frmbufwr_Config::PixPerClk.

void XVFrmbufWr_Start | ( | XV_FrmbufWr_l2 * | InstancePtr | ) |

This function starts the core instance.

Parameters

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

Returns
  none

References XV_FrmbufWr_l2::FrmbufWr.

int XVFrmbufWr_Stop | ( | XV_FrmbufWr_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 is stop state XST_FAILURE if the core is not in stop state

References XV_FrmbufWr_l2::FrmbufWr.

int XVFrmbufWr_WaitForIdle | ( | XV_FrmbufWr_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_FrmbufWr_l2::FrmbufWr.