NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h
Go to the documentation of this file.
1 /*
5  * SPDX-FileCopyrightText: Copyright (c) 2018-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
6  * SPDX-License-Identifier: Apache-2.0
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef __NVWARP_CUBEMAP__
22 #define __NVWARP_CUBEMAP__
23 
24 #include "NVWarp360.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif // __cplusplus
29 
30 
32 typedef enum nvwarpFaceID_t {
37  NVWARP_TOP = 4,
40 
41 
44 typedef struct nvwarpFaceDescription_t {
45  unsigned x;
46  unsigned y;
50 
51 
65 nvwarpResult nvwarpIntoCubemap(nvwarpHandle han, cudaStream_t stream, cudaTextureObject_t srcTex,
66  const nvwarpFaceDescription_t faceDesc[6], unsigned faceDim, int interpolateEdges, void *dstAddr, size_t dstRowBytes);
67 
68 
69 // Face descriptions for various popular cube map formats.
70 // nvwarpFaceDescription_t HCross[6] = {
71 // { faceDim * 0, faceDim * 1, NVWARP_LEFT, NVWARP_TOP },
72 // { faceDim * 1, faceDim * 1, NVWARP_FRONT, NVWARP_TOP },
73 // { faceDim * 2, faceDim * 1, NVWARP_RIGHT, NVWARP_TOP },
74 // { faceDim * 3, faceDim * 1, NVWARP_BACK, NVWARP_TOP },
75 // { faceDim * 1, faceDim * 0, NVWARP_TOP, NVWARP_BACK },
76 // { faceDim * 1, faceDim * 2, NVWARP_BOTTOM, NVWARP_FRONT },
77 // };
78 // nvwarpFaceDescription_t Continuous2x3[6] = {
79 // { faceDim * 0, faceDim * 0, NVWARP_LEFT, NVWARP_TOP },
80 // { faceDim * 1, faceDim * 0, NVWARP_FRONT, NVWARP_TOP },
81 // { faceDim * 2, faceDim * 0, NVWARP_RIGHT, NVWARP_TOP },
82 // { faceDim * 0, faceDim * 1, NVWARP_TOP, NVWARP_LEFT },
83 // { faceDim * 1, faceDim * 1, NVWARP_BACK, NVWARP_LEFT },
84 // { faceDim * 2, faceDim * 1, NVWARP_BOTTOM, NVWARP_LEFT },
85 // };
86 // nvwarpFaceDescription_t Pano2VR2x3[6] = {
87 // { faceDim * 0, faceDim * 0, NVWARP_LEFT, NVWARP_TOP },
88 // { faceDim * 1, faceDim * 0, NVWARP_FRONT, NVWARP_TOP },
89 // { faceDim * 2, faceDim * 0, NVWARP_RIGHT, NVWARP_TOP },
90 // { faceDim * 0, faceDim * 1, NVWARP_BACK, NVWARP_TOP },
91 // { faceDim * 1, faceDim * 1, NVWARP_TOP, NVWARP_BACK },
92 // { faceDim * 2, faceDim * 1, NVWARP_BOTTOM, NVWARP_FRONT },
93 // };
94 // nvwarpFaceDescription_t F2x3[6] = {
95 // { faceDim * 0, faceDim * 0, NVWARP_FRONT, NVWARP_TOP },
96 // { faceDim * 1, faceDim * 0, NVWARP_BACK, NVWARP_TOP },
97 // { faceDim * 2, faceDim * 0, NVWARP_TOP, NVWARP_BACK },
98 // { faceDim * 0, faceDim * 1, NVWARP_BOTTOM, NVWARP_FRONT },
99 // { faceDim * 1, faceDim * 1, NVWARP_LEFT, NVWARP_TOP },
100 // { faceDim * 2, faceDim * 1, NVWARP_RIGHT, NVWARP_TOP },
101 // };
102 
103 
104 #ifdef __cplusplus
105 }
106 #endif // __cplusplus
107 #endif // __NVWARP_CUBEMAP__
NVWARP_BOTTOM
@ NVWARP_BOTTOM
Toward the top face.
Definition: 9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:38
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: includes/nvbufsurftransform.h:40
nvwarpHandle
struct nvwarpObject * nvwarpHandle
Opaque definition of a pointer to the Warp360 state.
Definition: includes/NVWarp360.h:255
nvwarpFaceDescription_t::up
nvwarpFaceID_t up
The ID of the look-at direction for the face.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:48
nvwarpFaceID_t
nvwarpFaceID_t
This ID is used to identify both the look-at direction and the up direction for each face.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:32
NVWARP_LEFT
@ NVWARP_LEFT
Toward the back face.
Definition: 9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:36
nvwarpFaceDescription_t
struct nvwarpFaceDescription_t nvwarpFaceDescription_t
There is a description for each of the 6 faces.
nvwarpFaceDescription_t::y
unsigned y
The left edge of the face in the buffer.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:46
nvwarpFaceID_t
nvwarpFaceID_t
This ID is used to identify both the look-at direction and the up direction for each face.
Definition: 9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:32
nvwarpResult
nvwarpResult
Error code enumerations for NVWarp360.
Definition: includes/NVWarp360.h:50
NVWARP_RIGHT
@ NVWARP_RIGHT
Toward the front face.
Definition: 9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:34
nvwarpFaceDescription_t::x
unsigned x
Definition: sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:45
nvwarpFaceDescription_t::to
nvwarpFaceID_t to
The top edge of the face in the buffer.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:47
NVWARP_FRONT
@ NVWARP_FRONT
Definition: 9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:33
NVWARP_TOP
@ NVWARP_TOP
Toward the left face.
Definition: 9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:37
nvwarpFaceDescription_t
There is a description for each of the 6 faces.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:44
NVWARP_BACK
@ NVWARP_BACK
Toward the right face.
Definition: 9.2/sources/libs/nvdewarper/Warp360/src/NVWarpCubeMap.h:35
nvwarpIntoCubemap
nvwarpResult nvwarpIntoCubemap(nvwarpHandle han, cudaStream_t stream, cudaTextureObject_t srcTex, const nvwarpFaceDescription_t faceDesc[6], unsigned faceDim, int interpolateEdges, void *dstAddr, size_t dstRowBytes)
Generate a cube map.