FFmpeg
|
#include <mfx/mfxvideo.h>
#include <mfx/mfxplugin.h>
#include <mfx/mfxjpeg.h>
#include <stdio.h>
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/error.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "qsv_internal.h"
Go to the source code of this file.
Macros | |
#define | MFX_IMPL_VIA_MASK(impl) (0x0f00 & (impl)) |
Functions | |
int | ff_qsv_codec_id_to_mfx (enum AVCodecID codec_id) |
int | ff_qsv_print_iopattern (void *log_ctx, int mfx_iopattern, const char *extra_string) |
static int | qsv_map_error (mfxStatus mfx_err, const char **desc) |
Convert a libmfx error code into an FFmpeg error code. More... | |
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) |
enum AVPixelFormat | ff_qsv_map_fourcc (uint32_t fourcc) |
int | ff_qsv_map_pixfmt (enum AVPixelFormat format, uint32_t *fourcc) |
int | ff_qsv_find_surface_idx (QSVFramesContext *ctx, QSVFrame *frame) |
enum AVFieldOrder | ff_qsv_map_picstruct (int mfx_pic_struct) |
enum AVPictureType | ff_qsv_map_pictype (int mfx_pic_type) |
static int | qsv_load_plugins (mfxSession session, const char *load_plugins, void *logctx) |
int | ff_qsv_init_internal_session (AVCodecContext *avctx, QSVSession *qs, const char *load_plugins, int gpu_copy) |
static void | mids_buf_free (void *opaque, uint8_t *data) |
static AVBufferRef * | qsv_create_mids (AVBufferRef *hw_frames_ref) |
static int | qsv_setup_mids (mfxFrameAllocResponse *resp, AVBufferRef *hw_frames_ref, AVBufferRef *mids_buf) |
static mfxStatus | qsv_frame_alloc (mfxHDL pthis, mfxFrameAllocRequest *req, mfxFrameAllocResponse *resp) |
static mfxStatus | qsv_frame_free (mfxHDL pthis, mfxFrameAllocResponse *resp) |
static mfxStatus | qsv_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr) |
static mfxStatus | qsv_frame_unlock (mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr) |
static mfxStatus | qsv_frame_get_hdl (mfxHDL pthis, mfxMemId mid, mfxHDL *hdl) |
int | ff_qsv_init_session_device (AVCodecContext *avctx, mfxSession *psession, AVBufferRef *device_ref, const char *load_plugins, int gpu_copy) |
int | ff_qsv_init_session_frames (AVCodecContext *avctx, mfxSession *psession, QSVFramesContext *qsv_frames_ctx, const char *load_plugins, int opaque, int gpu_copy) |
int | ff_qsv_close_internal_session (QSVSession *qs) |
Variables | |
struct { | |
int mfx_iopattern | |
const char * desc | |
} | qsv_iopatterns [] |
struct { | |
mfxStatus mfxerr | |
int averr | |
const char * desc | |
} | qsv_errors [] |
Definition at line 45 of file qsv.c.
Referenced by init_video_param(), init_video_param_jpeg(), and qsv_decode_header().
Definition at line 93 of file qsv.c.
Referenced by ff_qsv_enc_init(), and qsv_decode_preinit().
|
static |
Convert a libmfx error code into an FFmpeg error code.
Definition at line 153 of file qsv.c.
Referenced by ff_qsv_print_error(), and ff_qsv_print_warning().
int ff_qsv_print_error | ( | void * | log_ctx, |
mfxStatus | err, | ||
const char * | error_string | ||
) |
Definition at line 168 of file qsv.c.
Referenced by encode_frame(), ff_qsv_enc_init(), ff_qsv_init_internal_session(), ff_qsv_init_session_frames(), qsv_decode(), qsv_decode_header(), qsv_decode_init_context(), qsv_load_plugins(), qsv_retrieve_enc_jpeg_params(), qsv_retrieve_enc_params(), and qsv_retrieve_enc_vp9_params().
int ff_qsv_print_warning | ( | void * | log_ctx, |
mfxStatus | err, | ||
const char * | warning_string | ||
) |
Definition at line 177 of file qsv.c.
Referenced by encode_frame(), ff_qsv_enc_init(), and qsv_decode().
enum AVPixelFormat ff_qsv_map_fourcc | ( | uint32_t | fourcc | ) |
Definition at line 186 of file qsv.c.
Referenced by qsv_decode_init_context(), qsv_frame_alloc(), and qsv_process_data().
int ff_qsv_map_pixfmt | ( | enum AVPixelFormat | format, |
uint32_t * | fourcc | ||
) |
Definition at line 202 of file qsv.c.
Referenced by init_video_param(), and init_video_param_jpeg().
int ff_qsv_find_surface_idx | ( | QSVFramesContext * | ctx, |
QSVFrame * | frame | ||
) |
Definition at line 231 of file qsv.c.
Referenced by alloc_frame(), and submit_frame().
enum AVFieldOrder ff_qsv_map_picstruct | ( | int | mfx_pic_struct | ) |
Definition at line 244 of file qsv.c.
Referenced by qsv_decode_init_context().
enum AVPictureType ff_qsv_map_pictype | ( | int | mfx_pic_type | ) |
Definition at line 262 of file qsv.c.
Referenced by qsv_decode().
|
static |
Definition at line 291 of file qsv.c.
Referenced by ff_qsv_init_internal_session().
int ff_qsv_init_internal_session | ( | AVCodecContext * | avctx, |
QSVSession * | qs, | ||
const char * | load_plugins, | ||
int | gpu_copy | ||
) |
Definition at line 375 of file qsv.c.
Referenced by qsv_init_session(), and qsvenc_init_session().
|
static |
Definition at line 434 of file qsv.c.
Referenced by qsv_create_mids().
|
static |
Definition at line 441 of file qsv.c.
Referenced by ff_qsv_init_session_frames(), and qsv_frame_alloc().
|
static |
Definition at line 478 of file qsv.c.
Referenced by qsv_frame_alloc().
|
static |
Definition at line 514 of file qsv.c.
Referenced by ff_qsv_init_session_frames().
|
static |
Definition at line 603 of file qsv.c.
Referenced by ff_qsv_init_session_frames().
|
static |
Definition at line 611 of file qsv.c.
Referenced by ff_qsv_init_session_frames().
|
static |
Definition at line 668 of file qsv.c.
Referenced by ff_qsv_init_session_frames().
|
static |
Definition at line 678 of file qsv.c.
Referenced by ff_qsv_init_session_frames().
int ff_qsv_init_session_device | ( | AVCodecContext * | avctx, |
mfxSession * | psession, | ||
AVBufferRef * | device_ref, | ||
const char * | load_plugins, | ||
int | gpu_copy | ||
) |
Definition at line 691 of file qsv.c.
Referenced by ff_qsv_init_session_frames(), qsv_init_session(), and qsvenc_init_session().
int ff_qsv_init_session_frames | ( | AVCodecContext * | avctx, |
mfxSession * | psession, | ||
QSVFramesContext * | qsv_frames_ctx, | ||
const char * | load_plugins, | ||
int | opaque, | ||
int | gpu_copy | ||
) |
Definition at line 773 of file qsv.c.
Referenced by qsv_init_session(), and qsvenc_init_session().
int ff_qsv_close_internal_session | ( | QSVSession * | qs | ) |
Definition at line 820 of file qsv.c.
Referenced by ff_qsv_enc_close(), and qsv_decode_close_qsvcontext().
int mfx_iopattern |
Definition at line 82 of file qsv.c.
Referenced by ff_qsv_print_iopattern().
const char* desc |
Definition at line 83 of file qsv.c.
Referenced by ff_qsv_init_internal_session(), ff_qsv_print_error(), ff_qsv_print_iopattern(), ff_qsv_print_warning(), and qsv_map_error().
const { ... } qsv_iopatterns[] |
Referenced by ff_qsv_print_iopattern().
mfxStatus mfxerr |
Definition at line 111 of file qsv.c.
Referenced by qsv_map_error().
const { ... } qsv_errors[] |
Referenced by qsv_map_error().