#include "config_components.h"
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include <mfxvideo.h>
#include "libavutil/common.h"
#include "libavutil/fifo.h"
#include "libavutil/frame.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/mem.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/pixfmt.h"
#include "libavutil/time.h"
#include "libavutil/imgutils.h"
#include "libavutil/film_grain_params.h"
#include "libavutil/mastering_display_metadata.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "internal.h"
#include "decode.h"
#include "hwconfig.h"
#include "qsv.h"
#include "qsv_internal.h"
Go to the source code of this file.
|
#define | MFXUnload(a) do { } while(0) |
|
#define | PTS_TO_MFX_PTS(pts, pts_tb) |
|
#define | MFX_PTS_TO_PTS(mfx_pts, pts_tb) |
|
#define | OFFSET(x) offsetof(QSVDecContext, x) |
|
#define | VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM |
|
#define | DEFINE_QSV_DECODER_WITH_OPTION(x, X, bsf_name, opt) |
|
#define | DEFINE_QSV_DECODER(x, X, bsf_name) DEFINE_QSV_DECODER_WITH_OPTION(x, X, bsf_name, options) |
|
|
static int | qsv_get_continuous_buffer (AVCodecContext *avctx, AVFrame *frame, AVBufferPool *pool) |
|
static int | qsv_init_session (AVCodecContext *avctx, QSVContext *q, mfxSession session, AVBufferRef *hw_frames_ref, AVBufferRef *hw_device_ref) |
|
static int | qsv_decode_preinit (AVCodecContext *avctx, QSVContext *q, enum AVPixelFormat pix_fmt, mfxVideoParam *param) |
|
static int | qsv_decode_init_context (AVCodecContext *avctx, QSVContext *q, mfxVideoParam *param) |
|
static int | qsv_decode_header (AVCodecContext *avctx, QSVContext *q, const AVPacket *avpkt, enum AVPixelFormat pix_fmt, mfxVideoParam *param) |
|
static int | alloc_frame (AVCodecContext *avctx, QSVContext *q, QSVFrame *frame) |
|
static void | qsv_clear_unused_frames (QSVContext *q) |
|
static int | get_surface (AVCodecContext *avctx, QSVContext *q, mfxFrameSurface1 **surf) |
|
static QSVFrame * | find_frame (QSVContext *q, mfxFrameSurface1 *surf) |
|
static int | qsv_decode (AVCodecContext *avctx, QSVContext *q, AVFrame *frame, int *got_frame, const AVPacket *avpkt) |
|
static void | qsv_decode_close_qsvcontext (QSVContext *q) |
|
static int | qsv_process_data (AVCodecContext *avctx, QSVContext *q, AVFrame *frame, int *got_frame, const AVPacket *pkt) |
|
static void | qsv_clear_buffers (QSVDecContext *s) |
|
static av_cold int | qsv_decode_close (AVCodecContext *avctx) |
|
static av_cold int | qsv_decode_init (AVCodecContext *avctx) |
|
static int | qsv_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt) |
|
static void | qsv_decode_flush (AVCodecContext *avctx) |
|
◆ MFXUnload
#define MFXUnload |
( |
|
a | ) |
do { } while(0) |
◆ PTS_TO_MFX_PTS
#define PTS_TO_MFX_PTS |
( |
|
pts, |
|
|
|
pts_tb |
|
) |
| |
Value:
MFX_TIMESTAMP_UNKNOWN : pts_tb.num ? \
Definition at line 62 of file qsvdec.c.
◆ MFX_PTS_TO_PTS
#define MFX_PTS_TO_PTS |
( |
|
mfx_pts, |
|
|
|
pts_tb |
|
) |
| |
Value: ((mfx_pts) == MFX_TIMESTAMP_UNKNOWN ? \
Definition at line 66 of file qsvdec.c.
◆ OFFSET
◆ VD
◆ DEFINE_QSV_DECODER_WITH_OPTION
#define DEFINE_QSV_DECODER_WITH_OPTION |
( |
|
x, |
|
|
|
X, |
|
|
|
bsf_name, |
|
|
|
opt |
|
) |
| |
◆ DEFINE_QSV_DECODER
◆ LoadPlugin
Enumerator |
---|
LOAD_PLUGIN_NONE | |
LOAD_PLUGIN_HEVC_SW | |
LOAD_PLUGIN_HEVC_HW | |
LOAD_PLUGIN_NONE | |
LOAD_PLUGIN_HEVC_SW | |
LOAD_PLUGIN_HEVC_HW | |
Definition at line 954 of file qsvdec.c.
◆ qsv_get_continuous_buffer()
◆ qsv_init_session()
◆ qsv_decode_preinit()
◆ qsv_decode_init_context()
◆ qsv_decode_header()
◆ alloc_frame()
◆ qsv_clear_unused_frames()
static void qsv_clear_unused_frames |
( |
QSVContext * |
q | ) |
|
|
static |
◆ get_surface()
◆ find_frame()
◆ qsv_decode()
◆ qsv_decode_close_qsvcontext()
static void qsv_decode_close_qsvcontext |
( |
QSVContext * |
q | ) |
|
|
static |
◆ qsv_process_data()
◆ qsv_clear_buffers()
◆ qsv_decode_close()
◆ qsv_decode_init()
◆ qsv_decode_frame()
◆ qsv_decode_flush()
◆ mfx_tb
◆ qsv_hw_configs
Initial value:
Definition at line 113 of file qsvdec.c.
◆ options
Initial value:= {
{
"gpu_copy",
"A GPU-accelerated copy between video and system memory",
OFFSET(qsv.gpu_copy),
AV_OPT_TYPE_INT, { .i64 = MFX_GPUCOPY_DEFAULT }, MFX_GPUCOPY_DEFAULT, MFX_GPUCOPY_OFF,
VD,
"gpu_copy"},
}
Definition at line 1162 of file qsvdec.c.