FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
qsvvpp.c File Reference

Intel Quick Sync Video VPP base function. More...

#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/time.h"
#include "libavutil/pixdesc.h"
#include "internal.h"
#include "qsvvpp.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  QSVFrame
 
struct  QSVVPPContext
 

Macros

#define IS_VIDEO_MEMORY(mode)
 
#define IS_OPAQUE_MEMORY(mode)   (mode & MFX_MEMTYPE_OPAQUE_FRAME)
 
#define IS_SYSTEM_MEMORY(mode)   (mode & MFX_MEMTYPE_SYSTEM_MEMORY)
 

Functions

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 pix_fmt_to_mfx_fourcc (int format)
 
static int map_frame_to_surface (AVFrame *frame, mfxFrameSurface1 *surface)
 
static int fill_frameinfo_by_link (mfxFrameInfo *frameinfo, AVFilterLink *link)
 
static void clear_unused_frames (QSVFrame *list)
 
static void clear_frame_list (QSVFrame **list)
 
static QSVFrameget_free_frame (QSVFrame **list)
 
static QSVFramesubmit_frame (QSVVPPContext *s, AVFilterLink *inlink, AVFrame *picref)
 
static QSVFramequery_frame (QSVVPPContext *s, AVFilterLink *outlink)
 
static int init_vpp_session (AVFilterContext *avctx, QSVVPPContext *s)
 
int ff_qsvvpp_create (AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *param)
 
int ff_qsvvpp_free (QSVVPPContext **vpp)
 
int ff_qsvvpp_filter_frame (QSVVPPContext *s, AVFilterLink *inlink, AVFrame *picref)
 

Variables

static const mfxHandleType handle_types []
 
static const AVRational default_tb = { 1, 90000 }
 

Detailed Description

Intel Quick Sync Video VPP base function.

Definition in file qsvvpp.c.

Macro Definition Documentation

#define IS_VIDEO_MEMORY (   mode)
Value:
(mode & (MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET | \
MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET))
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83

Definition at line 35 of file qsvvpp.c.

Referenced by ff_qsvvpp_create(), and init_vpp_session().

#define IS_OPAQUE_MEMORY (   mode)    (mode & MFX_MEMTYPE_OPAQUE_FRAME)

Definition at line 37 of file qsvvpp.c.

Referenced by ff_qsvvpp_create(), and init_vpp_session().

#define IS_SYSTEM_MEMORY (   mode)    (mode & MFX_MEMTYPE_SYSTEM_MEMORY)

Definition at line 38 of file qsvvpp.c.

Referenced by ff_qsvvpp_create(), query_frame(), and submit_frame().

Function Documentation

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

Definition at line 80 of file qsvvpp.c.

Referenced by init_vpp_session().

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

Definition at line 114 of file qsvvpp.c.

Referenced by init_vpp_session().

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

Definition at line 120 of file qsvvpp.c.

Referenced by init_vpp_session().

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

Definition at line 125 of file qsvvpp.c.

Referenced by init_vpp_session().

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

Definition at line 130 of file qsvvpp.c.

Referenced by init_vpp_session().

static int pix_fmt_to_mfx_fourcc ( int  format)
static

Definition at line 136 of file qsvvpp.c.

Referenced by fill_frameinfo_by_link().

static int map_frame_to_surface ( AVFrame frame,
mfxFrameSurface1 *  surface 
)
static

Definition at line 152 of file qsvvpp.c.

Referenced by query_frame(), and submit_frame().

static int fill_frameinfo_by_link ( mfxFrameInfo *  frameinfo,
AVFilterLink link 
)
static

Definition at line 184 of file qsvvpp.c.

Referenced by ff_qsvvpp_create().

static void clear_unused_frames ( QSVFrame list)
static

Definition at line 231 of file qsvvpp.c.

Referenced by query_frame(), and submit_frame().

static void clear_frame_list ( QSVFrame **  list)
static

Definition at line 242 of file qsvvpp.c.

Referenced by ff_qsvvpp_free().

static QSVFrame* get_free_frame ( QSVFrame **  list)
static

Definition at line 254 of file qsvvpp.c.

Referenced by query_frame(), and submit_frame().

static QSVFrame* submit_frame ( QSVVPPContext s,
AVFilterLink inlink,
AVFrame picref 
)
static

Definition at line 277 of file qsvvpp.c.

Referenced by ff_qsvvpp_filter_frame().

static QSVFrame* query_frame ( QSVVPPContext s,
AVFilterLink outlink 
)
static

Definition at line 350 of file qsvvpp.c.

Referenced by ff_qsvvpp_filter_frame().

static int init_vpp_session ( AVFilterContext avctx,
QSVVPPContext s 
)
static

Definition at line 402 of file qsvvpp.c.

Referenced by ff_qsvvpp_create().

int ff_qsvvpp_create ( AVFilterContext avctx,
QSVVPPContext **  vpp,
QSVVPPParam param 
)

Definition at line 554 of file qsvvpp.c.

Referenced by config_output().

int ff_qsvvpp_free ( QSVVPPContext **  vpp)

Definition at line 657 of file qsvvpp.c.

Referenced by ff_qsvvpp_create(), overlay_qsv_uninit(), and vpp_uninit().

int ff_qsvvpp_filter_frame ( QSVVPPContext s,
AVFilterLink inlink,
AVFrame picref 
)

Definition at line 681 of file qsvvpp.c.

Referenced by filter_frame(), and process_frame().

Variable Documentation

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

Definition at line 71 of file qsvvpp.c.

Referenced by ff_qsv_init_session_device(), and init_vpp_session().

const AVRational default_tb = { 1, 90000 }
static

Definition at line 77 of file qsvvpp.c.