Updated on 2022-03-13 GMT+08:00

API Description

Syntax

int DvppCtl(IDVPPAPI*& pIDVPPAPI, int CMD, dvppapi_ctl_msg* MSG)

Function

Controls the execution of DVPP modules, such as the VPC, JPEGE, JPEGD and PNGD. The DvppCtl API is called by using the instance created by CreateDvppApi.

Input

  • IDVPPAPI pointer reference
  • Command word (CMD)
  • DVPP executor configuration information (dvppapi_ctl_msg type). Different DVPP modules have different configuration information. Therefore, the corresponding configuration information needs to be passed when the functions of each module are invoked.

Output

The output parameters vary according to the functions of the DVPP submodules. For details, see dvppapi_ctl_msg.

Return Value

  • 0: success
  • –1: failure

Instructions

The caller calls the DvppCtl function to pass the IDVPPAPI object pointer, the correct command word (CMD), and the configured dvppapi_ctl_msg.

Restriction

None

Command Words (CMD)

The CMDs are defined in the ddk/include/inc/dvpp/DvppCommon.h file in the DDK installation directory.

Member Variable

Description

Value Range

DVPP_CTL_VPC_PROC

VPC function command word

0

DVPP_CTL_PNGD_PROC

PNGD function command word

1

DVPP_CTL_JPEGE_PROC

JPEGE function command word

2

DVPP_CTL_JPEGD_PROC

JPEGD function command word

3

DVPP_CTL_VENC_PROC

Reserved

5

DVPP_CTL_DVPP_CAPABILITY

Command word for querying the DVPP capability

6

DVPP_CTL_CMDLIST_PROC

Reserved

7

DVPP_CTL_TOOL_CASE_GET_RESIZE_PARAM

Reserved

8

dvppapi_ctl_msg

This type is defined in the ddk/include/inc/dvpp/DvppCommon.h file in the DDK installation directory.

Member Variable

Description

Value Range

int32_t in_size

Input parameter size

-

int32_t out_size

Output parameter size

-

void *in

Input parameter

  • Input parameter of the VPC function: VpcUserImageConfigure
  • Input parameter of the JPEGE function: sJpegeIn
  • Input parameter of the JPEGD function: JpegdIn (camel-case-style JPEGD input structure, which is recommended)
  • Input parameter of the JPEGD function: jpegd_raw_data_info (kernel-style JPEGD input structure, which is not recommended)
  • Input parameter of the PNGD function: PngInputInfoAPI
  • Input parameter for querying the DVPP engine: device_query_req_stru

void *out

Output parameter

  • Output parameter of the VPC function: none
  • Output parameter of the JPEGE function: sJpegeOut
  • Output parameter of the JPEGD function: JpegdOut (camel-case-style JPEGD output structure, which is recommended)
  • Output parameter of the JPEGD function: jpegd_yuv_data_info (kernel-style JPEGD output structure, which is not recommended)
  • Output parameter of the PNGD function: PngOutputInfoAPI
  • Output parameter for querying the DVPP engine: dvpp_engine_capability_stru