21 #ifndef AVCODEC_QSV_INTERNAL_H
22 #define AVCODEC_QSV_INTERNAL_H
27 #define AVCODEC_QSV_LINUX_SESSION_HANDLE
30 #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE
38 #include <va/va_drm.h>
42 #include <mfx/mfxvideo.h>
48 #define QSV_VERSION_MAJOR 1
49 #define QSV_VERSION_MINOR 1
51 #define ASYNC_DEPTH_DEFAULT 4
53 #define QSV_MAX_ENC_PAYLOAD 2
55 #define QSV_VERSION_ATLEAST(MAJOR, MINOR) \
56 (MFX_VERSION_MAJOR > (MAJOR) || \
57 MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR))
59 #define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \
60 ((MFX_VERSION.Major > (MAJOR)) || \
61 (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR)))
87 #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE
107 const char *extra_string);
115 const char *error_string);
118 const char *warning_string);
131 const char *load_plugins,
int gpu_copy);
141 const char *load_plugins,
int opaque,
int gpu_copy);
static const char *const format[]
Libavcodec external API header.
reference-counted frame API
AVCodecID
Identify the syntax and semantics of the bitstream.
API-specific header for AV_HWDEVICE_TYPE_VAAPI.
AVPixelFormat
Pixel format.
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_codec_id_to_mfx(enum AVCodecID codec_id)
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_level_to_mfx(enum AVCodecID codec_id, int level)
int ff_qsv_print_error(void *log_ctx, mfxStatus err, const char *error_string)
int ff_qsv_close_internal_session(QSVSession *qs)
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.
int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, AVBufferRef *device_ref, const char *load_plugins, int gpu_copy)
enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc)
int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame)
int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc)
int ff_qsv_print_warning(void *log_ctx, mfxStatus err, const char *warning_string)
A reference to a data buffer.
main external API structure.
This structure describes decoded (raw) audio or video data.
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
mfxExtDecodedFrameInfo dec_info
AVBufferRef * hw_frames_ctx
AVBufferRef * hw_frames_ref