21 #ifndef AVCODEC_QSV_INTERNAL_H 22 #define AVCODEC_QSV_INTERNAL_H 25 #define AVCODEC_QSV_LINUX_SESSION_HANDLE 28 #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE 36 #include <va/va_drm.h> 40 #include <mfx/mfxvideo.h> 46 #define QSV_VERSION_MAJOR 1 47 #define QSV_VERSION_MINOR 1 49 #define ASYNC_DEPTH_DEFAULT 4 // internal parallelism 51 #define QSV_MAX_ENC_PAYLOAD 2 // # of mfxEncodeCtrl payloads supported 53 #define QSV_VERSION_ATLEAST(MAJOR, MINOR) \ 54 (MFX_VERSION_MAJOR > (MAJOR) || \ 55 MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR)) 57 #define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \ 58 ((MFX_VERSION.Major > (MAJOR)) || \ 59 (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR))) 85 #ifdef AVCODEC_QSV_LINUX_SESSION_HANDLE 105 const char *extra_string);
113 const char *error_string);
116 const char *warning_string);
129 const char *load_plugins,
int gpu_copy);
139 const char *load_plugins,
int opaque,
int gpu_copy);
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
static const char * format[]
This structure describes decoded (raw) audio or video data.
int ff_qsv_init_session_frames(AVCodecContext *avctx, mfxSession *session, QSVFramesContext *qsv_frames_ctx, const char *load_plugins, int opaque, int gpu_copy)
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)
API-specific header for AV_HWDEVICE_TYPE_VAAPI.
int ff_qsv_close_internal_session(QSVSession *qs)
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_level_to_mfx(enum AVCodecID codec_id, int level)
int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs, const char *load_plugins, int gpu_copy)
enum AVFieldOrder ff_qsv_map_picstruct(int mfx_pic_struct)
enum AVPixelFormat ff_qsv_map_fourcc(uint32_t fourcc)
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_device(AVCodecContext *avctx, mfxSession *psession, AVBufferRef *device_ref, const char *load_plugins, int gpu_copy)
int ff_qsv_print_iopattern(void *log_ctx, int mfx_iopattern, const char *extra_string)
AVPixelFormat
Pixel format.