FFmpeg
Data Structures | Macros | Functions | Variables
vf_hwupload_cuda.c File Reference
#include "libavutil/buffer.h"
#include "libavutil/hwcontext.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  CudaUploadContext
 

Macros

#define OFFSET(x)   offsetof(CudaUploadContext, x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static av_cold int cudaupload_init (AVFilterContext *ctx)
 
static av_cold void cudaupload_uninit (AVFilterContext *ctx)
 
static int cudaupload_query_formats (AVFilterContext *ctx)
 
static int cudaupload_config_output (AVFilterLink *outlink)
 
static int cudaupload_filter_frame (AVFilterLink *link, AVFrame *in)
 
 AVFILTER_DEFINE_CLASS (cudaupload)
 

Variables

static const AVOption cudaupload_options []
 
static const AVFilterPad cudaupload_inputs []
 
static const AVFilterPad cudaupload_outputs []
 
const AVFilter ff_vf_hwupload_cuda
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(CudaUploadContext, x)

Definition at line 159 of file vf_hwupload_cuda.c.

◆ FLAGS

Definition at line 160 of file vf_hwupload_cuda.c.

Function Documentation

◆ cudaupload_init()

static av_cold int cudaupload_init ( AVFilterContext ctx)
static

Definition at line 37 of file vf_hwupload_cuda.c.

◆ cudaupload_uninit()

static av_cold void cudaupload_uninit ( AVFilterContext ctx)
static

Definition at line 47 of file vf_hwupload_cuda.c.

◆ cudaupload_query_formats()

static int cudaupload_query_formats ( AVFilterContext ctx)
static

Definition at line 55 of file vf_hwupload_cuda.c.

◆ cudaupload_config_output()

static int cudaupload_config_output ( AVFilterLink outlink)
static

Definition at line 87 of file vf_hwupload_cuda.c.

◆ cudaupload_filter_frame()

static int cudaupload_filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 123 of file vf_hwupload_cuda.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( cudaupload  )

Variable Documentation

◆ cudaupload_options

const AVOption cudaupload_options[]
static
Initial value:
= {
{ "device", "Number of the device to use", OFFSET(device_idx), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
{ NULL },
}

Definition at line 161 of file vf_hwupload_cuda.c.

◆ cudaupload_inputs

const AVFilterPad cudaupload_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = cudaupload_filter_frame,
},
}

Definition at line 168 of file vf_hwupload_cuda.c.

◆ cudaupload_outputs

const AVFilterPad cudaupload_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = cudaupload_config_output,
},
}

Definition at line 176 of file vf_hwupload_cuda.c.

◆ ff_vf_hwupload_cuda

const AVFilter ff_vf_hwupload_cuda
Initial value:
= {
.name = "hwupload_cuda",
.description = NULL_IF_CONFIG_SMALL("Upload a system memory frame to a CUDA device."),
.init = cudaupload_init,
.uninit = cudaupload_uninit,
.priv_size = sizeof(CudaUploadContext),
.priv_class = &cudaupload_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 184 of file vf_hwupload_cuda.c.

cudaupload_outputs
static const AVFilterPad cudaupload_outputs[]
Definition: vf_hwupload_cuda.c:176
FF_FILTER_FLAG_HWFRAME_AWARE
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:351
cudaupload_init
static av_cold int cudaupload_init(AVFilterContext *ctx)
Definition: vf_hwupload_cuda.c:37
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
cudaupload_query_formats
static int cudaupload_query_formats(AVFilterContext *ctx)
Definition: vf_hwupload_cuda.c:55
cudaupload_filter_frame
static int cudaupload_filter_frame(AVFilterLink *link, AVFrame *in)
Definition: vf_hwupload_cuda.c:123
OFFSET
#define OFFSET(x)
Definition: vf_hwupload_cuda.c:159
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
NULL
#define NULL
Definition: coverity.c:32
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
cudaupload_config_output
static int cudaupload_config_output(AVFilterLink *outlink)
Definition: vf_hwupload_cuda.c:87
cudaupload_inputs
static const AVFilterPad cudaupload_inputs[]
Definition: vf_hwupload_cuda.c:168
CudaUploadContext
Definition: vf_hwupload_cuda.c:29
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
FLAGS
#define FLAGS
Definition: vf_hwupload_cuda.c:160
cudaupload_uninit
static av_cold void cudaupload_uninit(AVFilterContext *ctx)
Definition: vf_hwupload_cuda.c:47