22 #include <va/va_enc_h264.h>
46 0x59, 0x94, 0x8b, 0x28, 0x11, 0xec, 0x45, 0xaf,
47 0x96, 0x75, 0x19, 0xd4, 0x1f, 0xea, 0xa9, 0x4d,
108 char *
data,
size_t *data_len,
122 "%zu < %zu.\n", *data_len,
144 "type = %d.\n",
header->nal_unit_type);
152 char *
data,
size_t *data_len)
182 char *
data,
size_t *data_len)
208 char *
data,
size_t *data_len)
259 *
type = VAEncPackedHeaderRawData;
269 *
type = VAEncPackedHeaderH264_SEI;
289 VAEncSequenceParameterBufferH264 *vseq =
ctx->codec_sequence_params;
290 VAEncPictureParameterBufferH264 *vpic =
ctx->codec_picture_params;
292 memset(
sps, 0,
sizeof(*
sps));
293 memset(
pps, 0,
sizeof(*
pps));
295 sps->nal_unit_header.nal_ref_idc = 3;
302 sps->constraint_set1_flag = 1;
305 sps->constraint_set3_flag =
ctx->gop_size == 1;
309 sps->constraint_set4_flag = 1;
310 sps->constraint_set5_flag =
ctx->b_per_p == 0;
313 if (
ctx->gop_size == 1)
337 if (
level->constraint_set3_flag)
338 sps->constraint_set3_flag = 1;
342 "to any level: using level 6.2.\n");
347 sps->seq_parameter_set_id = 0;
348 sps->chroma_format_idc = 1;
350 sps->log2_max_frame_num_minus4 = 4;
351 sps->pic_order_cnt_type = 0;
352 sps->log2_max_pic_order_cnt_lsb_minus4 = 4;
357 sps->pic_height_in_map_units_minus1 = priv->
mb_height - 1;
359 sps->frame_mbs_only_flag = 1;
360 sps->direct_8x8_inference_flag = 1;
364 sps->frame_cropping_flag = 1;
366 sps->frame_crop_left_offset = 0;
367 sps->frame_crop_right_offset =
369 sps->frame_crop_top_offset = 0;
370 sps->frame_crop_bottom_offset =
373 sps->frame_cropping_flag = 0;
376 sps->vui_parameters_present_flag = 1;
382 { 1, 1 }, { 12, 11 }, { 10, 11 }, { 16, 11 },
383 { 40, 33 }, { 24, 11 }, { 20, 11 }, { 32, 11 },
384 { 80, 33 }, { 18, 11 }, { 15, 11 }, { 64, 33 },
385 { 160, 99 }, { 4, 3 }, { 3, 2 }, { 2, 1 },
391 if (num == sar_idc[
i].num &&
392 den == sar_idc[
i].den) {
393 sps->vui.aspect_ratio_idc =
i;
398 sps->vui.aspect_ratio_idc = 255;
399 sps->vui.sar_width = num;
400 sps->vui.sar_height = den;
402 sps->vui.aspect_ratio_info_present_flag = 1;
406 sps->vui.video_format = 5;
407 sps->vui.video_full_range_flag =
415 sps->vui.colour_description_present_flag = 1;
417 sps->vui.colour_description_present_flag)
418 sps->vui.video_signal_type_present_flag = 1;
421 sps->vui.chroma_loc_info_present_flag = 1;
422 sps->vui.chroma_sample_loc_type_top_field =
423 sps->vui.chroma_sample_loc_type_bottom_field =
427 sps->vui.timing_info_present_flag = 1;
431 sps->vui.fixed_frame_rate_flag = 1;
435 sps->vui.fixed_frame_rate_flag = 0;
442 sps->vui.nal_hrd_parameters_present_flag = 1;
471 (uint64_t)
ctx->hrd_params.initial_buffer_fullness /
472 ctx->hrd_params.buffer_size;
475 sps->vui.nal_hrd_parameters_present_flag = 0;
476 sps->vui.low_delay_hrd_flag = 1 -
sps->vui.fixed_frame_rate_flag;
479 sps->vui.bitstream_restriction_flag = 1;
480 sps->vui.motion_vectors_over_pic_boundaries_flag = 1;
481 sps->vui.log2_max_mv_length_horizontal = 15;
482 sps->vui.log2_max_mv_length_vertical = 15;
483 sps->vui.max_num_reorder_frames =
ctx->max_b_depth;
484 sps->vui.max_dec_frame_buffering =
ctx->max_b_depth + 1;
486 pps->nal_unit_header.nal_ref_idc = 3;
489 pps->pic_parameter_set_id = 0;
490 pps->seq_parameter_set_id = 0;
492 pps->entropy_coding_mode_flag =
496 if (!priv->
coder &&
pps->entropy_coding_mode_flag)
497 pps->entropy_coding_mode_flag = 0;
499 pps->num_ref_idx_l0_default_active_minus1 = 0;
500 pps->num_ref_idx_l1_default_active_minus1 = 0;
507 pps->more_rbsp_data = 0;
509 pps->more_rbsp_data = 1;
511 pps->transform_8x8_mode_flag = 1;
514 *vseq = (VAEncSequenceParameterBufferH264) {
515 .seq_parameter_set_id =
sps->seq_parameter_set_id,
516 .level_idc =
sps->level_idc,
517 .intra_period =
ctx->gop_size,
518 .intra_idr_period =
ctx->gop_size,
519 .ip_period =
ctx->b_per_p + 1,
521 .bits_per_second =
ctx->va_bit_rate,
522 .max_num_ref_frames =
sps->max_num_ref_frames,
523 .picture_width_in_mbs =
sps->pic_width_in_mbs_minus1 + 1,
524 .picture_height_in_mbs =
sps->pic_height_in_map_units_minus1 + 1,
527 .chroma_format_idc =
sps->chroma_format_idc,
528 .frame_mbs_only_flag =
sps->frame_mbs_only_flag,
529 .mb_adaptive_frame_field_flag =
sps->mb_adaptive_frame_field_flag,
530 .seq_scaling_matrix_present_flag =
sps->seq_scaling_matrix_present_flag,
531 .direct_8x8_inference_flag =
sps->direct_8x8_inference_flag,
532 .log2_max_frame_num_minus4 =
sps->log2_max_frame_num_minus4,
533 .pic_order_cnt_type =
sps->pic_order_cnt_type,
534 .log2_max_pic_order_cnt_lsb_minus4 =
sps->log2_max_pic_order_cnt_lsb_minus4,
535 .delta_pic_order_always_zero_flag =
sps->delta_pic_order_always_zero_flag,
538 .bit_depth_luma_minus8 =
sps->bit_depth_luma_minus8,
539 .bit_depth_chroma_minus8 =
sps->bit_depth_chroma_minus8,
541 .frame_cropping_flag =
sps->frame_cropping_flag,
542 .frame_crop_left_offset =
sps->frame_crop_left_offset,
543 .frame_crop_right_offset =
sps->frame_crop_right_offset,
544 .frame_crop_top_offset =
sps->frame_crop_top_offset,
545 .frame_crop_bottom_offset =
sps->frame_crop_bottom_offset,
547 .vui_parameters_present_flag =
sps->vui_parameters_present_flag,
550 .aspect_ratio_info_present_flag =
sps->vui.aspect_ratio_info_present_flag,
551 .timing_info_present_flag =
sps->vui.timing_info_present_flag,
552 .bitstream_restriction_flag =
sps->vui.bitstream_restriction_flag,
553 .log2_max_mv_length_horizontal =
sps->vui.log2_max_mv_length_horizontal,
554 .log2_max_mv_length_vertical =
sps->vui.log2_max_mv_length_vertical,
557 .aspect_ratio_idc =
sps->vui.aspect_ratio_idc,
558 .sar_width =
sps->vui.sar_width,
559 .sar_height =
sps->vui.sar_height,
560 .num_units_in_tick =
sps->vui.num_units_in_tick,
561 .time_scale =
sps->vui.time_scale,
564 *vpic = (VAEncPictureParameterBufferH264) {
566 .picture_id = VA_INVALID_ID,
567 .flags = VA_PICTURE_H264_INVALID,
570 .coded_buf = VA_INVALID_ID,
572 .pic_parameter_set_id =
pps->pic_parameter_set_id,
573 .seq_parameter_set_id =
pps->seq_parameter_set_id,
575 .pic_init_qp =
pps->pic_init_qp_minus26 + 26,
576 .num_ref_idx_l0_active_minus1 =
pps->num_ref_idx_l0_default_active_minus1,
577 .num_ref_idx_l1_active_minus1 =
pps->num_ref_idx_l1_default_active_minus1,
579 .chroma_qp_index_offset =
pps->chroma_qp_index_offset,
580 .second_chroma_qp_index_offset =
pps->second_chroma_qp_index_offset,
583 .entropy_coding_mode_flag =
pps->entropy_coding_mode_flag,
584 .weighted_pred_flag =
pps->weighted_pred_flag,
585 .weighted_bipred_idc =
pps->weighted_bipred_idc,
586 .constrained_intra_pred_flag =
pps->constrained_intra_pred_flag,
587 .transform_8x8_mode_flag =
pps->transform_8x8_mode_flag,
588 .deblocking_filter_control_present_flag =
589 pps->deblocking_filter_control_present_flag,
590 .redundant_pic_cnt_present_flag =
pps->redundant_pic_cnt_present_flag,
591 .pic_order_present_flag =
592 pps->bottom_field_pic_order_in_frame_present_flag,
593 .pic_scaling_matrix_present_flag =
pps->pic_scaling_matrix_present_flag,
660 if (
ctx->va_rc_mode == VA_RC_CBR)
676 .exact_match_flag = 1,
677 .broken_link_flag =
ctx->b_per_p > 0,
683 vpic->CurrPic = (VAPictureH264) {
696 href =
ref->priv_data;
698 vpic->ReferenceFrames[
i] = (VAPictureH264) {
699 .picture_id =
ref->recon_surface,
701 .flags = VA_PICTURE_H264_SHORT_TERM_REFERENCE,
707 vpic->ReferenceFrames[
i] = (VAPictureH264) {
708 .picture_id = VA_INVALID_ID,
709 .flags = VA_PICTURE_H264_INVALID,
742 for (j = n; j > 0; j--) {
747 rpl0[j] = rpl0[j - 1];
749 rpl0[j] = prev->
dpb[
i];
752 for (j = n; j > 0; j--) {
763 rpl0[j] = rpl0[j - 1];
765 rpl0[j] = prev->
dpb[
i];
767 for (j = n; j > 0; j--) {
778 rpl1[j] = rpl1[j - 1];
780 rpl1[j] = prev->
dpb[
i];
787 for (
i = 0;
i < n;
i++) {
788 if (rpl0[
i] != rpl1[
i])
799 for (
i = 0;
i < n;
i++) {
802 hn->frame_num,
hn->pic_order_cnt);
809 for (
i = 0;
i < n;
i++) {
812 hn->frame_num,
hn->pic_order_cnt);
848 ((1 << (4 +
sps->log2_max_frame_num_minus4)) - 1);
851 ((1 << (4 +
sps->log2_max_pic_order_cnt_lsb_minus4)) - 1);
864 int discard = 0, keep = 0;
870 if (prev->
dpb[
i] == pic->
dpb[j])
874 discard_list[discard] = prev->
dpb[
i];
886 for (
i = 0;
i < discard;
i++) {
911 if (pic->
refs[
i] != def_l0[
i])
936 int need_rplm_l0 = 0, need_rplm_l1 = 0;
943 if (pic->
refs[
i] != def_l0[n0])
947 if (pic->
refs[
i] != def_l1[n1])
1006 vslice->macroblock_info = VA_INVALID_ID;
1017 vslice->RefPicList0[
i].picture_id = VA_INVALID_ID;
1018 vslice->RefPicList0[
i].flags = VA_PICTURE_H264_INVALID;
1019 vslice->RefPicList1[
i].picture_id = VA_INVALID_ID;
1020 vslice->RefPicList1[
i].flags = VA_PICTURE_H264_INVALID;
1028 vslice->RefPicList0[0] = vpic->ReferenceFrames[0];
1033 vslice->RefPicList1[0] = vpic->ReferenceFrames[1];
1054 if (
ctx->va_rc_mode == VA_RC_CQP) {
1070 "%d / %d / %d for IDR- / P- / B-frames.\n",
1080 if (!
ctx->rc_mode->hrd) {
1087 const char *vaapi = VA_VERSION_S;
1095 driver = vaQueryVendorString(
ctx->hwctx->display);
1097 driver =
"unknown driver";
1106 "%s / VAAPI %s / %s", lavc, vaapi, driver);
1113 ctx->roi_quant_range = 51 + 6 * (
ctx->profile->depth - 8);
1122 8, 3, 1, 1, VAProfileH264ConstrainedBaseline },
1134 .default_quality = 20,
1140 .sequence_params_size =
sizeof(VAEncSequenceParameterBufferH264),
1143 .picture_params_size =
sizeof(VAEncPictureParameterBufferH264),
1146 .slice_params_size =
sizeof(VAEncSliceParameterBufferH264),
1149 .sequence_header_type = VAEncPackedHeaderSequence,
1152 .slice_header_type = VAEncPackedHeaderH264_Slice,
1176 "supported, using constrained baseline profile instead.\n");
1181 "is not supported.\n");
1186 "are not supported.\n");
1195 "are not supported.\n");
1201 "in 8-bit unsigned integer.\n", avctx->
level);
1205 ctx->desired_packed_headers =
1206 VA_ENC_PACKED_HEADER_SEQUENCE |
1207 VA_ENC_PACKED_HEADER_SLICE |
1208 VA_ENC_PACKED_HEADER_MISC;
1213 ctx->slice_block_height =
ctx->slice_block_width = 16;
1216 ctx->explicit_qp = priv->
qp;
1232 #define OFFSET(x) offsetof(VAAPIEncodeH264Context, x)
1233 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
1238 {
"qp",
"Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
1240 {
"quality",
"Set encode quality (trades off against speed, higher is faster)",
1242 {
"coder",
"Entropy coder type",
1249 {
"aud",
"Include AUD",
1252 {
"sei",
"Set SEI to include",
1255 0, INT_MAX,
FLAGS,
"sei" },
1256 {
"identifier",
"Include encoder version identifier",
1258 INT_MIN, INT_MAX,
FLAGS,
"sei" },
1259 {
"timing",
"Include timing parameters (buffering_period and pic_timing)",
1261 INT_MIN, INT_MAX,
FLAGS,
"sei" },
1262 {
"recovery_point",
"Include recovery points where appropriate",
1264 INT_MIN, INT_MAX,
FLAGS,
"sei" },
1266 {
"profile",
"Set profile (profile_idc and constraint_set*_flag)",
1270 #define PROFILE(name, value) name, NULL, 0, AV_OPT_TYPE_CONST, \
1271 { .i64 = value }, 0, 0, FLAGS, "profile"
1277 {
"level",
"Set level (level_idc)",
1281 #define LEVEL(name, value) name, NULL, 0, AV_OPT_TYPE_CONST, \
1282 { .i64 = value }, 0, 0, FLAGS, "level"
1284 {
LEVEL(
"1.1", 11) },
1285 {
LEVEL(
"1.2", 12) },
1286 {
LEVEL(
"1.3", 13) },
1288 {
LEVEL(
"2.1", 21) },
1289 {
LEVEL(
"2.2", 22) },
1291 {
LEVEL(
"3.1", 31) },
1292 {
LEVEL(
"3.2", 32) },
1294 {
LEVEL(
"4.1", 41) },
1295 {
LEVEL(
"4.2", 42) },
1297 {
LEVEL(
"5.1", 51) },
1298 {
LEVEL(
"5.2", 52) },
1300 {
LEVEL(
"6.1", 61) },
1301 {
LEVEL(
"6.2", 62) },
1311 {
"i_qfactor",
"1" },
1312 {
"i_qoffset",
"0" },
1313 {
"b_qfactor",
"6/5" },
1314 {
"b_qoffset",
"0" },
1328 .
name =
"h264_vaapi",
1346 .wrapper_name =
"vaapi",
static float hn(int n, EqParameter *param, float fs)
static const AVCodecDefault defaults[]
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Libavcodec external API header.
#define FF_PROFILE_H264_HIGH
#define FF_PROFILE_H264_EXTENDED
#define FF_PROFILE_UNKNOWN
#define FF_PROFILE_H264_HIGH_444
#define FF_PROFILE_H264_CAVLC_444
#define FF_PROFILE_H264_HIGH_422
#define FF_COMPRESSION_DEFAULT
#define FF_PROFILE_H264_CONSTRAINED_BASELINE
#define FF_PROFILE_H264_HIGH_10_INTRA
#define FF_PROFILE_H264_MAIN
#define FF_PROFILE_H264_HIGH_444_INTRA
#define FF_PROFILE_H264_HIGH_422_INTRA
#define FF_PROFILE_H264_HIGH_444_PREDICTIVE
#define FF_PROFILE_H264_HIGH_10
#define FF_PROFILE_H264_BASELINE
static av_cold int init(AVCodecContext *avctx)
void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
int ff_cbs_insert_unit_content(CodedBitstreamFragment *frag, int position, CodedBitstreamUnitType type, void *content, AVBufferRef *content_buf)
Insert a new unit into a fragment with the given content.
void ff_cbs_fragment_reset(CodedBitstreamFragment *frag)
Free the units contained in a fragment as well as the fragment's own data buffer, but not the units a...
int ff_cbs_write_fragment_data(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Write the content of the fragment to its own internal buffer.
int ff_cbs_init(CodedBitstreamContext **ctx_ptr, enum AVCodecID codec_id, void *log_ctx)
Create and initialise a new context for the given codec.
void ff_cbs_fragment_free(CodedBitstreamFragment *frag)
Free the units array of a fragment in addition to what ff_cbs_fragment_reset does.
static int FUNC() pps(CodedBitstreamContext *ctx, RWContext *rw, H264RawPPS *current)
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
static int FUNC() sei(CodedBitstreamContext *ctx, RWContext *rw, H264RawSEI *current)
static int FUNC() aud(CodedBitstreamContext *ctx, RWContext *rw, H264RawAUD *current)
int ff_cbs_sei_add_message(CodedBitstreamContext *ctx, CodedBitstreamFragment *au, int prefix, uint32_t payload_type, void *payload_data, AVBufferRef *payload_buf)
Add an SEI message to an access unit.
common internal and external API header
#define FFSWAP(type, a, b)
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_CODEC_CAP_HARDWARE
Codec is backed by a hardware implementation.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_EOF
End of file.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_VERBOSE
Detailed information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
#define LIBAVUTIL_VERSION_INT
H.264 common definitions.
const H264LevelDescriptor * ff_h264_guess_level(int profile_idc, int64_t bitrate, int framerate, int width, int height, int max_dec_frame_buffering)
Guess the level of a stream from some parameters.
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
const AVCodecHWConfigInternal *const ff_vaapi_encode_hw_configs[]
int ff_vaapi_encode_receive_packet(AVCodecContext *avctx, AVPacket *pkt)
av_cold int ff_vaapi_encode_init(AVCodecContext *avctx)
av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static enum AVPixelFormat pix_fmts[]
@ AVCHROMA_LOC_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_JPEG
Full range content.
AVPixelFormat
Pixel format.
static const uint8_t header[24]
@ SEI_TYPE_RECOVERY_POINT
@ SEI_TYPE_USER_DATA_UNREGISTERED
@ SEI_TYPE_BUFFERING_PERIOD
#define FF_ARRAY_ELEMS(a)
Describe the class of an AVClass context structure.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
main external API structure.
int width
picture width / height.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
float b_quant_offset
qscale offset between IP and B-frames
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
float b_quant_factor
qscale factor between IP and B-frames If > 0 then the last P-frame quantizer will be used (q= lastp_q...
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
int64_t bit_rate
the average bitrate
enum AVColorSpace colorspace
YUV colorspace type.
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
enum AVChromaLocation chroma_sample_location
This defines the location of chroma samples.
float i_quant_factor
qscale factor between P- and I-frames If > 0 then the last P-frame quantizer will be used (q = lastp_...
float i_quant_offset
qscale offset between P and I-frames
const char * name
Name of the codec implementation.
Rational number (pair of numerator and denominator).
Context structure for coded bitstream operations.
Coded bitstream fragment structure, combining one or more units.
size_t data_bit_padding
The number of bits which should be ignored in the final byte.
size_t data_size
The number of bytes in the bitstream.
uint8_t * data
Pointer to the bitstream form of this fragment.
H264RawNALUnitHeader nal_unit_header
uint8_t dpb_output_delay_length_minus1
uint8_t time_offset_length
uint8_t cbr_flag[H264_MAX_CPB_CNT]
uint32_t bit_rate_value_minus1[H264_MAX_CPB_CNT]
uint32_t cpb_size_value_minus1[H264_MAX_CPB_CNT]
uint8_t cpb_removal_delay_length_minus1
uint8_t initial_cpb_removal_delay_length_minus1
uint8_t seq_parameter_set_id
struct H264RawSEIBufferingPeriod::@27 nal
uint32_t initial_cpb_removal_delay_offset[H264_MAX_CPB_CNT]
uint32_t initial_cpb_removal_delay[H264_MAX_CPB_CNT]
uint32_t cpb_removal_delay
uint16_t recovery_frame_cnt
H264RawSliceHeader header
uint8_t uuid_iso_iec_11578[16]
char * sei_identifier_string
VAAPIEncodeContext common
H264RawSEIPicTiming sei_pic_timing
H264RawSEIRecoveryPoint sei_recovery_point
SEIRawUserDataUnregistered sei_identifier
CodedBitstreamFragment current_access_unit
int sei_cbr_workaround_needed
H264RawSEIBufferingPeriod sei_buffering_period
CodedBitstreamContext * cbc
void * codec_picture_params
struct VAAPIEncodePicture * refs[MAX_PICTURE_REFERENCES]
VASurfaceID recon_surface
struct VAAPIEncodePicture * dpb[MAX_DPB_SIZE]
struct VAAPIEncodePicture * prev
void * codec_slice_params
const VAAPIEncodeProfile * profiles
static int ref[MAX_W *MAX_W]
#define VAAPI_ENCODE_COMMON_OPTIONS
#define VAAPI_ENCODE_RC_OPTIONS
@ FLAG_NON_IDR_KEY_PICTURES
@ FLAG_B_PICTURE_REFERENCES
static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)
AVCodec ff_h264_vaapi_encoder
static int vaapi_encode_h264_write_sequence_header(AVCodecContext *avctx, char *data, size_t *data_len)
static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
static const VAAPIEncodeType vaapi_encode_type_h264
static int vaapi_encode_h264_write_slice_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice, char *data, size_t *data_len)
static av_cold int vaapi_encode_h264_close(AVCodecContext *avctx)
static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
static const VAAPIEncodeProfile vaapi_encode_h264_profiles[]
static void vaapi_encode_h264_default_ref_pic_list(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodePicture **rpl0, VAAPIEncodePicture **rpl1, int *rpl_size)
static const AVOption vaapi_encode_h264_options[]
static const uint8_t vaapi_encode_h264_sei_identifier_uuid[16]
#define LEVEL(name, value)
static const AVCodecDefault vaapi_encode_h264_defaults[]
#define PROFILE(name, value)
static int vaapi_encode_h264_write_extra_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, int index, int *type, char *data, size_t *data_len)
static const AVClass vaapi_encode_h264_class
static int vaapi_encode_h264_add_nal(AVCodecContext *avctx, CodedBitstreamFragment *au, void *nal_unit)
static av_cold int vaapi_encode_h264_configure(AVCodecContext *avctx)
static int vaapi_encode_h264_init_slice_params(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice)
static int vaapi_encode_h264_write_access_unit(AVCodecContext *avctx, char *data, size_t *data_len, CodedBitstreamFragment *au)