FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_yadif_cuda.c File Reference
#include <cuda.h>
#include "libavutil/avassert.h"
#include "libavutil/hwcontext_cuda.h"
#include "internal.h"
#include "yadif.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)   check_cu(ctx, (x), #x)
 

Functions

static int check_cu (AVFilterContext *avctx, CUresult err, const char *func)
 
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 deint_cuda_query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *link)
 

Variables

char vf_yadif_cuda_ptx []
 
static const AVClass yadif_cuda_class
 
static const AVFilterPad deint_cuda_inputs []
 
static const AVFilterPad deint_cuda_outputs []
 
AVFilter ff_vf_yadif_cuda
 

Macro Definition Documentation

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

Definition at line 46 of file vf_yadif_cuda.c.

Referenced by call_kernel().

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

Definition at line 47 of file vf_yadif_cuda.c.

#define BLOCKX   32

Definition at line 48 of file vf_yadif_cuda.c.

Referenced by call_kernel().

#define BLOCKY   16

Definition at line 49 of file vf_yadif_cuda.c.

Referenced by call_kernel().

#define CHECK_CU (   x)    check_cu(ctx, (x), #x)

Definition at line 72 of file vf_yadif_cuda.c.

Referenced by call_kernel(), deint_cuda_uninit(), and filter().

Function Documentation

static int check_cu ( AVFilterContext avctx,
CUresult  err,
const char *  func 
)
static

Definition at line 51 of file vf_yadif_cuda.c.

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 74 of file vf_yadif_cuda.c.

Referenced by filter().

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

Definition at line 144 of file vf_yadif_cuda.c.

static av_cold void deint_cuda_uninit ( AVFilterContext ctx)
static

Definition at line 217 of file vf_yadif_cuda.c.

static int deint_cuda_query_formats ( AVFilterContext ctx)
static

Definition at line 239 of file vf_yadif_cuda.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 256 of file vf_yadif_cuda.c.

static int config_output ( AVFilterLink link)
static

Definition at line 278 of file vf_yadif_cuda.c.

Variable Documentation

char vf_yadif_cuda_ptx[]
const AVClass yadif_cuda_class
static
Initial value:
= {
.class_name = "yadif_cuda",
.item_name = av_default_item_name,
.option = ff_yadif_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
const AVOption ff_yadif_options[]
Definition: yadif_common.c:192

Definition at line 387 of file vf_yadif_cuda.c.

const AVFilterPad deint_cuda_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = ff_yadif_filter_frame,
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame)
Definition: yadif_common.c:90

Definition at line 395 of file vf_yadif_cuda.c.

const AVFilterPad deint_cuda_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = ff_yadif_request_frame,
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
int ff_yadif_request_frame(AVFilterLink *link)
Definition: yadif_common.c:154
static int config_output(AVFilterLink *link)

Definition at line 405 of file vf_yadif_cuda.c.

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,
}
#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 av_cold void deint_cuda_uninit(AVFilterContext *ctx)
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVClass yadif_cuda_class
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static const AVFilterPad deint_cuda_outputs[]
#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:133
#define flags(name, subs,...)
Definition: cbs_av1.c:596
static const AVFilterPad deint_cuda_inputs[]
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
static int deint_cuda_query_formats(AVFilterContext *ctx)

Definition at line 415 of file vf_yadif_cuda.c.