Go to the documentation of this file.
23 #include <sys/types.h>
81 "failed to send input packet\n");
88 "failed to receive output packet\n");
105 #define OFFSET(x) offsetof(QSVAV1EncContext, x)
106 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
118 {
"tile_cols",
"Number of columns for tiled encoding",
OFFSET(qsv.tile_cols),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX,
VE },
119 {
"tile_rows",
"Number of rows for tiled encoding",
OFFSET(qsv.tile_rows),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX,
VE },
120 {
"look_ahead_depth",
"Depth of look ahead in number frames, available when extbrc option is enabled",
OFFSET(qsv.look_ahead_depth),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 100,
VE },
153 .p.priv_class = &
class,
156 .p.wrapper_name =
"qsv",
AVCodecParameters * par_in
Parameters of the input stream.
AVPixelFormat
Pixel format.
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define QSV_OPTION_ADAPTIVE_B
This structure describes decoded (raw) audio or video data.
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
static const FFCodecDefault qsv_enc_defaults[]
void av_bsf_free(AVBSFContext **pctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
The bitstream filter state.
AVBSFContext * extra_data_bsf
#define AV_CODEC_FLAG_GLOBAL_HEADER
Place global headers in extradata instead of every keyframe.
AVCodec p
The public AVCodec.
int flags
AV_CODEC_FLAG_*.
#define FF_CODEC_ENCODE_CB(func)
static av_cold int qsv_enc_close(AVCodecContext *avctx)
const AVCodecHWConfigInternal *const ff_qsv_enc_hw_configs[]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **pctx)
Allocate a context for a given bitstream filter.
#define LIBAVUTIL_VERSION_INT
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
Describe the class of an AVClass context structure.
#define QSV_OPTION_LOW_DELAY_BRC
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
static const AVOption options[]
const char * av_default_item_name(void *ptr)
Return the context name.
@ AV_PIX_FMT_QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
#define QSV_OPTION_ADAPTIVE_I
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
static int qsv_enc_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
static av_cold int qsv_enc_init(AVCodecContext *avctx)
#define QSV_OPTION_EXTBRC
int ff_qsv_enc_close(AVCodecContext *avctx, QSVEncContext *q)
FFCodec ff_av1_qsv_encoder
const char * name
Name of the codec implementation.
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define QSV_OPTION_MAX_FRAME_SIZE
main external API structure.
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
#define AV_CODEC_CAP_HYBRID
Codec is potentially backed by a hardware implementation, but not necessarily.
int avcodec_parameters_from_context(struct AVCodecParameters *par, const AVCodecContext *codec)
Fill the parameters struct based on the values from the supplied codec context.
This structure stores compressed data.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q, AVPacket *pkt, const AVFrame *frame, int *got_packet)
const AVBitStreamFilter * av_bsf_get_by_name(const char *name)
#define QSV_OPTION_B_STRATEGY