NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
pva_algos_image_processor.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
3 *
4 * NVIDIA CORPORATION and its licensors retain all intellectual property
5 * and proprietary rights in and to this software, related documentation
6 * and any modifications thereto. Any use, reproduction, disclosure or
7 * distribution of this software and related documentation without an express
8 * license agreement from NVIDIA CORPORATION is strictly prohibited.
9 */
10 
11 #ifndef PVA_ALGOS_IMAGE_PROCESSOR
12 #define PVA_ALGOS_IMAGE_PROCESSOR
13 
14 #include <pva_algos_common.h>
15 
16 struct ImageProcessorContext;
17 
23 typedef enum
24 {
40 
46 typedef struct
47 {
49  uint32_t inputWidth;
51  uint32_t inputHeight;
53  uint32_t inputLinePitch;
55  uint32_t outputWidth;
57  uint32_t outputHeight;
59  uint32_t numRois;
69 
75 typedef struct
76 {
78  void *inputImage;
80  uint16_t *roi;
82  void *outputImage;
84 
90 typedef struct ImageProcessorContext *pvaAlgosImageProcessorContext_t;
91 
108 
122  pvaAlgosImageProcessorConfig_t *imageProcessorParams);
123 
140  pvaAlgosImageProcessorIOBuffer_t *imageProcessorBuffers,
141  cupvaStream_t *instanceStream, int execTimeout);
142 
153 
156 #endif //PVA_ALGOS_IMAGE_PROCESSOR
pvaAlgosImageProcessorConfig_t
Structure that holds configuration parameters for the image processor.
Definition: pva_algos_image_processor.h:46
pvaAlgosImageProcessorIOBuffer_t::outputImage
void * outputImage
Out: Output image pointer.
Definition: pva_algos_image_processor.h:82
cupvaStream_t
void * cupvaStream_t
Dummy definition for non PVA supported platforms.
Definition: PVA.h:29
pvaAlgosImageProcessorConfig_t::outputHeight
uint32_t outputHeight
Output image height - used when enableResize is 1.
Definition: pva_algos_image_processor.h:57
Y8UV8_TO_RGBFP32
@ Y8UV8_TO_RGBFP32
YUV 420 NV 12 8 bit to RGB FP 32 bit.
Definition: pva_algos_image_processor.h:30
pvaAlgosImageProcessorConfig_t::inputHeight
uint32_t inputHeight
Input image height.
Definition: pva_algos_image_processor.h:51
RGBX8_TO_RGBFP32
@ RGBX8_TO_RGBFP32
RGBX 8 bit to RGB FP 32 bit.
Definition: pva_algos_image_processor.h:36
Y8UV8_TO_RGB8
@ Y8UV8_TO_RGB8
YUV 420 NV 12 8 bit to RGB interleaved 8 bit.
Definition: pva_algos_image_processor.h:26
pvaAlgosImageProcessorConfig_t::numRois
uint32_t numRois
Number of ROIs.
Definition: pva_algos_image_processor.h:59
pvaAlgosImageProcessorInit
pvaAlgosError_t pvaAlgosImageProcessorInit(pvaAlgosImageProcessorContext_t *imageProcessorContext, pvaAlgosImageProcessorConfig_t *imageProcessorParams)
Initializes the necessary values for the internal objects in ImageProcessorContext object.
RGBX8_TO_RGB8
@ RGBX8_TO_RGB8
RGBX 8 bit to RGB interleaved 8 bit.
Definition: pva_algos_image_processor.h:32
RGBX8_TO_RGBFP16
@ RGBX8_TO_RGBFP16
RGBX 8 bit to RGB FP 16 bit normalized.
Definition: pva_algos_image_processor.h:34
pvaAlgosImageProcessorProcess
pvaAlgosError_t pvaAlgosImageProcessorProcess(pvaAlgosImageProcessorContext_t *imageProcessorContext, pvaAlgosImageProcessorIOBuffer_t *imageProcessorBuffers, cupvaStream_t *instanceStream, int execTimeout)
Sets the I/O Buffers to the internal objects and runs the Image Processor.
pvaAlgosImageProcessorDeInit
pvaAlgosError_t pvaAlgosImageProcessorDeInit(pvaAlgosImageProcessorContext_t *imageProcessorContext)
Frees the internal objects and the ImageProcessorContext object.
pvaAlgosImageProcessorConfig_t::normalizationScale
uint32_t normalizationScale
Normalization scale factor.
Definition: pva_algos_image_processor.h:67
pvaAlgosImageProcessorIOBuffer_t
Structure that holds I/O Buffers for the image processor.
Definition: pva_algos_image_processor.h:75
pvaAlgosImageProcessorGetContext
pvaAlgosError_t pvaAlgosImageProcessorGetContext(pvaAlgosImageProcessorContext_t *imageProcessorContext)
Initializes ImageProcessorContext object and stores it in the context structure.
pvaAlgosImageProcessorConfig_t::enableResize
bool enableResize
Enable resize operation.
Definition: pva_algos_image_processor.h:63
Y8UV8_TO_RGBFP16
@ Y8UV8_TO_RGBFP16
YUV 420 NV 12 8 bit to RGB FP 16 bit normalized.
Definition: pva_algos_image_processor.h:28
pva_algos_common.h
pvaAlgosImageProcessorConfig_t::inputWidth
uint32_t inputWidth
Input image width.
Definition: pva_algos_image_processor.h:49
pvaAlgosImageProcessorConfig_t::colorFormat
pvaAlgosImageProcessorColorFormat_t colorFormat
Color format conversion.
Definition: pva_algos_image_processor.h:61
pvaAlgosImageProcessorIOBuffer_t::inputImage
void * inputImage
In: Input image pointer.
Definition: pva_algos_image_processor.h:78
pvaAlgosImageProcessorConfig_t::outputWidth
uint32_t outputWidth
Output image width - used when enableResize is 1.
Definition: pva_algos_image_processor.h:55
COLOR_FORMAT_MAX
@ COLOR_FORMAT_MAX
Do not use.
Definition: pva_algos_image_processor.h:38
pvaAlgosImageProcessorContext_t
struct ImageProcessorContext * pvaAlgosImageProcessorContext_t
Structure that stores internal objects needed for image processor.
Definition: pva_algos_image_processor.h:90
pvaAlgosImageProcessorConfig_t::inputLinePitch
uint32_t inputLinePitch
Input image line pitch.
Definition: pva_algos_image_processor.h:53
pvaAlgosImageProcessorConfig_t::enableNormalize
bool enableNormalize
Enable normalization - works only with fp 16 output format.
Definition: pva_algos_image_processor.h:65
pvaAlgosError_t
pvaAlgosError_t
Possible error codes returned by PVA Algos.
Definition: pva_algos_common.h:25
pvaAlgosImageProcessorIOBuffer_t::roi
uint16_t * roi
In: ROI x,y,w,h.
Definition: pva_algos_image_processor.h:80
pvaAlgosImageProcessorColorFormat_t
pvaAlgosImageProcessorColorFormat_t
Enum for input and output color formats.
Definition: pva_algos_image_processor.h:23