21 #ifndef AVCODEC_QSV_INTERNAL_H
22 #define AVCODEC_QSV_INTERNAL_H
24 #include <mfx/mfxvideo.h>
30 #define QSV_VERSION_MAJOR 1
31 #define QSV_VERSION_MINOR 1
33 #define ASYNC_DEPTH_DEFAULT 4 // internal parallelism
35 #define QSV_MAX_ENC_PAYLOAD 2 // # of mfxEncodeCtrl payloads supported
37 #define QSV_VERSION_ATLEAST(MAJOR, MINOR) \
38 (MFX_VERSION_MAJOR > (MAJOR) || \
39 MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR))
41 #define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \
42 (MFX_VERSION.Major > (MAJOR)) || \
43 (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))
86 const char *error_string);
89 const char *warning_string);
98 const char *load_plugins);
101 AVBufferRef *device_ref,
const char *load_plugins);
105 const char *load_plugins,
int opaque);
int ff_qsv_profile_to_mfx(enum AVCodecID codec_id, int profile)
static const char * format[]
This structure describes decoded (raw) audio or video data.
enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
AVBufferRef * hw_frames_ctx
int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc)
mfxExtDecodedFrameInfo dec_info
int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
int ff_qsv_map_error(mfxStatus mfx_err, const char **desc)
Convert a libmfx error code into an ffmpeg error code.
AVCodecID
Identify the syntax and semantics of the bitstream.
int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame)
reference-counted frame API
int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, AVBufferRef *device_ref, const char *load_plugins)
Libavcodec external API header.
main external API structure.
AVBufferRef * hw_frames_ref
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)
A reference to a data buffer.
int ff_qsv_init_session_frames(AVCodecContext *avctx, mfxSession *session, QSVFramesContext *qsv_frames_ctx, const char *load_plugins, int opaque)
int ff_qsv_init_internal_session(AVCodecContext *avctx, mfxSession *session, const char *load_plugins)
AVPixelFormat
Pixel format.