FFmpeg
vaapi_encode.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVCODEC_VAAPI_ENCODE_H
20 #define AVCODEC_VAAPI_ENCODE_H
21 
22 #include <stdint.h>
23 
24 #include <va/va.h>
25 
26 #if VA_CHECK_VERSION(1, 0, 0)
27 #include <va/va_str.h>
28 #endif
29 
30 #include "libavutil/hwcontext.h"
32 
33 #include "avcodec.h"
34 #include "hwconfig.h"
35 #include "hw_base_encode.h"
36 
37 struct VAAPIEncodeType;
38 struct VAAPIEncodePicture;
39 
40 // Codec output packet without timestamp delay, which means the
41 // output packet has same PTS and DTS.
42 #define FLAG_TIMESTAMP_NO_DELAY 1 << 6
43 
44 enum {
48  // A.4.1: table A.6 allows at most 22 tile rows for any level.
50  // A.4.1: table A.6 allows at most 20 tile columns for any level.
52 };
53 
55 
56 typedef struct VAAPIEncodeSlice {
57  int index;
58  int row_start;
59  int row_size;
64 
65 typedef struct VAAPIEncodePicture {
66 #if VA_CHECK_VERSION(1, 0, 0)
67  // ROI regions.
68  VAEncROI *roi;
69 #else
70  void *roi;
71 #endif
72 
73  VASurfaceID input_surface;
74  VASurfaceID recon_surface;
75 
77  VABufferID *param_buffers;
78 
79  /* Refcounted via the refstruct-API */
80  VABufferID *output_buffer_ref;
81  VABufferID output_buffer;
82 
84 
85  int nb_slices;
87 
88  /**
89  * indicate if current frame is an independent frame that the coded data
90  * can be pushed to downstream directly. Coded of non-independent frame
91  * data will be concatenated into next independent frame.
92  */
94  /** Tail data of current pic, used only for repeat header of AV1. */
96  /** Byte length of tail_data. */
97  size_t tail_size;
99 
100 typedef struct VAAPIEncodeProfile {
101  // lavc profile value (AV_PROFILE_*).
103  // Supported bit depth.
104  int depth;
105  // Number of components.
107  // Chroma subsampling in width dimension.
109  // Chroma subsampling in height dimension.
111  // VAAPI profile value.
112  VAProfile va_profile;
114 
115 enum {
124 };
125 
126 typedef struct VAAPIEncodeRCMode {
127  // Mode from above enum (RC_MODE_*).
128  int mode;
129  // Name.
130  const char *name;
131  // Supported in the compile-time VAAPI version.
133  // VA mode value (VA_RC_*).
134  uint32_t va_mode;
135  // Uses bitrate parameters.
136  int bitrate;
137  // Supports maxrate distinct from bitrate.
138  int maxrate;
139  // Uses quality value.
140  int quality;
141  // Supports HRD/VBV parameters.
142  int hrd;
144 
145 typedef struct VAAPIEncodeContext {
146  // Base context.
148 
149  // Codec-specific hooks.
150  const struct VAAPIEncodeType *codec;
151 
152  // Use low power encoding mode.
154 
155  // Max Frame Size
157 
158  // Explicitly set RC mode (otherwise attempt to pick from
159  // available modes).
161 
162  // Block Level based bitrate control.
163  int blbrc;
164 
165  // Explicitly-set QP, for use with the "qp" options.
166  // (Forces CQP mode when set, overriding everything else.)
168 
169  // Desired packed headers.
171 
172  // Everything above this point must be set before calling
173  // ff_vaapi_encode_init().
174 
175  // Chosen encoding profile details.
177 
178  // Chosen rate control mode details.
180  // RC quality level - meaning depends on codec and RC mode.
181  // In CQP mode this sets the fixed quantiser value.
183 
184  // Encoding profile (VAProfile*).
185  VAProfile va_profile;
186  // Encoding entrypoint (VAEntryoint*).
187  VAEntrypoint va_entrypoint;
188  // Rate control mode.
189  unsigned int va_rc_mode;
190  // Bitrate for codec-specific encoder parameters.
191  unsigned int va_bit_rate;
192  // Packed headers which will actually be sent.
193  unsigned int va_packed_headers;
194 
195  // Configuration attributes to use when creating va_config.
198 
199  VAConfigID va_config;
200  VAContextID va_context;
201 
203 
204  // Pool of (reusable) bitstream output buffers.
206 
207  // Global parameters which will be applied at the start of the
208  // sequence (includes rate control parameters below).
213 
214  // Rate control parameters.
215  VAEncMiscParameterRateControl rc_params;
216  VAEncMiscParameterHRD hrd_params;
217  VAEncMiscParameterFrameRate fr_params;
218  VAEncMiscParameterBufferMaxFrameSize mfs_params;
219 #if VA_CHECK_VERSION(0, 36, 0)
220  VAEncMiscParameterBufferQualityLevel quality_params;
221 #endif
222 
223  // Per-sequence parameter structure (VAEncSequenceParameterBuffer*).
225 
226  // Per-sequence parameters found in the per-picture parameter
227  // structure (VAEncPictureParameterBuffer*).
229 
230  // Slice structure.
235 
236  // Tile encoding.
239  // Tile width of the i-th column.
241  // Tile height of i-th row.
243  // Location of the i-th tile column boundary.
245  // Location of the i-th tile row boundary.
247 
248  // Maximum number of regions supported by the driver.
250  // Quantisation range for offset calculations. Set by codec-specific
251  // code, as it may change based on parameters.
253 
254  /** Head data for current output pkt, used only for AV1. */
255  //void *header_data;
256  //size_t header_data_size;
257 
258  /**
259  * Buffered coded data of a pic if it is an non-independent frame.
260  * This is a RefStruct reference.
261  */
262  VABufferID *coded_buffer_ref;
263 
264  // Surface alignment required by driver.
268 
269 typedef struct VAAPIEncodeType {
270  // List of supported profiles and corresponding VAAPI profiles.
271  // (Must end with AV_PROFILE_UNKNOWN.)
273 
274  // Codec feature flags.
275  int flags;
276 
277  // Default quality for this codec - used as quantiser or RC quality
278  // factor depending on RC mode.
280 
281  // Determine encode parameters like block sizes for surface alignment
282  // and slices. This may need to query the profile and entrypoint,
283  // which will be available when this function is called. If not set,
284  // assume that all blocks are 16x16 and that surfaces should be
285  // aligned to match this.
287 
288  // Perform any extra codec-specific configuration after the
289  // codec context is initialised (set up the private data and
290  // add any necessary global parameters).
291  int (*configure)(AVCodecContext *avctx);
292 
293  // The size of any private data structure associated with each
294  // picture (can be zero if not required).
296 
297  // The size of the parameter structures:
298  // sizeof(VAEnc{type}ParameterBuffer{codec}).
302 
303  // Fill the parameter structures.
306  FFHWBaseEncodePicture *pic);
309  VAAPIEncodeSlice *slice);
310 
311  // The type used by the packed header: this should look like
312  // VAEncPackedHeader{something}.
316 
317  // Write the packed header data to the provided buffer.
318  // The sequence header is also used to fill the codec extradata
319  // when the encoder is starting.
321  char *data, size_t *data_len);
324  char *data, size_t *data_len);
326  VAAPIEncodePicture *pic,
327  VAAPIEncodeSlice *slice,
328  char *data, size_t *data_len);
329 
330  // Fill an extra parameter structure, which will then be
331  // passed to vaRenderPicture(). Will be called repeatedly
332  // with increasing index argument until AVERROR_EOF is
333  // returned.
336  int index, int *type,
337  char *data, size_t *data_len);
338 
339  // Write an extra packed header. Will be called repeatedly
340  // with increasing index argument until AVERROR_EOF is
341  // returned.
344  int index, int *type,
345  char *data, size_t *data_len);
347 
349 
352 
353 
354 #define VAAPI_ENCODE_COMMON_OPTIONS \
355  { "low_power", \
356  "Use low-power encoding mode (only available on some platforms; " \
357  "may not support all encoding features)", \
358  OFFSET(common.low_power), AV_OPT_TYPE_BOOL, \
359  { .i64 = 0 }, 0, 1, FLAGS }, \
360  { "max_frame_size", \
361  "Maximum frame size (in bytes)",\
362  OFFSET(common.max_frame_size), AV_OPT_TYPE_INT, \
363  { .i64 = 0 }, 0, INT_MAX, FLAGS }
364 
365 #define VAAPI_ENCODE_RC_MODE(name, desc) \
366  { #name, desc, 0, AV_OPT_TYPE_CONST, { .i64 = RC_MODE_ ## name }, \
367  0, 0, FLAGS, .unit = "rc_mode" }
368 #define VAAPI_ENCODE_RC_OPTIONS \
369  { "rc_mode",\
370  "Set rate control mode", \
371  OFFSET(common.explicit_rc_mode), AV_OPT_TYPE_INT, \
372  { .i64 = RC_MODE_AUTO }, RC_MODE_AUTO, RC_MODE_MAX, FLAGS, .unit = "rc_mode" }, \
373  { "auto", "Choose mode automatically based on other parameters", \
374  0, AV_OPT_TYPE_CONST, { .i64 = RC_MODE_AUTO }, 0, 0, FLAGS, .unit = "rc_mode" }, \
375  VAAPI_ENCODE_RC_MODE(CQP, "Constant-quality"), \
376  VAAPI_ENCODE_RC_MODE(CBR, "Constant-bitrate"), \
377  VAAPI_ENCODE_RC_MODE(VBR, "Variable-bitrate"), \
378  VAAPI_ENCODE_RC_MODE(ICQ, "Intelligent constant-quality"), \
379  VAAPI_ENCODE_RC_MODE(QVBR, "Quality-defined variable-bitrate"), \
380  VAAPI_ENCODE_RC_MODE(AVBR, "Average variable-bitrate"), \
381  { "blbrc", \
382  "Block level based bitrate control",\
383  OFFSET(common.blbrc), AV_OPT_TYPE_BOOL, \
384  { .i64 = 0 }, 0, 1, FLAGS }
385 
386 
387 #endif /* AVCODEC_VAAPI_ENCODE_H */
hwconfig.h
VAAPIEncodeType::default_quality
int default_quality
Definition: vaapi_encode.h:279
VAAPIEncodeSlice::codec_slice_params
void * codec_slice_params
Definition: vaapi_encode.h:62
VAAPIEncodeProfile::va_profile
VAProfile va_profile
Definition: vaapi_encode.h:112
VAAPIEncodeContext::va_packed_headers
unsigned int va_packed_headers
Definition: vaapi_encode.h:193
RC_MODE_ICQ
@ RC_MODE_ICQ
Definition: vaapi_encode.h:120
RC_MODE_VBR
@ RC_MODE_VBR
Definition: vaapi_encode.h:119
VAAPIEncodeContext::desired_packed_headers
unsigned int desired_packed_headers
Definition: vaapi_encode.h:170
VAAPIEncodeType::init_picture_params
int(* init_picture_params)(AVCodecContext *avctx, FFHWBaseEncodePicture *pic)
Definition: vaapi_encode.h:305
VAAPIEncodePicture::tail_size
size_t tail_size
Byte length of tail_data.
Definition: vaapi_encode.h:97
VAAPIEncodeContext::blbrc
int blbrc
Definition: vaapi_encode.h:163
VAAPIEncodeContext::tile_cols
int tile_cols
Definition: vaapi_encode.h:237
VAAPIEncodeContext::base
FFHWBaseEncodeContext base
Definition: vaapi_encode.h:147
VAAPIEncodeContext::slice_size
int slice_size
Definition: vaapi_encode.h:234
VAAPIEncodeContext::nb_global_params
int nb_global_params
Definition: vaapi_encode.h:212
VAAPIEncodeContext::global_params_size
size_t global_params_size[MAX_GLOBAL_PARAMS]
Definition: vaapi_encode.h:211
VAAPIEncodeContext::nb_slices
int nb_slices
Definition: vaapi_encode.h:233
VAAPIEncodeType::write_sequence_header
int(* write_sequence_header)(AVCodecContext *avctx, char *data, size_t *data_len)
Definition: vaapi_encode.h:320
VAAPIEncodeSlice
Definition: vaapi_encode.h:56
data
const char data[16]
Definition: mxf.c:149
VAAPIEncodeContext::roi_quant_range
int roi_quant_range
Definition: vaapi_encode.h:252
VAAPIEncodeSlice::block_start
int block_start
Definition: vaapi_encode.h:60
VAAPIEncodeType::flags
int flags
Definition: vaapi_encode.h:275
VAAPIEncodeContext::low_power
int low_power
Definition: vaapi_encode.h:153
VAAPIEncodeContext::surface_alignment_width
int surface_alignment_width
Definition: vaapi_encode.h:265
VAAPIEncodeSlice::index
int index
Definition: vaapi_encode.h:57
VAAPIEncodeContext::output_buffer_pool
struct AVRefStructPool * output_buffer_pool
Definition: vaapi_encode.h:205
VAAPIEncodeRCMode::va_mode
uint32_t va_mode
Definition: vaapi_encode.h:134
ff_vaapi_encode_init
int ff_vaapi_encode_init(AVCodecContext *avctx)
Definition: vaapi_encode.c:2153
VAAPIEncodeContext::rc_params
VAEncMiscParameterRateControl rc_params
Definition: vaapi_encode.h:215
VAAPIEncodeContext::va_rc_mode
unsigned int va_rc_mode
Definition: vaapi_encode.h:189
VAAPIEncodeContext::roi_max_regions
int roi_max_regions
Definition: vaapi_encode.h:249
VAAPIEncodeType::configure
int(* configure)(AVCodecContext *avctx)
Definition: vaapi_encode.h:291
FFHWBaseEncodeContext
Definition: hw_base_encode.h:122
VAAPIEncodeContext::row_height
int row_height[MAX_TILE_ROWS]
Definition: vaapi_encode.h:242
VAAPIEncodeType::picture_header_type
int picture_header_type
Definition: vaapi_encode.h:314
VAAPIEncodeSlice::row_start
int row_start
Definition: vaapi_encode.h:58
VAAPIEncodePicture
Definition: vaapi_encode.h:65
VAAPIEncodePicture::non_independent_frame
int non_independent_frame
indicate if current frame is an independent frame that the coded data can be pushed to downstream dir...
Definition: vaapi_encode.h:93
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
VAAPIEncodeContext::mfs_params
VAEncMiscParameterBufferMaxFrameSize mfs_params
Definition: vaapi_encode.h:218
VAAPIEncodeContext::profile
const VAAPIEncodeProfile * profile
Definition: vaapi_encode.h:176
VAAPIEncodeContext::nb_config_attributes
int nb_config_attributes
Definition: vaapi_encode.h:197
VAAPIEncodeContext::rc_mode
const VAAPIEncodeRCMode * rc_mode
Definition: vaapi_encode.h:179
pkt
AVPacket * pkt
Definition: movenc.c:60
VAAPIEncodeSlice::row_size
int row_size
Definition: vaapi_encode.h:59
VAAPIEncodePicture::codec_picture_params
void * codec_picture_params
Definition: vaapi_encode.h:83
VAAPIEncodeType::picture_params_size
size_t picture_params_size
Definition: vaapi_encode.h:300
VAAPIEncodeContext::tile_rows
int tile_rows
Definition: vaapi_encode.h:238
VAAPIEncodeContext::global_params_type
int global_params_type[MAX_GLOBAL_PARAMS]
Definition: vaapi_encode.h:209
VAAPIEncodeContext::global_params
const void * global_params[MAX_GLOBAL_PARAMS]
Definition: vaapi_encode.h:210
AVRefStructPool
AVRefStructPool is an API for a thread-safe pool of objects managed via the RefStruct API.
Definition: refstruct.c:183
VAAPIEncodeContext::va_entrypoint
VAEntrypoint va_entrypoint
Definition: vaapi_encode.h:187
hw_base_encode.h
VAAPIEncodeType
Definition: vaapi_encode.h:269
VAAPIEncodeContext
Definition: vaapi_encode.h:145
VAAPIEncodeContext::rc_quality
int rc_quality
Definition: vaapi_encode.h:182
MAX_CONFIG_ATTRIBUTES
@ MAX_CONFIG_ATTRIBUTES
Definition: vaapi_encode.h:45
VAAPIEncodeContext::slice_block_rows
int slice_block_rows
Definition: vaapi_encode.h:231
VAAPIEncodeType::sequence_header_type
int sequence_header_type
Definition: vaapi_encode.h:313
MAX_GLOBAL_PARAMS
@ MAX_GLOBAL_PARAMS
Definition: vaapi_encode.h:46
VAAPIEncodeType::write_picture_header
int(* write_picture_header)(AVCodecContext *avctx, FFHWBaseEncodePicture *pic, char *data, size_t *data_len)
Definition: vaapi_encode.h:322
VAAPIEncodeProfile::av_profile
int av_profile
Definition: vaapi_encode.h:102
VAAPIEncodeType::profiles
const VAAPIEncodeProfile * profiles
Definition: vaapi_encode.h:272
ff_vaapi_encode_close
int ff_vaapi_encode_close(AVCodecContext *avctx)
Definition: vaapi_encode.c:2341
VAAPIEncodeType::init_sequence_params
int(* init_sequence_params)(AVCodecContext *avctx)
Definition: vaapi_encode.h:304
VAAPIEncodeRCMode::supported
int supported
Definition: vaapi_encode.h:132
VAAPIEncodeContext::codec_sequence_params
void * codec_sequence_params
Definition: vaapi_encode.h:224
VAAPIEncodeContext::va_bit_rate
unsigned int va_bit_rate
Definition: vaapi_encode.h:191
VAAPIEncodeType::slice_params_size
size_t slice_params_size
Definition: vaapi_encode.h:301
VAAPIEncodeContext::config_attributes
VAConfigAttrib config_attributes[MAX_CONFIG_ATTRIBUTES]
Definition: vaapi_encode.h:196
index
int index
Definition: gxfenc.c:90
VAAPIEncodeProfile::nb_components
int nb_components
Definition: vaapi_encode.h:106
VAAPIEncodePicture::slices
VAAPIEncodeSlice * slices
Definition: vaapi_encode.h:86
VAAPIEncodePicture::input_surface
VASurfaceID input_surface
Definition: vaapi_encode.h:73
RC_MODE_CQP
@ RC_MODE_CQP
Definition: vaapi_encode.h:117
VAAPIEncodeRCMode::mode
int mode
Definition: vaapi_encode.h:128
VAAPIEncodeProfile::depth
int depth
Definition: vaapi_encode.h:104
AVCodecHWConfigInternal
Definition: hwconfig.h:25
MAX_PARAM_BUFFER_SIZE
@ MAX_PARAM_BUFFER_SIZE
Definition: vaapi_encode.h:47
VAAPIEncodeContext::explicit_rc_mode
int explicit_rc_mode
Definition: vaapi_encode.h:160
MAX_TILE_COLS
@ MAX_TILE_COLS
Definition: vaapi_encode.h:51
VAAPIEncodePicture::recon_surface
VASurfaceID recon_surface
Definition: vaapi_encode.h:74
VAAPIEncodeType::slice_header_type
int slice_header_type
Definition: vaapi_encode.h:315
VAAPIEncodePicture::output_buffer
VABufferID output_buffer
Definition: vaapi_encode.h:81
VAAPIEncodeContext::va_context
VAContextID va_context
Definition: vaapi_encode.h:200
VAAPIEncodeContext::hrd_params
VAEncMiscParameterHRD hrd_params
Definition: vaapi_encode.h:216
VAAPIEncodeContext::surface_alignment_height
int surface_alignment_height
Definition: vaapi_encode.h:266
VAAPIEncodeContext::col_width
int col_width[MAX_TILE_COLS]
Definition: vaapi_encode.h:240
VAAPIEncodeContext::codec
const struct VAAPIEncodeType * codec
Definition: vaapi_encode.h:150
VAAPIEncodeContext::row_bd
int row_bd[MAX_TILE_ROWS+1]
Definition: vaapi_encode.h:246
VAAPIEncodePicture::roi
void * roi
Definition: vaapi_encode.h:70
RC_MODE_MAX
@ RC_MODE_MAX
Definition: vaapi_encode.h:123
VAAPIEncodeContext::codec_picture_params
void * codec_picture_params
Definition: vaapi_encode.h:228
VAAPIEncodeContext::max_frame_size
int max_frame_size
Definition: vaapi_encode.h:156
avcodec.h
RC_MODE_AVBR
@ RC_MODE_AVBR
Definition: vaapi_encode.h:122
VAAPIEncodePicture::tail_data
char tail_data[MAX_PARAM_BUFFER_SIZE]
Tail data of current pic, used only for repeat header of AV1.
Definition: vaapi_encode.h:95
hwcontext_vaapi.h
VAAPIEncodeContext::hwctx
AVVAAPIDeviceContext * hwctx
Definition: vaapi_encode.h:202
FFHWBaseEncodePicture
Definition: hw_base_encode.h:61
VAAPIEncodeRCMode::bitrate
int bitrate
Definition: vaapi_encode.h:136
VAAPIEncodePicture::param_buffers
VABufferID * param_buffers
Definition: vaapi_encode.h:77
VAAPIEncodeType::write_extra_buffer
int(* write_extra_buffer)(AVCodecContext *avctx, FFHWBaseEncodePicture *pic, int index, int *type, char *data, size_t *data_len)
Definition: vaapi_encode.h:334
VAAPIEncodeContext::va_config
VAConfigID va_config
Definition: vaapi_encode.h:199
VAAPIEncodeContext::va_profile
VAProfile va_profile
Definition: vaapi_encode.h:185
AVCodecContext
main external API structure.
Definition: avcodec.h:451
VAAPIEncodeRCMode::hrd
int hrd
Definition: vaapi_encode.h:142
VAAPIEncodeProfile::log2_chroma_h
int log2_chroma_h
Definition: vaapi_encode.h:110
VAAPIEncodeContext::fr_params
VAEncMiscParameterFrameRate fr_params
Definition: vaapi_encode.h:217
VAAPIEncodeType::write_slice_header
int(* write_slice_header)(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice, char *data, size_t *data_len)
Definition: vaapi_encode.h:325
VAAPIEncodeRCMode::maxrate
int maxrate
Definition: vaapi_encode.h:138
VAAPIEncodeContext::coded_buffer_ref
VABufferID * coded_buffer_ref
Head data for current output pkt, used only for AV1.
Definition: vaapi_encode.h:262
VAAPIEncodePicture::output_buffer_ref
VABufferID * output_buffer_ref
Definition: vaapi_encode.h:80
VAAPIEncodeType::sequence_params_size
size_t sequence_params_size
Definition: vaapi_encode.h:299
VAAPIEncodeContext::explicit_qp
int explicit_qp
Definition: vaapi_encode.h:167
RC_MODE_CBR
@ RC_MODE_CBR
Definition: vaapi_encode.h:118
VAAPIEncodeSlice::block_size
int block_size
Definition: vaapi_encode.h:61
VAAPIEncodeRCMode
Definition: vaapi_encode.h:126
RC_MODE_QVBR
@ RC_MODE_QVBR
Definition: vaapi_encode.h:121
AVPacket
This structure stores compressed data.
Definition: packet.h:516
VAAPIEncodeType::init_slice_params
int(* init_slice_params)(AVCodecContext *avctx, FFHWBaseEncodePicture *pic, VAAPIEncodeSlice *slice)
Definition: vaapi_encode.h:307
VAAPIEncodeContext::col_bd
int col_bd[MAX_TILE_COLS+1]
Definition: vaapi_encode.h:244
VAAPIEncodeProfile::log2_chroma_w
int log2_chroma_w
Definition: vaapi_encode.h:108
hwcontext.h
VAAPIEncodeContext::slice_block_cols
int slice_block_cols
Definition: vaapi_encode.h:232
VAAPIEncodeType::write_extra_header
int(* write_extra_header)(AVCodecContext *avctx, FFHWBaseEncodePicture *pic, int index, int *type, char *data, size_t *data_len)
Definition: vaapi_encode.h:342
VAAPIEncodeType::picture_priv_data_size
size_t picture_priv_data_size
Definition: vaapi_encode.h:295
MAX_TILE_ROWS
@ MAX_TILE_ROWS
Definition: vaapi_encode.h:49
VAAPIEncodeType::get_encoder_caps
int(* get_encoder_caps)(AVCodecContext *avctx)
Definition: vaapi_encode.h:286
VAAPIEncodePicture::nb_param_buffers
int nb_param_buffers
Definition: vaapi_encode.h:76
AVVAAPIDeviceContext
VAAPI connection details.
Definition: hwcontext_vaapi.h:68
VAAPIEncodeRCMode::quality
int quality
Definition: vaapi_encode.h:140
RC_MODE_AUTO
@ RC_MODE_AUTO
Definition: vaapi_encode.h:116
VAAPIEncodeProfile
Definition: vaapi_encode.h:100
ff_vaapi_encode_receive_packet
int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
Definition: vaapi_encode.c:2148
VAAPIEncodeRCMode::name
const char * name
Definition: vaapi_encode.h:130
VAAPIEncodePicture::nb_slices
int nb_slices
Definition: vaapi_encode.h:85
ff_vaapi_encode_hw_configs
const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[]
Definition: vaapi_encode.c:36