Libav
Data Structures | Macros | Enumerations | Functions | Variables
vf_deinterlace_qsv.c File Reference

deinterlace video filter - QSV More...

#include <mfx/mfxvideo.h>
#include <stdio.h>
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/time.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  QSVFrame
 
struct  QSVDeintContext
 

Macros

#define OFFSET(x)   offsetof(QSVDeintContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM
 

Enumerations

enum  { QSVDEINT_MORE_OUTPUT = 1, QSVDEINT_MORE_INPUT }
 

Functions

static void qsvdeint_uninit (AVFilterContext *ctx)
 
static int qsvdeint_query_formats (AVFilterContext *ctx)
 
static mfxStatus frame_alloc (mfxHDL pthis, mfxFrameAllocRequest *req, mfxFrameAllocResponse *resp)
 
static mfxStatus frame_free (mfxHDL pthis, mfxFrameAllocResponse *resp)
 
static mfxStatus frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
 
static mfxStatus frame_unlock (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
 
static mfxStatus frame_get_hdl (mfxHDL pthis, mfxMemId mid, mfxHDL *hdl)
 
static int init_out_session (AVFilterContext *ctx)
 
static int qsvdeint_config_props (AVFilterLink *outlink)
 
static void clear_unused_frames (QSVDeintContext *s)
 
static int get_free_frame (QSVDeintContext *s, QSVFrame **f)
 
static int submit_frame (AVFilterContext *ctx, AVFrame *frame, mfxFrameSurface1 **surface)
 
static int process_frame (AVFilterContext *ctx, const AVFrame *in, mfxFrameSurface1 *surf_in)
 
static int qsvdeint_filter_frame (AVFilterLink *link, AVFrame *in)
 
static int qsvdeint_request_frame (AVFilterLink *outlink)
 

Variables

static const mfxHandleType handle_types []
 
static const AVOption options []
 
static const AVClass qsvdeint_class
 
static const AVFilterPad qsvdeint_inputs []
 
static const AVFilterPad qsvdeint_outputs []
 
AVFilter ff_vf_deinterlace_qsv
 

Detailed Description

deinterlace video filter - QSV

Definition in file vf_deinterlace_qsv.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 536 of file vf_deinterlace_qsv.c.

◆ FLAGS

#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 537 of file vf_deinterlace_qsv.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
QSVDEINT_MORE_OUTPUT 
QSVDEINT_MORE_INPUT 

Definition at line 44 of file vf_deinterlace_qsv.c.

Function Documentation

◆ qsvdeint_uninit()

static void qsvdeint_uninit ( AVFilterContext ctx)
static

Definition at line 81 of file vf_deinterlace_qsv.c.

Referenced by qsvdeint_config_props().

◆ qsvdeint_query_formats()

static int qsvdeint_query_formats ( AVFilterContext ctx)
static

Definition at line 107 of file vf_deinterlace_qsv.c.

◆ frame_alloc()

static mfxStatus frame_alloc ( mfxHDL  pthis,
mfxFrameAllocRequest *  req,
mfxFrameAllocResponse *  resp 
)
static

Definition at line 119 of file vf_deinterlace_qsv.c.

Referenced by init_out_session().

◆ frame_free()

static mfxStatus frame_free ( mfxHDL  pthis,
mfxFrameAllocResponse *  resp 
)
static

Definition at line 136 of file vf_deinterlace_qsv.c.

Referenced by init_out_session().

◆ frame_lock()

static mfxStatus frame_lock ( mfxHDL  pthis,
mfxMemId  mid,
mfxFrameData *  ptr 
)
static

Definition at line 141 of file vf_deinterlace_qsv.c.

Referenced by init_out_session().

◆ frame_unlock()

static mfxStatus frame_unlock ( mfxHDL  pthis,
mfxMemId  mid,
mfxFrameData *  ptr 
)
static

Definition at line 146 of file vf_deinterlace_qsv.c.

Referenced by init_out_session().

◆ frame_get_hdl()

static mfxStatus frame_get_hdl ( mfxHDL  pthis,
mfxMemId  mid,
mfxHDL *  hdl 
)
static

Definition at line 151 of file vf_deinterlace_qsv.c.

Referenced by init_out_session().

◆ init_out_session()

static int init_out_session ( AVFilterContext ctx)
static

Definition at line 163 of file vf_deinterlace_qsv.c.

Referenced by qsvdeint_config_props().

◆ qsvdeint_config_props()

static int qsvdeint_config_props ( AVFilterLink outlink)
static

Definition at line 297 of file vf_deinterlace_qsv.c.

◆ clear_unused_frames()

static void clear_unused_frames ( QSVDeintContext s)
static

Definition at line 337 of file vf_deinterlace_qsv.c.

Referenced by get_free_frame().

◆ get_free_frame()

static int get_free_frame ( QSVDeintContext s,
QSVFrame **  f 
)
static

Definition at line 349 of file vf_deinterlace_qsv.c.

Referenced by submit_frame().

◆ submit_frame()

static int submit_frame ( AVFilterContext ctx,
AVFrame frame,
mfxFrameSurface1 **  surface 
)
static

Definition at line 376 of file vf_deinterlace_qsv.c.

Referenced by qsvdeint_filter_frame().

◆ process_frame()

static int process_frame ( AVFilterContext ctx,
const AVFrame in,
mfxFrameSurface1 *  surf_in 
)
static

Definition at line 423 of file vf_deinterlace_qsv.c.

Referenced by qsvdeint_filter_frame().

◆ qsvdeint_filter_frame()

static int qsvdeint_filter_frame ( AVFilterLink link,
AVFrame in 
)
static

Definition at line 501 of file vf_deinterlace_qsv.c.

◆ qsvdeint_request_frame()

static int qsvdeint_request_frame ( AVFilterLink outlink)
static

Definition at line 523 of file vf_deinterlace_qsv.c.

Variable Documentation

◆ handle_types

const mfxHandleType handle_types[]
static
Initial value:
= {
MFX_HANDLE_VA_DISPLAY,
MFX_HANDLE_D3D9_DEVICE_MANAGER,
MFX_HANDLE_D3D11_DEVICE,
}

Definition at line 157 of file vf_deinterlace_qsv.c.

Referenced by ff_qsv_init_session_hwcontext(), and init_out_session().

◆ options

const AVOption options[]
static
Initial value:
= {
{ NULL },
}
NULL
Definition: eval.c:55

Definition at line 538 of file vf_deinterlace_qsv.c.

◆ qsvdeint_class

const AVClass qsvdeint_class
static
Initial value:
= {
.class_name = "deinterlace_qsv",
.item_name = av_default_item_name,
.option = options,
}
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
static const AVOption options[]
av_default_item_name
Definition: dnxhdenc.c:55

Definition at line 542 of file vf_deinterlace_qsv.c.

◆ qsvdeint_inputs

const AVFilterPad qsvdeint_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = qsvdeint_filter_frame,
},
{ NULL }
}
static int qsvdeint_filter_frame(AVFilterLink *link, AVFrame *in)
NULL
Definition: eval.c:55

