NVIDIA DeepStream SDK API Reference

9.2 Release
sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2017-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  */
21 #ifndef __WARP360_KERNEL_H__
22 #define __WARP360_KERNEL_H__
23 
24 #include <cuda.h>
25 #include <cuda_runtime.h>
26 #include "NVWarp360.h"
27 
28 
29 /****************************************************************************/
34 {
35  float srcX0;
36  float srcY0;
37  float srcFocLenX;
38  float srcFocLenY;
39  float srcDist[5];
40  float srcRot[9];
42  unsigned dstWidth;
43  unsigned dstHeight;
44  float dstX0;
45  float dstY0;
46  float dstInvFocLenX;
47  float dstInvFocLenY;
48  float control;
49 };
50 
51 
52 /****************************************************************************/
64 template<nvwarpSurface_t Tsrc, nvwarpSurface_t Tdst> __host__ cudaError_t Warp(dim3 dim_grid, dim3 dim_block, cudaStream_t stream,
65  const Warp360KernelParams *params, cudaTextureObject_t srcTex, cudaSurfaceObject_t dstSurface);
66 
67 
68 /****************************************************************************/
81 template<nvwarpSurface_t Tsrc, nvwarpSurface_t Tdst> __host__ cudaError_t Warp(dim3 dim_grid, dim3 dim_block, cudaStream_t stream,
82  const Warp360KernelParams *params, cudaTextureObject_t srcTex, void *dstAddr, size_t dstRowBytes);
83 
84 
85 
86 
87 __host__ void NV12RGBABuffer(cudaStream_t stream, const nvwarpYUVRGBParams_t *params, const unsigned char *yuv, size_t yuvRowBytes, uchar4 *dst, size_t dstRowBytes);
88 
89 
90 
91 #endif /* __WARP360_KERNEL_H__ */
Warp360KernelParams::dstY0
float dstY0
Center of destination image Y.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:45
Warp360KernelParams::dstHeight
unsigned dstHeight
Size of output surface in pixels.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:43
Warp360KernelParams::dstX0
float dstX0
Center of destination image X.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:44
Warp360KernelParams
Device Parameters for FishBroom.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:33
Warp360KernelParams::dstInvFocLenY
float dstInvFocLenY
Reciprocal of the destination vertical focal length.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:47
nvwarpYUVRGBParams_t
Parameters for YUV:420:NV12 --> RGBA conversion.
Definition: includes/NVWarp360.h:818
Warp360KernelParams::control
float control
Control parameter.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:48
Warp360KernelParams::dstInvFocLenX
float dstInvFocLenX
Reciprocal of the destination horizontal focal length.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:46
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: includes/nvbufsurftransform.h:40
Warp360KernelParams::srcFocLenX
float srcFocLenX
Source horizontal focal length.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:37
Warp360KernelParams::srcFocLenY
float srcFocLenY
Source vertical focal length.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:38
Warp360KernelParams::dstWidth
unsigned dstWidth
Size of output surface in pixels.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:42
Warp360KernelParams::srcX0
float srcX0
Center of projection X.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:35
Warp360KernelParams::srcY0
float srcY0
Center of projection Y.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:36
NV12RGBABuffer
__host__ void NV12RGBABuffer(cudaStream_t stream, const nvwarpYUVRGBParams_t *params, const unsigned char *yuv, size_t yuvRowBytes, uchar4 *dst, size_t dstRowBytes)
Warp
__host__ cudaError_t Warp(dim3 dim_grid, dim3 dim_block, cudaStream_t stream, const Warp360KernelParams *params, cudaTextureObject_t srcTex, cudaSurfaceObject_t dstSurface)
Warp to a surface.
Warp360KernelParams::srcDist
float srcDist[5]
Radial (and tangential) distortion in source.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:39
Warp360KernelParams::srcRot
float srcRot[9]
Rotation of source.
Definition: sources/libs/nvdewarper/Warp360/src/NVWarp360Kernel.h:40