FFmpeg  4.0
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 []
 
AVFilter ff_vf_hwupload_cuda
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 150 of file vf_hwupload_cuda.c.

◆ FLAGS

Definition at line 151 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 83 of file vf_hwupload_cuda.c.

◆ cudaupload_filter_frame()

static int cudaupload_filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 114 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 },
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)

Definition at line 152 of file vf_hwupload_cuda.c.

◆ cudaupload_inputs

const AVFilterPad cudaupload_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = cudaupload_filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int cudaupload_filter_frame(AVFilterLink *link, AVFrame *in)

Definition at line 159 of file vf_hwupload_cuda.c.

◆ cudaupload_outputs

const AVFilterPad cudaupload_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = cudaupload_config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int cudaupload_config_output(AVFilterLink *outlink)

Definition at line 168 of file vf_hwupload_cuda.c.

◆ ff_vf_hwupload_cuda

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,
.query_formats = cudaupload_query_formats,
.priv_size = sizeof(CudaUploadContext),
.priv_class = &cudaupload_class,
.flags_internal = 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:385
static int cudaupload_query_formats(AVFilterContext *ctx)
static const AVFilterPad cudaupload_outputs[]
static av_cold int cudaupload_init(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad cudaupload_inputs[]
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static av_cold void cudaupload_uninit(AVFilterContext *ctx)

Definition at line 177 of file vf_hwupload_cuda.c.