hi_mpi_vdec_set_display_mode

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Sets the display mode if hi_mpi_sys_bind is called to bind the data receiver VPSS to the data source VDEC. If the display mode is not set, the playback mode is used by default.

Prototype

hi_s32 hi_mpi_vdec_set_display_mode (hi_vdec_chn chn, hi_video_display_mode display_mode)

Parameters

Parameter

Input/Output

Description

chn

Input

Decoding channel ID.

Atlas 200I/500 A2 inference products: The value range of this parameter is [0, 128). The JPEGD and VDEC functions share the same channels, and the maximum number of channels is 128.

display_mode

Input

Defines the display mode.

Returns

Restrictions

  • Before setting the display mode, ensure that a channel has been created. Otherwise, the error code HI_ERR_VDEC_UNEXIT is returned.
  • Preview mode (HI_VIDEO_DISPLAY_MODE_PREVIEW): In this mode, the back-end module (such as the VPSS) bound to the VDEC receives decoded images in non-blocking mode. That is, when the image buffer of the VPSS is full (or when there are more decoding frame buffers than VPSS buffer queues), the VPSS discards the new images received from the VDEC. This prevents backpressure on the VDEC and enables real-time preview. Note that when there are fewer decoding frame buffers than VPSS buffer queues, the VPSS still exerts backpressure on the VDEC even if the preview mode is enabled.
  • Playback mode (HI_VIDEO_DISPLAY_MODE_PLAYBACK): In this mode, the back-end module (such as the VPSS) bound to the VDEC receives decoded images in blocking mode. That is, when the image buffer of the VPSS is full, the VPSS stops receiving new images from the VDEC. When the VDEC detects an image transmission failure, it retries until the image is successfully transmitted. The back-end module exerts backpressure on the VDEC, ensuring that each decoded image is displayed.