FFmpeg  4.0
Data Structures | Macros | Functions | Variables
vf_deinterlace_vaapi.c File Reference
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "vaapi_vpp.h"

Go to the source code of this file.

Data Structures

struct  DeintVAAPIContext
 

Macros

#define MAX_REFERENCES   8
 
#define D(name)   case VAProcDeinterlacing ## name: return #name
 
#define OFFSET(x)   offsetof(DeintVAAPIContext, x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static const char * deint_vaapi_mode_name (int mode)
 
static void deint_vaapi_pipeline_uninit (AVFilterContext *avctx)
 
static int deint_vaapi_build_filter_params (AVFilterContext *avctx)
 
static int deint_vaapi_config_output (AVFilterLink *outlink)
 
static int deint_vaapi_filter_frame (AVFilterLink *inlink, AVFrame *input_frame)
 
static av_cold int deint_vaapi_init (AVFilterContext *avctx)
 

Variables

static const AVOption deint_vaapi_options []
 
static const AVClass deint_vaapi_class
 
static const AVFilterPad deint_vaapi_inputs []
 
static const AVFilterPad deint_vaapi_outputs []
 
AVFilter ff_vf_deinterlace_vaapi
 

Macro Definition Documentation

◆ MAX_REFERENCES

#define MAX_REFERENCES   8

◆ D

#define D (   name)    case VAProcDeinterlacing ## name: return #name

Referenced by deint_vaapi_mode_name().

◆ OFFSET

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

Definition at line 350 of file vf_deinterlace_vaapi.c.

◆ FLAGS

Definition at line 351 of file vf_deinterlace_vaapi.c.

Function Documentation

◆ deint_vaapi_mode_name()

static const char* deint_vaapi_mode_name ( int  mode)
static

Definition at line 53 of file vf_deinterlace_vaapi.c.

Referenced by deint_vaapi_build_filter_params().

◆ deint_vaapi_pipeline_uninit()

static void deint_vaapi_pipeline_uninit ( AVFilterContext avctx)
static

Definition at line 67 of file vf_deinterlace_vaapi.c.

Referenced by deint_vaapi_init().

◆ deint_vaapi_build_filter_params()

static int deint_vaapi_build_filter_params ( AVFilterContext avctx)
static

Definition at line 79 of file vf_deinterlace_vaapi.c.

Referenced by deint_vaapi_init().

◆ deint_vaapi_config_output()

static int deint_vaapi_config_output ( AVFilterLink outlink)
static

Definition at line 158 of file vf_deinterlace_vaapi.c.

◆ deint_vaapi_filter_frame()

static int deint_vaapi_filter_frame ( AVFilterLink inlink,
AVFrame input_frame 
)
static

Definition at line 176 of file vf_deinterlace_vaapi.c.

◆ deint_vaapi_init()

static av_cold int deint_vaapi_init ( AVFilterContext avctx)
static

Definition at line 338 of file vf_deinterlace_vaapi.c.

Variable Documentation

◆ deint_vaapi_options

const AVOption deint_vaapi_options[]
static
Initial value:
= {
{ "mode", "Deinterlacing mode",
OFFSET(mode), AV_OPT_TYPE_INT, { .i64 = VAProcDeinterlacingNone },
VAProcDeinterlacingNone, VAProcDeinterlacingCount - 1, FLAGS, "mode" },
{ "default", "Use the highest-numbered (and therefore possibly most advanced) deinterlacing algorithm",
0, AV_OPT_TYPE_CONST, { .i64 = VAProcDeinterlacingNone }, 0, 0, FLAGS, "mode" },
{ "bob", "Use the bob deinterlacing algorithm",
0, AV_OPT_TYPE_CONST, { .i64 = VAProcDeinterlacingBob }, 0, 0, FLAGS, "mode" },
{ "weave", "Use the weave deinterlacing algorithm",
0, AV_OPT_TYPE_CONST, { .i64 = VAProcDeinterlacingWeave }, 0, 0, FLAGS, "mode" },
{ "motion_adaptive", "Use the motion adaptive deinterlacing algorithm",
0, AV_OPT_TYPE_CONST, { .i64 = VAProcDeinterlacingMotionAdaptive }, 0, 0, FLAGS, "mode" },
{ "motion_compensated", "Use the motion compensated deinterlacing algorithm",
0, AV_OPT_TYPE_CONST, { .i64 = VAProcDeinterlacingMotionCompensated }, 0, 0, FLAGS, "mode" },
{ "rate", "Generate output at frame rate or field rate",
OFFSET(field_rate), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 2, FLAGS, "rate" },
{ "frame", "Output at frame rate (one frame of output for each field-pair)",
0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, FLAGS, "rate" },
{ "field", "Output at field rate (one frame of output for each field)",
0, AV_OPT_TYPE_CONST, { .i64 = 2 }, 0, 0, FLAGS, "rate" },
{ "auto", "Only deinterlace fields, passing frames through unchanged",
OFFSET(auto_enable), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
#define FLAGS
mode
Use these values in ebur128_init (or&#39;ed).
Definition: ebur128.h:83

Definition at line 352 of file vf_deinterlace_vaapi.c.

◆ deint_vaapi_class

const AVClass deint_vaapi_class
static
Initial value:
= {
.class_name = "deinterlace_vaapi",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption deint_vaapi_options[]

Definition at line 380 of file vf_deinterlace_vaapi.c.

◆ deint_vaapi_inputs

const AVFilterPad deint_vaapi_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &deint_vaapi_filter_frame,
.config_props = &ff_vaapi_vpp_config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
Definition: vaapi_vpp.c:70
static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)

Definition at line 387 of file vf_deinterlace_vaapi.c.

◆ deint_vaapi_outputs

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

Definition at line 397 of file vf_deinterlace_vaapi.c.

◆ ff_vf_deinterlace_vaapi

AVFilter ff_vf_deinterlace_vaapi
Initial value:
= {
.name = "deinterlace_vaapi",
.description = NULL_IF_CONFIG_SMALL("Deinterlacing of VAAPI surfaces"),
.priv_size = sizeof(DeintVAAPIContext),
.priv_class = &deint_vaapi_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 int init(AVCodecContext *avctx)
Definition: avrndec.c:35
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 AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static const AVClass deint_vaapi_class
static av_cold int deint_vaapi_init(AVFilterContext *avctx)
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
Definition: vaapi_vpp.c:27
static const AVFilterPad deint_vaapi_inputs[]
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244
static const AVFilterPad deint_vaapi_outputs[]
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:365

Definition at line 406 of file vf_deinterlace_vaapi.c.