21 #include <mfx/mfxvideo.h>
35 return MFX_CODEC_MPEG2;
50 case MFX_ERR_MEMORY_ALLOC:
51 case MFX_ERR_NOT_ENOUGH_BUFFER:
53 case MFX_ERR_INVALID_HANDLE:
55 case MFX_ERR_DEVICE_FAILED:
56 case MFX_ERR_DEVICE_LOST:
57 case MFX_ERR_LOCK_MEMORY:
59 case MFX_ERR_NULL_PTR:
60 case MFX_ERR_UNDEFINED_BEHAVIOR:
61 case MFX_ERR_NOT_INITIALIZED:
63 case MFX_ERR_UNSUPPORTED:
64 case MFX_ERR_NOT_FOUND:
66 case MFX_ERR_MORE_DATA:
67 case MFX_ERR_MORE_SURFACE:
68 case MFX_ERR_MORE_BITSTREAM:
70 case MFX_ERR_INCOMPATIBLE_VIDEO_PARAM:
71 case MFX_ERR_INVALID_VIDEO_PARAM:
82 mfxIMPL impl = MFX_IMPL_AUTO_ANY;
88 ret = MFXInit(impl, &ver, session);
94 MFXQueryIMPL(*session, &impl);
96 switch (MFX_IMPL_BASETYPE(impl)) {
97 case MFX_IMPL_SOFTWARE:
100 case MFX_IMPL_HARDWARE:
101 case MFX_IMPL_HARDWARE2:
102 case MFX_IMPL_HARDWARE3:
103 case MFX_IMPL_HARDWARE4:
104 desc =
"hardware accelerated";
111 "Initialized an internal MFX session using %s implementation\n",
#define AV_LOG_VERBOSE
Detailed information.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Libavcodec external API header.
#define QSV_VERSION_MINOR
int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
preferred ID for MPEG-1/2 video decoding
main external API structure.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
int ff_qsv_init_internal_session(AVCodecContext *avctx, mfxSession *session)
int ff_qsv_error(int mfx_err)
Convert a libmfx error code into a ffmpeg error code.
#define QSV_VERSION_MAJOR
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.