FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
qsv_internal.h File Reference
#include <mfx/mfxvideo.h>
#include "libavutil/frame.h"

Go to the source code of this file.

Data Structures

struct  QSVFrame
 
struct  QSVSession
 

Macros

#define QSV_VERSION_MAJOR   1
 
#define QSV_VERSION_MINOR   9
 
#define ASYNC_DEPTH_DEFAULT   4
 
#define QSV_MAX_ENC_PAYLOAD   2
 
#define QSV_VERSION_ATLEAST(MAJOR, MINOR)
 

Functions

int ff_qsv_error (int mfx_err)
 Convert a libmfx error code into a ffmpeg error code. More...
 
int ff_qsv_codec_id_to_mfx (enum AVCodecID codec_id)
 
int ff_qsv_init_internal_session (AVCodecContext *avctx, QSVSession *qs, const char *load_plugins)
 Initialize a MSDK session. More...
 
int ff_qsv_close_internal_session (QSVSession *qs)
 

Macro Definition Documentation

#define QSV_VERSION_MAJOR   1

Definition at line 43 of file qsv_internal.h.

Referenced by ff_qsv_init_internal_session().

#define QSV_VERSION_MINOR   9

Definition at line 44 of file qsv_internal.h.

Referenced by ff_qsv_init_internal_session().

#define ASYNC_DEPTH_DEFAULT   4

Definition at line 46 of file qsv_internal.h.

#define QSV_MAX_ENC_PAYLOAD   2

Definition at line 48 of file qsv_internal.h.

Referenced by free_encoder_ctrl_payloads(), and get_free_frame().

#define QSV_VERSION_ATLEAST (   MAJOR,
  MINOR 
)
Value:
(MFX_VERSION_MAJOR > (MAJOR) || \
MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR))

Definition at line 50 of file qsv_internal.h.

Referenced by init_video_param().

Function Documentation

int ff_qsv_error ( int  mfx_err)

Convert a libmfx error code into a ffmpeg error code.

Definition at line 54 of file qsv.c.

Referenced by do_qsv_decode(), encode_frame(), ff_qsv_enc_init(), ff_qsv_init_internal_session(), ff_qsv_set_display_handle(), qsv_decode_init(), and qsv_retrieve_enc_params().

int ff_qsv_codec_id_to_mfx ( enum AVCodecID  codec_id)

Definition at line 33 of file qsv.c.

Referenced by init_video_param(), and qsv_decode_init().

int ff_qsv_init_internal_session ( AVCodecContext avctx,
QSVSession qs,
const char *  load_plugins 
)

Initialize a MSDK session.

Media SDK is based on sessions, so this is the prerequisite initialization for HW acceleration. For Windows the session is complete and ready to use, for Linux a display handle is required. For releases of Media Server Studio >= 2015 R4 the render nodes interface is preferred (/dev/dri/renderD). Using Media Server Studio 2015 R4 or newer is recommended but the older /dev/dri/card interface is also searched for broader compatibility.

Parameters
avctxffmpeg metadata for this codec context
sessionthe MSDK session used

Definition at line 171 of file qsv.c.

Referenced by ff_qsv_enc_init(), and qsv_decode_init().

int ff_qsv_close_internal_session ( QSVSession qs)

Definition at line 252 of file qsv.c.

Referenced by ff_qsv_decode_close(), and ff_qsv_enc_close().