Note

This is the documentation for the latest development branch and may refer to features that are not available in released versions. If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

VB Demo#

Overview#

This sample demonstrates the K230 VB (Video Buffer) module, which manages frame buffers and memory blocks for the media pipeline.

Functional Description#

VB Functions#

  • VB initialization and configuration

  • pool creation

  • frame and block allocation and release

  • supplement address queries

  • VB statistics

VB Pool Characteristics#

  • support for multiple pixel formats

  • runtime allocation and release

  • memory-pool reuse for performance

  • reduced copy overhead in media pipelines

  • DMA-friendly buffer handling

Supported Pixel Formats#

Typical VB use covers:

  • RGB formats such as RGB565, RGB888, and ARGB8888

  • YUV formats such as YUV420, YUV422, and YUV444

  • compressed-buffer paths such as JPEG-related flows

Main APIs#

  • kd_mpi_vb_init() / kd_mpi_vb_deinit()

  • kd_mpi_vb_set_config()

  • kd_mpi_vb_create_pool()

  • kd_mpi_vb_get_block() / kd_mpi_vb_release_block()

  • kd_mpi_vb_get_supplement_addr()

Source Location#

src/rtsmart/examples/mpp/sample_vb

Usage#

Build Method#

Enable the VB sample in make menuconfig, then rebuild the firmware.

Run Example#

./sample_vb

Expected Result#

The sample initializes the VB module, creates pools, allocates and releases frames or blocks, and prints statistics that can be used to validate the VB path.

Usage Scenarios#

VB is mainly used for:

  • VI output buffers

  • VDEC output buffers

  • VENC input buffers

  • VO input buffers

  • AI inference input buffers

Tip

VB is a foundational multimedia subsystem module. Before using VI, VDEC, VENC, VO, and related modules, VB must be initialized first. For API details, refer to MPP System Control API.

Comments list
Comments
Log in