NVIDIA DeepStream SDK API Reference

9.1 Release
sources/includes/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: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __NVLL_OBB_H__
19 #define __NVLL_OBB_H__
20 
21 #include "nvll_osd_api.h"
22 #include "nvbufsurface.h"
23 #include <cuda_runtime.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
35 typedef struct _NvOBBDumpCtx NvOBBDumpCtx;
36 
51 NvOBBDumpCtx* nvobb_dump_create_context(int gpu_id, cudaStream_t cuda_stream);
52 
61 
72 NvOBBDumpCtx* nvobb_dump_get_singleton(int gpu_id, cudaStream_t cuda_stream);
73 
81 
100 bool nvobb_dump_frame(
101  NvOBBDumpCtx *ctx,
102  NvBufSurface *input_surf,
103  void *rect_params_array,
104  int num_rects,
105  unsigned int frame_num);
106 
131 cudaError_t nvobb_rotate_gpu(
132  const uint8_t *aabb_pixels,
133  int aabb_width,
134  int aabb_height,
135  int aabb_pitch,
136  int obb_width,
137  int obb_height,
138  float obb_cx,
139  float obb_cy,
140  float angle_rad,
141  cudaStream_t stream,
142  uint8_t **d_output);
143 
166 uint8_t *nvobb_rotate_cpu(
167  const uint8_t *aabb_pixels,
168  int aabb_width,
169  int aabb_height,
170  int aabb_pitch,
171  int obb_width,
172  int obb_height,
173  float obb_cx,
174  float obb_cy,
175  float angle_rad);
176 
177 #ifdef __cplusplus
178 }
179 #endif
180 
181 #endif /* __NVLL_OBB_H__ */
182 
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: sources/includes/nvbufsurftransform.h:35
nvll_osd_api.h
NvBufSurface
Holds information about batched buffers.
Definition: sources/includes/nvbufsurface.h:597
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_create_context
NvOBBDumpCtx * nvobb_dump_create_context(int gpu_id, cudaStream_t cuda_stream)
Create OBB dump context.
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_destroy_context
void nvobb_dump_destroy_context(NvOBBDumpCtx *ctx)
Destroy 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.
nvbufsurface.h
nvobb_dump_cleanup_singleton
void nvobb_dump_cleanup_singleton(void)
Cleanup singleton 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)
NvOBBDumpCtx
struct _NvOBBDumpCtx NvOBBDumpCtx
OBB dump context handle.
Definition: sources/includes/nvll_obb.h:35