FFmpeg
Data Structures | Macros | Functions
qsv_internal.h File Reference
#include <mfx/mfxvideo.h>
#include "libavutil/frame.h"
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  QSVMid
 
struct  QSVFrame
 
struct  QSVSession
 
struct  QSVFramesContext
 

Macros

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

Functions

int ff_qsv_print_iopattern (void *log_ctx, int mfx_iopattern, const char *extra_string)
 
int ff_qsv_map_error (mfxStatus mfx_err, const char **desc)
 Convert a libmfx error code into an ffmpeg error code. More...
 
int ff_qsv_print_error (void *log_ctx, mfxStatus err, const char *error_string)
 
int ff_qsv_print_warning (void *log_ctx, mfxStatus err, const char *warning_string)
 
int ff_qsv_codec_id_to_mfx (enum AVCodecID codec_id)
 
int ff_qsv_profile_to_mfx (enum AVCodecID codec_id, int profile)
 
int ff_qsv_level_to_mfx (enum AVCodecID codec_id, int level)
 
enum AVPixelFormat ff_qsv_map_fourcc (uint32_t fourcc)
 
int ff_qsv_map_pixfmt (enum AVPixelFormat format, uint32_t *fourcc)
 
enum AVPictureType ff_qsv_map_pictype (int mfx_pic_type)
 
enum AVFieldOrder ff_qsv_map_picstruct (int mfx_pic_struct)
 
int ff_qsv_init_internal_session (AVCodecContext *avctx, QSVSession *qs, const char *load_plugins, int gpu_copy)
 
int ff_qsv_close_internal_session (QSVSession *qs)
 
int ff_qsv_init_session_device (AVCodecContext *avctx, mfxSession *psession, AVBufferRef *device_ref, const char *load_plugins, int gpu_copy)
 
int ff_qsv_init_session_frames (AVCodecContext *avctx, mfxSession *session, QSVFramesContext *qsv_frames_ctx, const char *load_plugins, int opaque, int gpu_copy)
 
int ff_qsv_find_surface_idx (QSVFramesContext *ctx, QSVFrame *frame)
 

Macro Definition Documentation

#define QSV_VERSION_MAJOR   1

Definition at line 46 of file qsv_internal.h.

Referenced by ff_qsv_init_internal_session().

#define QSV_VERSION_MINOR   1

Definition at line 47 of file qsv_internal.h.

Referenced by ff_qsv_init_internal_session().

#define ASYNC_DEPTH_DEFAULT   4

Definition at line 49 of file qsv_internal.h.

#define QSV_MAX_ENC_PAYLOAD   2

Definition at line 51 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 53 of file qsv_internal.h.

#define QSV_RUNTIME_VERSION_ATLEAST (   MFX_VERSION,
  MAJOR,
  MINOR 
)
Value:
((MFX_VERSION.Major > (MAJOR)) || \
(MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR)))

Definition at line 57 of file qsv_internal.h.

Referenced by ff_qsv_init_session_device(), init_out_session(), init_video_param(), init_vpp_session(), and qsv_retrieve_enc_params().

Function Documentation

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

Definition at line 152 of file qsv.c.

Referenced by qsv_decode_preinit().

int ff_qsv_map_error ( mfxStatus  mfx_err,
const char **  desc 
)

Convert a libmfx error code into an ffmpeg error code.

Definition at line 209 of file qsv.c.

Referenced by ff_qsv_print_error(), and ff_qsv_print_warning().

int ff_qsv_print_error ( void log_ctx,
mfxStatus  err,
const char *  error_string 
)
int ff_qsv_print_warning ( void log_ctx,
mfxStatus  err,
const char *  warning_string 
)

Definition at line 234 of file qsv.c.

Referenced by encode_frame(), ff_qsv_enc_init(), and qsv_decode().

int ff_qsv_codec_id_to_mfx ( enum AVCodecID  codec_id)

Definition at line 43 of file qsv.c.

Referenced by init_video_param(), init_video_param_jpeg(), and qsv_decode_header().

int ff_qsv_profile_to_mfx ( enum AVCodecID  codec_id,
int  profile 
)

Definition at line 111 of file qsv.c.

int ff_qsv_level_to_mfx ( enum AVCodecID  codec_id,
int  level 
)

Definition at line 127 of file qsv.c.

enum AVPixelFormat ff_qsv_map_fourcc ( uint32_t  fourcc)

Definition at line 244 of file qsv.c.

Referenced by ff_qsv_process_data(), qsv_decode_init(), and qsv_frame_alloc().

int ff_qsv_map_pixfmt ( enum AVPixelFormat  format,
uint32_t *  fourcc 
)

Definition at line 254 of file qsv.c.

Referenced by init_video_param(), and init_video_param_jpeg().

enum AVPictureType ff_qsv_map_pictype ( int  mfx_pic_type)

Definition at line 300 of file qsv.c.

Referenced by qsv_decode().

enum AVFieldOrder ff_qsv_map_picstruct ( int  mfx_pic_struct)

Definition at line 282 of file qsv.c.

Referenced by qsv_decode_init().

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

Definition at line 414 of file qsv.c.

Referenced by qsv_init_session(), and qsvenc_init_session().

int ff_qsv_close_internal_session ( QSVSession qs)

Definition at line 844 of file qsv.c.

Referenced by ff_qsv_decode_close(), and ff_qsv_enc_close().

int ff_qsv_init_session_device ( AVCodecContext avctx,
mfxSession *  psession,
AVBufferRef device_ref,
const char *  load_plugins,
int  gpu_copy 
)

Definition at line 720 of file qsv.c.

Referenced by ff_qsv_init_session_frames(), qsv_init_session(), and qsvenc_init_session().

int ff_qsv_init_session_frames ( AVCodecContext avctx,
mfxSession *  session,
QSVFramesContext qsv_frames_ctx,
const char *  load_plugins,
int  opaque,
int  gpu_copy 
)

Definition at line 797 of file qsv.c.

Referenced by qsv_init_session(), and qsvenc_init_session().

int ff_qsv_find_surface_idx ( QSVFramesContext ctx,
QSVFrame frame 
)

Definition at line 271 of file qsv.c.

Referenced by alloc_frame(), and submit_frame().