FFmpeg
Data Structures | Macros | Functions | Variables
vf_yadif_cuda.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_cuda_internal.h"
#include "libavutil/cuda_check.h"
#include "internal.h"
#include "yadif.h"
#include "cuda/load_helper.h"

Go to the source code of this file.

Data Structures

struct  DeintCUDAContext
 

Macros

#define DIV_UP(a, b)   ( ((a) + (b) - 1) / (b) )
 
#define ALIGN_UP(a, b)   (((a) + (b) - 1) & ~((b) - 1))
 
#define BLOCKX   32
 
#define BLOCKY   16
 
#define CHECK_CU(x)   FF_CUDA_CHECK_DL(ctx, s->hwctx->internal->cuda_dl, x)
 

Functions

static CUresult call_kernel (AVFilterContext *ctx, CUfunction func, CUdeviceptr prev, CUdeviceptr cur, CUdeviceptr next, CUarray_format format, int channels, int src_width, int src_height, int src_pitch, CUdeviceptr dst, int dst_width, int dst_height, int dst_pitch, int parity, int tff)
 
static void filter (AVFilterContext *ctx, AVFrame *dst, int parity, int tff)
 
static av_cold void deint_cuda_uninit (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *link)
 

Variables

const unsigned char ff_vf_yadif_cuda_ptx_data []
 
const unsigned int ff_vf_yadif_cuda_ptx_len
 
static const AVClass yadif_cuda_class
 
static const AVFilterPad deint_cuda_inputs []
 
static const AVFilterPad deint_cuda_outputs []
 
const AVFilter ff_vf_yadif_cuda
 

Macro Definition Documentation

◆ DIV_UP

#define DIV_UP (   a,
  b 
)    ( ((a) + (b) - 1) / (b) )

Definition at line 48 of file vf_yadif_cuda.c.

◆ ALIGN_UP

#define ALIGN_UP (   a,
  b 
)    (((a) + (b) - 1) & ~((b) - 1))

Definition at line 49 of file vf_yadif_cuda.c.

◆ BLOCKX

#define BLOCKX   32

Definition at line 50 of file vf_yadif_cuda.c.

◆ BLOCKY

#define BLOCKY   16

Definition at line 51 of file vf_yadif_cuda.c.

◆ CHECK_CU

#define CHECK_CU (   x)    FF_CUDA_CHECK_DL(ctx, s->hwctx->internal->cuda_dl, x)

Definition at line 53 of file vf_yadif_cuda.c.

Function Documentation

◆ call_kernel()

static CUresult call_kernel ( AVFilterContext ctx,
CUfunction  func,
CUdeviceptr  prev,
CUdeviceptr  cur,
CUdeviceptr  next,
CUarray_format  format,
int  channels,
int  src_width,
int  src_height,
int  src_pitch,
CUdeviceptr  dst,
int  dst_width,
int  dst_height,
int  dst_pitch,
int  parity,
int  tff 
)
static

Definition at line 55 of file vf_yadif_cuda.c.

Referenced by filter().

◆ filter()

static void filter ( AVFilterContext ctx,
AVFrame dst,
int  parity,
int  tff 
)
static

Definition at line 123 of file vf_yadif_cuda.c.

Referenced by config_output().

◆ deint_cuda_uninit()

static av_cold void deint_cuda_uninit ( AVFilterContext ctx)
static

Definition at line 190 of file vf_yadif_cuda.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 214 of file vf_yadif_cuda.c.

◆ config_output()

static int config_output ( AVFilterLink link)
static

Definition at line 236 of file vf_yadif_cuda.c.

Variable Documentation

◆ ff_vf_yadif_cuda_ptx_data

const unsigned char ff_vf_yadif_cuda_ptx_data[]

Referenced by config_output().

◆ ff_vf_yadif_cuda_ptx_len

const unsigned int ff_vf_yadif_cuda_ptx_len

Referenced by config_output().

◆ yadif_cuda_class

const AVClass yadif_cuda_class
static
Initial value:
= {
.class_name = "yadif_cuda",
.item_name = av_default_item_name,
.option = ff_yadif_options,
}

Definition at line 339 of file vf_yadif_cuda.c.

◆ deint_cuda_inputs

const AVFilterPad deint_cuda_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = ff_yadif_filter_frame,
.config_props = config_input,
},
}

Definition at line 347 of file vf_yadif_cuda.c.

◆ deint_cuda_outputs

const AVFilterPad deint_cuda_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = ff_yadif_request_frame,
.config_props = config_output,
},
}

Definition at line 356 of file vf_yadif_cuda.c.

◆ ff_vf_yadif_cuda

const AVFilter ff_vf_yadif_cuda
Initial value:
= {
.name = "yadif_cuda",
.description = NULL_IF_CONFIG_SMALL("Deinterlace CUDA frames"),
.priv_size = sizeof(DeintCUDAContext),
.priv_class = &yadif_cuda_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 365 of file vf_yadif_cuda.c.

AV_PIX_FMT_CUDA
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
Definition: pixfmt.h:253
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:364
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_yadif_cuda.c:214
deint_cuda_outputs
static const AVFilterPad deint_cuda_outputs[]
Definition: vf_yadif_cuda.c:356
deint_cuda_inputs
static const AVFilterPad deint_cuda_inputs[]
Definition: vf_yadif_cuda.c:347
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:192
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
yadif_cuda_class
static const AVClass yadif_cuda_class
Definition: vf_yadif_cuda.c:339
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
deint_cuda_uninit
static av_cold void deint_cuda_uninit(AVFilterContext *ctx)
Definition: vf_yadif_cuda.c:190
AV_CLASS_CATEGORY_FILTER
@ AV_CLASS_CATEGORY_FILTER
Definition: log.h:36
ff_yadif_options
const AVOption ff_yadif_options[]
Definition: yadif_common.c:217
config_output
static int config_output(AVFilterLink *link)
Definition: vf_yadif_cuda.c:236
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
DeintCUDAContext
Definition: vf_bwdif_cuda.c:33
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: internal.h:182
ff_yadif_request_frame
int ff_yadif_request_frame(AVFilterLink *link)
Definition: yadif_common.c:178
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:193
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:155
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:285
ff_yadif_filter_frame
int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame)
Definition: yadif_common.c:100