FFmpeg
Data Structures | Macros | Functions | Variables
qsvvpp.c File Reference
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "libavutil/mem.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  QSVAsyncFrame
 

Macros

#define MFXUnload(a)   do { } while(0)
 
#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)
 
#define MFX_IMPL_VIA_MASK(impl)   (0x0f00 & (impl))
 
#define QSV_HAVE_AUDIO   !QSV_ONEVPL
 

Functions

int ff_qsvvpp_print_iopattern (void *log_ctx, int mfx_iopattern, const char *extra_string)
 
static int qsv_map_error (mfxStatus mfx_err, const char **desc)
 
int ff_qsvvpp_print_error (void *log_ctx, mfxStatus err, const char *error_string)
 
int ff_qsvvpp_print_warning (void *log_ctx, mfxStatus err, const char *warning_string)
 
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, const AVFrame *in)
 
static int init_vpp_session (AVFilterContext *avctx, QSVVPPContext *s)
 
static int set_frame_ext_params_null (AVFilterContext *ctx, const AVFrame *in, AVFrame *out, QSVVPPFrameParam *fp)
 
int ff_qsvvpp_init (AVFilterContext *avctx, QSVVPPParam *param)
 
static int qsvvpp_init_vpp_session (AVFilterContext *avctx, QSVVPPContext *s, const QSVFrame *in, QSVFrame *out)
 
int ff_qsvvpp_close (AVFilterContext *avctx)
 
int ff_qsvvpp_filter_frame (QSVVPPContext *s, AVFilterLink *inlink, AVFrame *picref)
 
int ff_qsvvpp_create_mfx_session (void *ctx, void *loader, mfxIMPL implementation, mfxVersion *pver, mfxSession *psession)
 
AVFrameff_qsvvpp_get_video_buffer (AVFilterLink *inlink, int w, int h)
 

Variables

static const AVRational default_tb = { 1, 90000 }
 
struct {
   int   mfx_iopattern
 
   const char *   desc
 
qsv_iopatterns []
 
struct {
   mfxStatus   mfxerr
 
   int   averr
 