Definition at line 549 of file vf_deinterlace_qsv.c.

◆ qsvdeint_outputs

const AVFilterPad qsvdeint_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = qsvdeint_config_props,
.request_frame = qsvdeint_request_frame,
},
{ NULL }
}
static int qsvdeint_request_frame(AVFilterLink *outlink)
static int qsvdeint_config_props(AVFilterLink *outlink)
NULL
Definition: eval.c:55

Definition at line 558 of file vf_deinterlace_qsv.c.

◆ ff_vf_deinterlace_qsv

AVFilter ff_vf_deinterlace_qsv
Initial value:
= {
.name = "deinterlace_qsv",
.description = NULL_IF_CONFIG_SMALL("QuickSync video deinterlacing"),
.uninit = qsvdeint_uninit,
.query_formats = qsvdeint_query_formats,
.priv_size = sizeof(QSVDeintContext),
.priv_class = &qsvdeint_class,
}
static const AVClass qsvdeint_class
static const AVFilterPad qsvdeint_inputs[]
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:259
static int qsvdeint_query_formats(AVFilterContext *ctx)
static void qsvdeint_uninit(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
static const AVFilterPad inputs[]
Definition: af_ashowinfo.c:248
static const AVFilterPad qsvdeint_outputs[]

Definition at line 568 of file vf_deinterlace_qsv.c.