VPI_ERROR_INVALID_IMAGE_FORMAT: Input format's color range must be same as output's
NV12 and BGRA8 have different color ranges, but the operation is listed as supported. Am I missing something? How can I convert VPIImage form NV12 to any BGR/RGB format?
Hi,
Thanks for reporting it and we will check this. Another solution is to use NvBuffer APIs and you can call NvBufferTransform() for the conversion. It is also executed on VIC. And can map NvBuffer to VPIImage by calling the functions: VPI - Vision Programming Interface: Main Page
Indeed converting NV12 → NV12_ER and then to BGRA8 works on VIC backend. Looks like a workaround for now. Please let me know if direct conversion should be feasible in the future too or this is just a necessary step.
In a similar way NV12_ER can be converted to BGR8 using CUDA backend.
@DaneLLL I do not understand how NvBufferTransform() can be used for such conversion. I see it can do copying, scaling, fliping etc but not image format conversion. Am I missing something?