Function nvcvImageCalcRequirements
Defined in File Image.h
Function Documentation
-
NVCVStatus nvcvImageCalcRequirements(int32_t width, int32_t height, NVCVImageFormat format, int32_t baseAddrAlignment, int32_t rowAddrAlignment, NVCVImageRequirements *reqs)
Calculates the resource requirements needed to create an image.
- Parameters:
width, height – [in] Image dimensions.
Width and height must be > 0.
format – [in] Image format.
Must not be NVCV_IMAGE_FORMAT_NONE.
baseAddrAlignment – [in] Alignment, in bytes, of the requested memory buffer. If 0, use a default suitable for optimized memory access. The used alignment is at least the given value.
If different from 0, it must be a power-of-two.
rowAddrAlignment – [in] Alignment, in bytes, of each image’s row address. If 0, use a default suitable for optimized memory access. The used alignment is at least the given value. Pass 1 for fully packed rows, i.e., no padding at the end of each row.
If different from 0, it must be a power-of-two.
reqs – [out] Where the image requirements will be written to.
Must not be NULL.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.
NVCV_SUCCESS – Operation executed successfully.