   const char *   desc
 
qsv_errors []
 

Detailed Description

Intel Quick Sync Video VPP base function

Definition in file qsvvpp.c.

Macro Definition Documentation

◆ MFXUnload

#define MFXUnload (   a)    do { } while(0)

Definition at line 37 of file qsvvpp.c.

◆ IS_VIDEO_MEMORY

#define IS_VIDEO_MEMORY (   mode)
Value:
(mode & (MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET | \
MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET))

Definition at line 40 of file qsvvpp.c.

◆ IS_OPAQUE_MEMORY

#define IS_OPAQUE_MEMORY (   mode)    (mode & MFX_MEMTYPE_OPAQUE_FRAME)

Definition at line 43 of file qsvvpp.c.

◆ IS_SYSTEM_MEMORY

#define IS_SYSTEM_MEMORY (   mode)    (mode & MFX_MEMTYPE_SYSTEM_MEMORY)

Definition at line 45 of file qsvvpp.c.

◆ MFX_IMPL_VIA_MASK

#define MFX_IMPL_VIA_MASK (   impl)    (0x0f00 & (impl))

Definition at line 46 of file qsvvpp.c.

◆ QSV_HAVE_AUDIO

#define QSV_HAVE_AUDIO   !QSV_ONEVPL

Definition at line 48 of file qsvvpp.c.

Function Documentation

◆ ff_qsvvpp_print_iopattern()

int ff_qsvvpp_print_iopattern ( void *  log_ctx,
int  mfx_iopattern,
const char *  extra_string 
)

Definition at line 73 of file qsvvpp.c.

Referenced by ff_qsvvpp_init().

◆ qsv_map_error()

static int qsv_map_error ( mfxStatus  mfx_err,
const char **  desc 
)
static

Definition at line 140 of file qsvvpp.c.

Referenced by ff_qsvvpp_print_error(), and ff_qsvvpp_print_warning().

◆ ff_qsvvpp_print_error()

int ff_qsvvpp_print_error ( void *  log_ctx,
mfxStatus  err,
const char *  error_string 
)

◆ ff_qsvvpp_print_warning()

int ff_qsvvpp_print_warning ( void *  log_ctx,
mfxStatus  err,
const char *  warning_string 
)

◆ frame_alloc()

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

Definition at line 176 of file qsvvpp.c.

Referenced by init_vpp_session().

◆ frame_free()

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

Definition at line 210 of file qsvvpp.c.

Referenced by init_vpp_session().

◆ frame_lock()

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

Definition at line 216 of file qsvvpp.c.

Referenced by init_vpp_session().

◆ frame_unlock()

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

Definition at line 221 of file qsvvpp.c.

Referenced by init_vpp_session().

◆ frame_get_hdl()

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

Definition at line 226 of file qsvvpp.c.

Referenced by init_vpp_session().

◆ pix_fmt_to_mfx_fourcc()

static int pix_fmt_to_mfx_fourcc ( int  format)
static

Definition at line 238 of file qsvvpp.c.

Referenced by fill_frameinfo_by_link().

◆ map_frame_to_surface()

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

Definition at line 260 of file qsvvpp.c.

Referenced by query_frame(), and submit_frame().

◆ fill_frameinfo_by_link()

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

Definition at line 298 of file qsvvpp.c.

Referenced by ff_qsvvpp_init().

◆ clear_unused_frames()

static void clear_unused_frames ( QSVFrame list)
static

Definition at line 353 of file qsvvpp.c.

Referenced by query_frame(), and submit_frame().

◆ clear_frame_list()

static void clear_frame_list ( QSVFrame **  list)
static

Definition at line 366 of file qsvvpp.c.

Referenced by ff_qsvvpp_close().

◆ get_free_frame()

static QSVFrame* get_free_frame ( QSVFrame **  list)
static

Definition at line 378 of file qsvvpp.c.

Referenced by query_frame(), and submit_frame().

◆ submit_frame()

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

Definition at line 404 of file qsvvpp.c.

Referenced by ff_qsvvpp_filter_frame().

◆ query_frame()

static QSVFrame* query_frame ( QSVVPPContext s,
AVFilterLink outlink,
const AVFrame in 
)
static

Definition at line 478 of file qsvvpp.c.

Referenced by ff_qsvvpp_filter_frame().

◆ init_vpp_session()

static int init_vpp_session ( AVFilterContext avctx,
QSVVPPContext s 
)
static

Definition at line 563 of file qsvvpp.c.

Referenced by ff_qsvvpp_init().

◆ set_frame_ext_params_null()

static int set_frame_ext_params_null ( AVFilterContext ctx,
const AVFrame in,
AVFrame out,
QSVVPPFrameParam fp 
)
static

Definition at line 740 of file qsvvpp.c.

Referenced by ff_qsvvpp_init().

◆ ff_qsvvpp_init()

int ff_qsvvpp_init ( AVFilterContext avctx,
QSVVPPParam param 
)

keep fifo size at least 1. Even when async_depth is 0, fifo is used.

Definition at line 745 of file qsvvpp.c.

Referenced by config_output().

◆ qsvvpp_init_vpp_session()

static int qsvvpp_init_vpp_session ( AVFilterContext avctx,
QSVVPPContext s,
const QSVFrame in,
QSVFrame out 
)
static

Definition at line 883 of file qsvvpp.c.

Referenced by ff_qsvvpp_filter_frame().

◆ ff_qsvvpp_close()

int ff_qsvvpp_close ( AVFilterContext avctx)

Definition at line 937 of file qsvvpp.c.

Referenced by ff_qsvvpp_init(), overlay_qsv_uninit(), qsv_stack_uninit(), and vpp_uninit().

◆ ff_qsvvpp_filter_frame()

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

Definition at line 961 of file qsvvpp.c.

Referenced by activate(), and process_frame().

◆ ff_qsvvpp_create_mfx_session()

int ff_qsvvpp_create_mfx_session ( void *  ctx,
void *  loader,
mfxIMPL  implementation,
mfxVersion *  pver,
mfxSession *  psession 
)

Definition at line 1116 of file qsvvpp.c.

Referenced by init_vpp_session().

◆ ff_qsvvpp_get_video_buffer()

AVFrame* ff_qsvvpp_get_video_buffer ( AVFilterLink inlink,
int  w,
int  h 
)

Definition at line 1147 of file qsvvpp.c.

Variable Documentation

◆ default_tb

const AVRational default_tb = { 1, 90000 }
static

Definition at line 50 of file qsvvpp.c.

Referenced by ff_qsvvpp_filter_frame(), and submit_frame().

◆ mfx_iopattern

int mfx_iopattern

Definition at line 58 of file qsvvpp.c.

Referenced by ff_qsvvpp_print_iopattern().

◆ desc

const char* desc

◆ qsv_iopatterns

const { ... } qsv_iopatterns[]
Initial value:
= {
{MFX_IOPATTERN_IN_VIDEO_MEMORY, "input is video memory surface" },
{MFX_IOPATTERN_IN_SYSTEM_MEMORY, "input is system memory surface" },
{MFX_IOPATTERN_IN_OPAQUE_MEMORY, "input is opaque memory surface" },
{MFX_IOPATTERN_OUT_VIDEO_MEMORY, "output is video memory surface" },
{MFX_IOPATTERN_OUT_SYSTEM_MEMORY, "output is system memory surface" },
{MFX_IOPATTERN_OUT_OPAQUE_MEMORY, "output is opaque memory surface" },
}

Referenced by ff_qsvvpp_print_iopattern().

◆ mfxerr

mfxStatus mfxerr

Definition at line 91 of file qsvvpp.c.

Referenced by qsv_map_error().

◆ averr

int averr

Definition at line 92 of file qsvvpp.c.

◆ qsv_errors

const { ... } qsv_errors[]

Referenced by qsv_map_error().

mode
mode
Definition: ebur128.h:83