hbVPCvtColor

int32_t hbVPCvtColor(hbUCPTaskHandle_t *taskHandle, hbVPImage *dstImg, hbVPImage const *srcImg);

The API for calling the CvtColor supports RGB converts to GRAY, RGB and BGR converts to NV12.

  • Parameter

    • [out] taskHandle Task handles are responsible for the interaction of the operator with the UCP architecture.
    • [out] dstImg The output picture size is the same as the input picture, type supports U8C1, format supports Y and nv12.
    • [in] srcImg The input picture type supports U8C3 and format supports RGB and BGR.
  • Return Value

    • Return 0 means the API was successfully executed, otherwise the execution failed.
  • Conversion Support Table

    srcFmt/dstFmtgraynv12rgb_prgbbgr_pbgryuv_pyuv
    grayNNNNNNNN
    nv12NNNNNNNN
    rgb_pNNNNNNNN
    rgbYYNNNNNN
    bgr_pNNNNNNNN
    bgrNYNNNNNN
    yuv_pNNNNNNNN
    yuvNNNNNNNN