|
|
NVIDIA DeepStream SDK API Reference
|
9.1 Release
|
Go to the documentation of this file.
18 #ifndef __PREPROCESS_H__
19 #define __PREPROCESS_H__
21 #include <cuda_runtime.h>
23 #include "nvbufsurface.h"
24 #include "nvbufsurftransform.h"
56 const guint *batch_ids,
67 gboolean output_for_gpu);
75 gboolean use_siglip_normalization);
80 float *d_output_tensor,
84 gboolean use_siglip_normalization);
92 gboolean use_siglip_normalization);
97 float *d_output_tensor,
101 gboolean use_siglip_normalization);
107 const void* rgba_surface,
111 const float* crop_boxes,
135 const void* nv12_surface,
139 const float* crop_boxes,
162 #endif // __PREPROCESS_H__
void unmap_nvbufsurface(NvBufSurface *surf, unsigned int buf_idx)
Unmap NvBufSurface after use.
int rgb_surface_to_tensor(NvBufSurface *rgb_surface, float *output_tensor, guint num_images, guint width, guint height, gboolean use_siglip_normalization)
void * get_nvbufsurface_device_ptr(NvBufSurface *surf, unsigned int buf_idx)
Map and get device pointer from NvBufSurface Note: Caller must call unmap_nvbufsurface after use.
Holds information about batched buffers.
int rgba_surface_to_tensor_device(NvBufSurface *rgba_surface, float *d_output_tensor, guint num_images, guint width, guint height, gboolean use_siglip_normalization)
GPU path for RGBA: write tensor on device (no D2H).
int rgba_surface_to_tensor(NvBufSurface *rgba_surface, float *output_tensor, guint num_images, guint width, guint height, gboolean use_siglip_normalization)
Hold the information of single buffer in the batch.
int rgb_surface_to_tensor_device(NvBufSurface *rgb_surface, float *d_output_tensor, guint num_images, guint width, guint height, gboolean use_siglip_normalization)
GPU path: write tensor on device (no D2H).
int preprocess_crops_nv12(const void *nv12_surface, int surface_width, int surface_height, int surface_pitch, const float *crop_boxes, int num_crops, float *output, int target_width, int target_height, cudaStream_t stream)
Preprocess multiple crops from an NV12 surface.
int preprocess_batch_with_nvbufsurftransform(NvBufSurface *input_surface, const guint *batch_ids, NvDsObjectMeta **obj_meta_array, guint num_objects, NvBufSurface *prealloc_output_surface, guint target_width, guint target_height, guint gpu_id, guint max_batch_size, NvBufSurfaceParams *prealloc_surf_list, NvBufSurfTransformRect *prealloc_src_rect, NvBufSurfTransformRect *prealloc_dst_rect, gboolean output_for_gpu)
Single-call batch preprocess (SGIE-style): all objects from all frames in one NvBufSurfTransform.
int preprocess_crops_rgba(const void *rgba_surface, int surface_width, int surface_height, int surface_pitch, const float *crop_boxes, int num_crops, float *output, int target_width, int target_height, cudaStream_t stream)
LEGACY: Preprocess multiple crops from an RGBA surface.
int preprocess_with_nvbufsurftransform(NvBufSurface *input_surface, guint batch_id, NvDsObjectMeta **obj_meta_array, guint num_objects, NvBufSurface *prealloc_output_surface, guint target_width, guint target_height, guint gpu_id, guint max_batch_size, NvBufSurfaceParams *prealloc_surf_list, NvBufSurfTransformRect *prealloc_src_rect, NvBufSurfTransformRect *prealloc_dst_rect)
NEW SGIE-style preprocessing using NvBufSurfTransform Uses pre-allocated buffers and output surface (...