FFmpeg
vf_scale_cuda.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20  * DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef AVFILTER_SCALE_CUDA_H
24 #define AVFILTER_SCALE_CUDA_H
25 
26 #if defined(__CUDACC__) || defined(__CUDA__)
27 #include <stdint.h>
28 typedef cudaTextureObject_t CUtexObject;
29 typedef uint8_t* CUdeviceptr;
30 #else
31 #include <ffnvcodec/dynlink_cuda.h>
32 #endif
33 
34 #define SCALE_CUDA_PARAM_DEFAULT 999999.0f
35 
36 typedef struct {
37  CUtexObject src_tex[4];
38  CUdeviceptr dst[4];
39  int dst_width;
41  int dst_pitch;
42  int src_left;
43  int src_top;
44  int src_width;
46  float param;
49 
50 #endif
CUDAScaleKernelParams::src_height
int src_height
Definition: vf_scale_cuda.h:45
CUDAScaleKernelParams::dst_pitch
int dst_pitch
Definition: vf_scale_cuda.h:41
CUDAScaleKernelParams::dst_height
int dst_height
Definition: vf_scale_cuda.h:40
CUDAScaleKernelParams
Definition: vf_scale_cuda.h:36
CUDAScaleKernelParams::dst_width
int dst_width
Definition: vf_scale_cuda.h:39
cudaTextureObject_t
__device_builtin__ unsigned long long cudaTextureObject_t
Definition: cuda_runtime.h:40
CUDAScaleKernelParams::src_left
int src_left
Definition: vf_scale_cuda.h:42
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:87
CUDAScaleKernelParams::src_width
int src_width
Definition: vf_scale_cuda.h:44
CUDAScaleKernelParams::src_top
int src_top
Definition: vf_scale_cuda.h:43
CUDAScaleKernelParams::param
float param
Definition: vf_scale_cuda.h:46
CUDAScaleKernelParams::mpeg_range
int mpeg_range
Definition: vf_scale_cuda.h:47