FFmpeg
|
#include <stdint.h>
#include <sys/types.h>
#include <mfxvideo.h>
#include "libavutil/common.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/avutil.h"
#include "libavutil/fifo.h"
#include "avcodec.h"
#include "hwconfig.h"
#include "qsv_internal.h"
Go to the source code of this file.
Data Structures | |
struct | QSVEncContext |
Macros | |
#define | QSV_HAVE_EXT_VP9_TILES QSV_VERSION_ATLEAST(1, 29) |
#define | QSV_HAVE_EXT_AV1_PARAM QSV_VERSION_ATLEAST(2, 5) |
#define | QSV_HAVE_AVBR 0 |
#define | QSV_HAVE_VCM 0 |
#define | QSV_HAVE_MF !QSV_ONEVPL |
#define | QSV_HAVE_HE 0 |
#define | QSV_COMMON_OPTS |
#define | QSV_OPTION_RDO { "rdo", "Enable rate distortion optimization", OFFSET(qsv.rdo), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_MAX_FRAME_SIZE |
#define | QSV_OPTION_MAX_SLICE_SIZE { "max_slice_size", "Maximum encoded slice size in bytes", OFFSET(qsv.max_slice_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE }, |
#define | QSV_OPTION_BITRATE_LIMIT { "bitrate_limit", "Toggle bitrate limitations", OFFSET(qsv.bitrate_limit), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_MBBRC { "mbbrc", "MB level bitrate control", OFFSET(qsv.mbbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_EXTBRC { "extbrc", "Extended bitrate control", OFFSET(qsv.extbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_ADAPTIVE_I { "adaptive_i", "Adaptive I-frame placement", OFFSET(qsv.adaptive_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_ADAPTIVE_B { "adaptive_b", "Adaptive B-frame placement", OFFSET(qsv.adaptive_b), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_P_STRATEGY { "p_strategy", "Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to 0).", OFFSET(qsv.p_strategy), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, VE }, |
#define | QSV_OPTION_B_STRATEGY { "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(qsv.b_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_DBLK_IDC { "dblk_idc", "This option disable deblocking. It has value in range 0~2.", OFFSET(qsv.dblk_idc), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE}, |
#define | QSV_OPTION_LOW_DELAY_BRC { "low_delay_brc", "Allow to strictly obey avg frame size", OFFSET(qsv.low_delay_brc), AV_OPT_TYPE_BOOL,{ .i64 = -1 }, -1, 1, VE }, |
#define | QSV_OPTION_MAX_MIN_QP |
#define | QSV_OPTION_SCENARIO |
#define | QSV_OPTION_AVBR |
#define | QSV_OPTION_SKIP_FRAME |
Typedefs | |
typedef int | SetEncodeCtrlCB(AVCodecContext *avctx, const AVFrame *frame, mfxEncodeCtrl *enc_ctrl) |
Functions | |
int | ff_qsv_enc_init (AVCodecContext *avctx, QSVEncContext *q) |
int | ff_qsv_encode (AVCodecContext *avctx, QSVEncContext *q, AVPacket *pkt, const AVFrame *frame, int *got_packet) |
int | ff_qsv_enc_close (AVCodecContext *avctx, QSVEncContext *q) |
Variables | |
const AVCodecHWConfigInternal *const | ff_qsv_enc_hw_configs [] |
#define QSV_HAVE_EXT_VP9_TILES QSV_VERSION_ATLEAST(1, 29) |
#define QSV_HAVE_EXT_AV1_PARAM QSV_VERSION_ATLEAST(2, 5) |
#define QSV_HAVE_MF !QSV_ONEVPL |
#define QSV_COMMON_OPTS |
#define QSV_OPTION_RDO { "rdo", "Enable rate distortion optimization", OFFSET(qsv.rdo), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define QSV_OPTION_MAX_FRAME_SIZE |
#define QSV_OPTION_MAX_SLICE_SIZE { "max_slice_size", "Maximum encoded slice size in bytes", OFFSET(qsv.max_slice_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE }, |
#define QSV_OPTION_BITRATE_LIMIT { "bitrate_limit", "Toggle bitrate limitations", OFFSET(qsv.bitrate_limit), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define QSV_OPTION_MBBRC { "mbbrc", "MB level bitrate control", OFFSET(qsv.mbbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define QSV_OPTION_EXTBRC { "extbrc", "Extended bitrate control", OFFSET(qsv.extbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define QSV_OPTION_ADAPTIVE_I { "adaptive_i", "Adaptive I-frame placement", OFFSET(qsv.adaptive_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define QSV_OPTION_ADAPTIVE_B { "adaptive_b", "Adaptive B-frame placement", OFFSET(qsv.adaptive_b), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, |
#define QSV_OPTION_DBLK_IDC { "dblk_idc", "This option disable deblocking. It has value in range 0~2.", OFFSET(qsv.dblk_idc), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE}, |
#define QSV_OPTION_MAX_MIN_QP |
#define QSV_OPTION_SCENARIO |
#define QSV_OPTION_AVBR |
#define QSV_OPTION_SKIP_FRAME |
typedef int SetEncodeCtrlCB(AVCodecContext *avctx, const AVFrame *frame, mfxEncodeCtrl *enc_ctrl) |
int ff_qsv_enc_init | ( | AVCodecContext * | avctx, |
QSVEncContext * | q | ||
) |
Definition at line 1606 of file qsvenc.c.
Referenced by qsv_enc_init().
int ff_qsv_encode | ( | AVCodecContext * | avctx, |
QSVEncContext * | q, | ||
AVPacket * | pkt, | ||
const AVFrame * | frame, | ||
int * | got_packet | ||
) |
Definition at line 2548 of file qsvenc.c.
Referenced by qsv_enc_frame().
int ff_qsv_enc_close | ( | AVCodecContext * | avctx, |
QSVEncContext * | q | ||
) |
Definition at line 2614 of file qsvenc.c.
Referenced by qsv_enc_close(), and qsv_enc_init().
const AVCodecHWConfigInternal* const ff_qsv_enc_hw_configs[] |