FFmpeg
Loading...
Searching...
No Matches
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__)
27typedef cudaTextureObject_t CUtexObject;
28typedef unsigned char* CUdeviceptr;
29#else
30#include <ffnvcodec/dynlink_cuda.h>
31#endif
32
33#define SCALE_CUDA_PARAM_DEFAULT 999999.0f
34
35typedef struct {
36 CUtexObject src_tex[4];
37 CUdeviceptr dst[4];
45 float param;
47
48 /* Weights for the generic filter kernel */
49 CUdeviceptr weights;
50 CUdeviceptr offsets;
53
54#endif
__device_builtin__ unsigned long long cudaTextureObject_t
CUtexObject src_tex[4]