FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
qsvenc.h File Reference
#include <stdint.h>
#include <sys/types.h>
#include <mfx/mfxvideo.h>
#include "libavutil/avutil.h"
#include "libavutil/fifo.h"
#include "avcodec.h"
#include "qsv_internal.h"

Go to the source code of this file.

Data Structures

struct  QSVEncContext
 

Macros

#define QSV_HAVE_CO2   QSV_VERSION_ATLEAST(1, 6)
 
#define QSV_HAVE_CO3   QSV_VERSION_ATLEAST(1, 11)
 
#define QSV_HAVE_TRELLIS   QSV_VERSION_ATLEAST(1, 8)
 
#define QSV_HAVE_MAX_SLICE_SIZE   QSV_VERSION_ATLEAST(1, 9)
 
#define QSV_HAVE_BREF_TYPE   QSV_VERSION_ATLEAST(1, 8)
 
#define QSV_HAVE_LA   QSV_VERSION_ATLEAST(1, 7)
 
#define QSV_HAVE_LA_HRD   QSV_VERSION_ATLEAST(1, 11)
 
#define QSV_HAVE_ICQ   QSV_VERSION_ATLEAST(1, 8)
 
#define QSV_HAVE_VCM   QSV_VERSION_ATLEAST(1, 8)
 
#define QSV_HAVE_QVBR   QSV_VERSION_ATLEAST(1, 11)
 
#define QSV_COMMON_OPTS
 

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)
 

Macro Definition Documentation

#define QSV_HAVE_CO2   QSV_VERSION_ATLEAST(1, 6)

Definition at line 37 of file qsvenc.h.

Referenced by init_video_param().

#define QSV_HAVE_CO3   QSV_VERSION_ATLEAST(1, 11)

Definition at line 38 of file qsvenc.h.

Referenced by qsv_retrieve_enc_params().

#define QSV_HAVE_TRELLIS   QSV_VERSION_ATLEAST(1, 8)

Definition at line 40 of file qsvenc.h.

#define QSV_HAVE_MAX_SLICE_SIZE   QSV_VERSION_ATLEAST(1, 9)

Definition at line 41 of file qsvenc.h.

#define QSV_HAVE_BREF_TYPE   QSV_VERSION_ATLEAST(1, 8)

Definition at line 42 of file qsvenc.h.

#define QSV_HAVE_LA   QSV_VERSION_ATLEAST(1, 7)

Definition at line 44 of file qsvenc.h.

Referenced by select_rc_mode().

#define QSV_HAVE_LA_HRD   QSV_VERSION_ATLEAST(1, 11)

Definition at line 45 of file qsvenc.h.

Referenced by dump_video_param().

#define QSV_HAVE_ICQ   QSV_VERSION_ATLEAST(1, 8)

Definition at line 46 of file qsvenc.h.

#define QSV_HAVE_VCM   QSV_VERSION_ATLEAST(1, 8)

Definition at line 47 of file qsvenc.h.

Referenced by dump_video_param(), and select_rc_mode().

#define QSV_HAVE_QVBR   QSV_VERSION_ATLEAST(1, 11)

Definition at line 48 of file qsvenc.h.

#define QSV_COMMON_OPTS
Value:
{ "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 0, INT_MAX, VE }, \
{ "avbr_accuracy", "Accuracy of the AVBR ratecontrol", OFFSET(qsv.avbr_accuracy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, \
{ "avbr_convergence", "Convergence of the AVBR ratecontrol", OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, \
{ "preset", NULL, OFFSET(qsv.preset), AV_OPT_TYPE_INT, { .i64 = MFX_TARGETUSAGE_BALANCED }, MFX_TARGETUSAGE_BEST_QUALITY, MFX_TARGETUSAGE_BEST_SPEED, VE, "preset" }, \
{ "veryfast", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BEST_SPEED }, INT_MIN, INT_MAX, VE, "preset" }, \
{ "faster", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_6 }, INT_MIN, INT_MAX, VE, "preset" }, \
{ "fast", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_5 }, INT_MIN, INT_MAX, VE, "preset" }, \
{ "medium", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BALANCED }, INT_MIN, INT_MAX, VE, "preset" }, \
{ "slow", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_3 }, INT_MIN, INT_MAX, VE, "preset" }, \
{ "slower", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_2 }, INT_MIN, INT_MAX, VE, "preset" }, \
{ "veryslow", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BEST_QUALITY }, INT_MIN, INT_MAX, VE, "preset" }, \
{ "vcm", "Use the video conferencing mode ratecontrol", OFFSET(qsv.vcm), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, \
{ "rdo", "Enable rate distortion optimization", OFFSET(qsv.rdo), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "max_frame_size", "Maximum encoded frame size in bytes", OFFSET(qsv.max_frame_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, \
{ "max_slice_size", "Maximum encoded slice size in bytes", OFFSET(qsv.max_slice_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, \
{ "bitrate_limit", "Toggle bitrate limitations", OFFSET(qsv.bitrate_limit), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "mbbrc", "MB level bitrate control", OFFSET(qsv.mbbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "extbrc", "Extended bitrate control", OFFSET(qsv.extbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "adaptive_i", "Adaptive I-frame placement", OFFSET(qsv.adaptive_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "adaptive_b", "Adaptive B-frame placement", OFFSET(qsv.adaptive_b), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(qsv.b_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "cavlc", "Enable CAVLC", OFFSET(qsv.cavlc), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE }, \
#define NULL
Definition: coverity.c:32
#define VE
Definition: cinepakenc.c:169
#define ASYNC_DEPTH_DEFAULT
Definition: qsv_internal.h:48
#define OFFSET(x)
Definition: ffmpeg_opt.c:3126

Definition at line 50 of file qsvenc.h.

Typedef Documentation

typedef int SetEncodeCtrlCB(AVCodecContext *avctx, const AVFrame *frame, mfxEncodeCtrl *enc_ctrl)

Definition at line 74 of file qsvenc.h.

Function Documentation

int ff_qsv_enc_init ( AVCodecContext avctx,
QSVEncContext q 
)

Definition at line 676 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 1007 of file qsvenc.c.

Referenced by qsv_enc_frame().

int ff_qsv_enc_close ( AVCodecContext avctx,
QSVEncContext q 
)

Definition at line 1076 of file qsvenc.c.

Referenced by qsv_enc_close(), and qsv_enc_init().