NVIDIA DeepStream SDK API Reference

9.0 Release
sources/libs/nvll_osd/nvll_obb.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __NVLL_OBB_H__
14 #define __NVLL_OBB_H__
15 
16 #include "nvll_osd_api.h"
17 #include "nvbufsurface.h"
18 #include <cuda_runtime.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
30 typedef struct _NvOBBDumpCtx NvOBBDumpCtx;
31 
46 NvOBBDumpCtx* nvobb_dump_create_context(int gpu_id, cudaStream_t cuda_stream);
47 
56 
67 NvOBBDumpCtx* nvobb_dump_get_singleton(int gpu_id, cudaStream_t cuda_stream);
68 
76 
95 bool nvobb_dump_frame(
96  NvOBBDumpCtx *ctx,
97  NvBufSurface *input_surf,
98  void *rect_params_array,
99  int num_rects,
100  unsigned int frame_num);
101 
126 cudaError_t nvobb_rotate_gpu(
127  const uint8_t *aabb_pixels,
128  int aabb_width,
129  int aabb_height,
130  int aabb_pitch,
131  int obb_width,
132  int obb_height,
133  float obb_cx,
134  float obb_cy,
135  float angle_rad,
136  cudaStream_t stream,
137  uint8_t **d_output);
138 
161 uint8_t *nvobb_rotate_cpu(
162  const uint8_t *aabb_pixels,
163  int aabb_width,
164  int aabb_height,
165  int aabb_pitch,
166  int obb_width,
167  int obb_height,
168  float obb_cx,
169  float obb_cy,
170  float angle_rad);
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
176 #endif /* __NVLL_OBB_H__ */
177 
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: sources/includes/nvbufsurftransform.h:35
NvBufSurface
Holds information about batched buffers.
Definition: sources/includes/nvbufsurface.h:597
nvobb_dump_create_context
NvOBBDumpCtx * nvobb_dump_create_context(int gpu_id, cudaStream_t cuda_stream)
Create OBB dump context.
nvobb_rotate_cpu
uint8_t * nvobb_rotate_cpu(const uint8_t *aabb_pixels, int aabb_width, int aabb_height, int aabb_pitch, int obb_width, int obb_height, float obb_cx, float obb_cy, float angle_rad)
Rotate OBB to rectangular RGBA on CPU (standalone)
nvobb_rotate_gpu
cudaError_t nvobb_rotate_gpu(const uint8_t *aabb_pixels, int aabb_width, int aabb_height, int aabb_pitch, int obb_width, int obb_height, float obb_cx, float obb_cy, float angle_rad, cudaStream_t stream, uint8_t **d_output)
Rotate OBB to rectangular RGBA on GPU (standalone)
nvobb_dump_frame
bool nvobb_dump_frame(NvOBBDumpCtx *ctx, NvBufSurface *input_surf, void *rect_params_array, int num_rects, unsigned int frame_num)
Process frame and dump OBBs.
nvobb_dump_cleanup_singleton
void nvobb_dump_cleanup_singleton(void)
Cleanup singleton OBB dump context.
nvobb_dump_get_singleton
NvOBBDumpCtx * nvobb_dump_get_singleton(int gpu_id, cudaStream_t cuda_stream)
Get or create singleton OBB dump context.
nvobb_dump_destroy_context
void nvobb_dump_destroy_context(NvOBBDumpCtx *ctx)
Destroy OBB dump context.
NvOBBDumpCtx
struct _NvOBBDumpCtx NvOBBDumpCtx
OBB dump context handle.
Definition: sources/includes/nvll_obb.h:30