hbVPISP

typedef struct {
  int8_t bufNum;
  int8_t bufCached;
  uint64_t backend;
  int32_t width;
  int32_t height;
} hbVPISPCtxParam;

ISP configuration parameter structure.

  • Member

    Member NameDescription
    bufNumThe ISP bottom layer allocates the number of output buffers, supporting a minimum of 2 and a maximum of 9.
    bufCachedWhether to use cached buffer, 0: do not activate cache, 1: activate cache
    backendSelect the backend that performs ISP tasks
    widthThe width of the input image
    heightThe height of the input image
Note

When using ISP, the width of the input image must meet the limit of [480, 4096], and the height must meet the limit of [240, 2160]. The execution backend specified when submitting the ISP task must be consistent with the backend parameter in the configuration parameters.

int32_t hbVPCreateISPContext(hbVPISPContext *context,
                             hbVPISPCtxParam const *ispCtxParam);

Create an ISP context API. Before creating it, you need to initialize the context to nullptr, each backend supports creating up to 8-way contexts at most. Due to J6B memory limitations, it is recommended to create a maximum of four contexts on J6B, and set the bufnum of each context to a maximum of 3.

  • Parameter
    • [out] context ISP context.
    • [in] ispCtxParam ISP configuration structure.
  • Return Value
    • Returning 0 means the API is executed successfully, otherwise it fails.
int32_t hbVPISP(hbUCPTaskHandle_t *taskHandle, hbVPImage const *srcImg,
                hbVPISPContext context);

The API for calling ISP.

  • Parameter
    • [out] taskHandle The task handle is responsible for the interaction between the operator and the UCP architecture.
    • [in] srcImg Input image for ISP.
    • [in] context ISP context。
  • Return Value
    • Return 0 means the API was successfully executed, otherwise the execution failed.
  • Description of interface limitations
    • When executing ISP, the Image Format of the input image is required to be HB_VP_IMAGE_FORMAT_Y, the Image Type of the input image is required to be HB_VP_IMAGE_TYPE_U12C1.
    • Only asynchronous task creation is supported.
int32_t hbVPGetISPOutputBuffer(hbVPImage *outImg, hbUCPTaskHandle_t taskHandle);

The API for get ISP output buffer.

  • Parameter
    • [out] outImg Output image of ISP. The image format is nv12.
    • [in] taskHandle The task handle is responsible for the interaction between the operator and the UCP architecture.
  • Return Value
    • Return 0 means the API was successfully executed, otherwise the execution failed.
  • Description of interface limitations
    • The image buffer dstImg is allocated internally by ISP.
    • When the task is successfully completed, the data in the output buffer is valid; in the task release phase, the output buffer will be released.
int32_t hbVPReleaseISPContext(hbVPISPContext context);

Release ISP context API.

  • Parameter
    • [in] context ISP context。
  • Return Value
    • Return 0 means the API was successfully executed, otherwise the execution failed.