FFmpeg
Loading...
Searching...
No Matches
libavfilter
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
typedef
cudaTextureObject_t
CUtexObject;
28
typedef
unsigned
char
* CUdeviceptr;
29
#else
30
#include <ffnvcodec/dynlink_cuda.h>
31
#endif
32
33
#define SCALE_CUDA_PARAM_DEFAULT 999999.0f
34
35
typedef
struct
{
36
float
m
[3][3];
37
}
CUDAScaleColorMatrix
;
38
39
typedef
struct
{
40
CUtexObject
src_tex
[4];
41
CUdeviceptr
dst
[4];
42
int
dst_width
;
43
int
dst_height
;
44
int
dst_pitch
;
45
int
src_left
;
46
int
src_top
;
47
int
src_width
;
48
int
src_height
;
49
float
param
;
50
int
mpeg_range
;
51
int
src_depth
;
52
int
src_storage_max
;
53
54
/* Weights for the generic filter kernel */
55
CUdeviceptr
weights
;
56
CUdeviceptr
offsets
;
57
int
filter_size
;
58
59
int
log2_chroma_w
;
60
int
log2_chroma_h
;
61
CUDAScaleColorMatrix
color_matrix
;
62
int
dst_depth
;
63
int
dst_shift
;
64
}
CUDAScaleKernelParams
;
65
66
#endif
cudaTextureObject_t
__device_builtin__ unsigned long long cudaTextureObject_t
Definition
cuda_runtime.h:40
CUDAScaleColorMatrix
Definition
vf_scale_cuda.h:35
CUDAScaleColorMatrix::m
float m[3][3]
Definition
vf_scale_cuda.h:36
CUDAScaleKernelParams
Definition
vf_scale_cuda.h:39
CUDAScaleKernelParams::color_matrix
CUDAScaleColorMatrix color_matrix
Definition
vf_scale_cuda.h:61
CUDAScaleKernelParams::weights
CUdeviceptr weights
Definition
vf_scale_cuda.h:55
CUDAScaleKernelParams::log2_chroma_w
int log2_chroma_w
Definition
vf_scale_cuda.h:59
CUDAScaleKernelParams::mpeg_range
int mpeg_range
Definition
vf_scale_cuda.h:50
CUDAScaleKernelParams::dst_pitch
int dst_pitch
Definition
vf_scale_cuda.h:44
CUDAScaleKernelParams::dst_shift
int dst_shift
Definition
vf_scale_cuda.h:63
CUDAScaleKernelParams::offsets
CUdeviceptr offsets
Definition
vf_scale_cuda.h:56
CUDAScaleKernelParams::dst_height
int dst_height
Definition
vf_scale_cuda.h:43
CUDAScaleKernelParams::src_height
int src_height
Definition
vf_scale_cuda.h:48
CUDAScaleKernelParams::filter_size
int filter_size
Definition
vf_scale_cuda.h:57
CUDAScaleKernelParams::src_storage_max
int src_storage_max
Definition
vf_scale_cuda.h:52
CUDAScaleKernelParams::src_left
int src_left
Definition
vf_scale_cuda.h:45
CUDAScaleKernelParams::src_tex
CUtexObject src_tex[4]
Definition
vf_scale_cuda.h:40
CUDAScaleKernelParams::dst_width
int dst_width
Definition
vf_scale_cuda.h:42
CUDAScaleKernelParams::src_depth
int src_depth
Definition
vf_scale_cuda.h:51
CUDAScaleKernelParams::src_width
int src_width
Definition
vf_scale_cuda.h:47
CUDAScaleKernelParams::dst
CUdeviceptr dst[4]
Definition
vf_scale_cuda.h:41
CUDAScaleKernelParams::dst_depth
int dst_depth
Definition
vf_scale_cuda.h:62
CUDAScaleKernelParams::src_top
int src_top
Definition
vf_scale_cuda.h:46
CUDAScaleKernelParams::param
float param
Definition
vf_scale_cuda.h:49
CUDAScaleKernelParams::log2_chroma_h
int log2_chroma_h
Definition
vf_scale_cuda.h:60
Generated on Sat Dec 5 2026 19:21:13 for FFmpeg by
1.13.2