Go to the documentation of this file.
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);
99 const char *load_plugins);
102 AVBufferRef *device_ref,
const char *load_plugins);
106 const char *load_plugins,
int opaque);
enum AVPictureType ff_qsv_map_pictype(int mfx_pic_type)
AVPixelFormat
Pixel format.
AVBufferRef * hw_frames_ctx
This structure describes decoded (raw) audio or video data.
int ff_qsv_map_error(mfxStatus mfx_err, const char **desc)
Convert a libmfx error code into an ffmpeg error code.
int ff_qsv_profile_to_mfx(enum AVCodecID codec_id, int profile)
int ff_qsv_level_to_mfx(enum AVCodecID codec_id, int level)
int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, AVBufferRef *device_ref, const char *load_plugins)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
int ff_qsv_map_pixfmt(enum AVPixelFormat format, uint32_t *fourcc)
int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id)
int ff_qsv_print_warning(void *log_ctx, mfxStatus err, const char *warning_string)
AVCodecID
Identify the syntax and semantics of the bitstream.
AVBufferRef * hw_frames_ref
int ff_qsv_find_surface_idx(QSVFramesContext *ctx, QSVFrame *frame)
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)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
main external API structure.
A reference to a data buffer.
mfxExtDecodedFrameInfo dec_info
int ff_qsv_print_error(void *log_ctx, mfxStatus err, const char *error_string)