20 #include <va/va_enc_h264.h>
168 #define vseq_var(name) vseq->name, name
169 #define vseq_field(name) vseq->seq_fields.bits.name, name
170 #define vvui_field(name) vseq->vui_fields.bits.name, name
171 #define vpic_var(name) vpic->name, name
172 #define vpic_field(name) vpic->pic_fields.bits.name, name
173 #define vslice_var(name) vslice->name, name
174 #define vslice_field(name) vslice->slice_fields.bits.name, name
175 #define mseq_var(name) mseq->name, name
176 #define mslice_var(name) mslice->name, name
179 int nal_unit_type,
int nal_ref_idc)
181 u(1, 0, forbidden_zero_bit);
182 u(2, nal_ref_idc, nal_ref_idc);
183 u(5, nal_unit_type, nal_unit_type);
188 u(1, 1, rbsp_stop_one_bit);
190 u(1, 0, rbsp_alignment_zero_bit);
202 if (vseq->vui_fields.bits.aspect_ratio_info_present_flag) {
204 if (vseq->aspect_ratio_idc == 255) {
210 u(1,
mseq_var(overscan_info_present_flag));
212 u(1,
mseq_var(overscan_appropriate_flag));
214 u(1,
mseq_var(video_signal_type_present_flag));
218 u(1,
mseq_var(colour_description_present_flag));
226 u(1,
mseq_var(chroma_loc_info_present_flag));
228 ue(
mseq_var(chroma_sample_loc_type_top_field));
229 ue(
mseq_var(chroma_sample_loc_type_bottom_field));
233 if (vseq->vui_fields.bits.timing_info_present_flag) {
239 u(1,
mseq_var(nal_hrd_parameters_present_flag));
249 u(5,
mseq_var(initial_cpb_removal_delay_length_minus1));
250 u(5,
mseq_var(cpb_removal_delay_length_minus1));
251 u(5,
mseq_var(dpb_output_delay_length_minus1));
254 u(1,
mseq_var(vcl_hrd_parameters_present_flag));
256 av_assert0(0 &&
"vcl hrd parameters not supported");
265 if (vseq->vui_fields.bits.bitstream_restriction_flag) {
266 u(1,
mseq_var(motion_vectors_over_pic_boundaries_flag));
293 u(2, 0, reserved_zero_2bits);
306 if (vseq->seq_fields.bits.chroma_format_idc == 3)
307 u(1,
mseq_var(separate_colour_plane_flag));
312 u(1,
mseq_var(qpprime_y_zero_transform_bypass_flag));
315 if (vseq->seq_fields.bits.seq_scaling_matrix_present_flag) {
316 av_assert0(0 &&
"scaling matrices not supported");
323 if (vseq->seq_fields.bits.pic_order_cnt_type == 0) {
325 }
else if (vseq->seq_fields.bits.pic_order_cnt_type == 1) {
326 u(1,
mseq_var(delta_pic_order_always_zero_flag));
329 ue(
vseq_var(num_ref_frames_in_pic_order_cnt_cycle));
331 for (i = 0; i < vseq->num_ref_frames_in_pic_order_cnt_cycle; i++)
336 u(1,
mseq_var(gaps_in_frame_num_allowed_flag));
338 ue(vseq->picture_width_in_mbs - 1, pic_width_in_mbs_minus1);
339 ue(vseq->picture_height_in_mbs - 1, pic_height_in_mbs_minus1);
342 if (!vseq->seq_fields.bits.frame_mbs_only_flag)
348 if (vseq->frame_cropping_flag) {
355 u(1,
vseq_var(vui_parameters_present_flag));
356 if (vseq->vui_parameters_present_flag)
375 u(1,
mseq_var(bottom_field_pic_order_in_frame_present_flag));
380 av_assert0(0 &&
"slice groups not supported");
389 se(vpic->pic_init_qp - 26, pic_init_qp_minus26);
393 u(1,
vpic_field(deblocking_filter_control_present_flag));
399 if (vpic->pic_fields.bits.pic_scaling_matrix_present_flag) {
400 av_assert0(0 &&
"scaling matrices not supported");
424 ue(vslice->macroblock_address, first_mb_in_slice);
432 u(4 + vseq->seq_fields.bits.log2_max_frame_num_minus4,
434 ((1 << (4 + vseq->seq_fields.bits.log2_max_frame_num_minus4)) - 1)),
437 if (!vseq->seq_fields.bits.frame_mbs_only_flag) {
443 if (vpic->pic_fields.bits.idr_pic_flag) {
447 if (vseq->seq_fields.bits.pic_order_cnt_type == 0) {
448 u(4 + vseq->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4,
456 if (vseq->seq_fields.bits.pic_order_cnt_type == 1 &&
457 !vseq->seq_fields.bits.delta_pic_order_always_zero_flag) {
465 if (vpic->pic_fields.bits.redundant_pic_cnt_present_flag) {
476 u(1,
vslice_var(num_ref_idx_active_override_flag));
477 if (vslice->num_ref_idx_active_override_flag) {
487 if (vslice->slice_type % 5 != 2 && vslice->slice_type % 5 != 4) {
488 u(1,
mslice_var(ref_pic_list_modification_flag_l0));
493 if (vslice->slice_type % 5 == 1) {
494 u(1,
mslice_var(ref_pic_list_modification_flag_l1));
501 if ((vpic->pic_fields.bits.weighted_pred_flag &&
504 (vpic->pic_fields.bits.weighted_bipred_idc == 1 &&
506 av_assert0(0 &&
"prediction weights not supported");
510 vpic->pic_fields.bits.reference_pic_flag);
512 if (vpic->pic_fields.bits.idr_pic_flag) {
516 u(1,
mslice_var(adaptive_ref_pic_marking_mode_flag));
523 if (vpic->pic_fields.bits.entropy_coding_mode_flag &&
537 if (vpic->pic_fields.bits.deblocking_filter_control_present_flag) {
539 if (vslice->disable_deblocking_filter_idc != 1) {
547 av_assert0(0 &&
"slice groups not supported");
567 mseq_var(initial_cpb_removal_delay));
569 mseq_var(initial_cpb_removal_delay_offset));
573 av_assert0(0 &&
"vcl hrd parameters not supported");
589 2 * vseq->num_units_in_tick * priv->
cpb_delay,
592 2 * vseq->num_units_in_tick * priv->
dpb_delay,
600 for (i = 0; i < num_clock_ts; i++) {
601 u(1, 0, clock_timestamp_flag[i]);
612 const char *vaapi = VA_VERSION_S;
613 const char *driver = vaQueryVendorString(ctx->
hwctx->
display);
619 0x59, 0x94, 0x8b, 0x28, 0x11, 0xec, 0x45, 0xaf,
620 0x96, 0x75, 0x19, 0xd4, 0x1f, 0xea, 0xa9, 0x4d,
623 for (i = 0; i < 16; i++)
624 u(8, uuid[i], uuid_iso_iec_11578);
626 snprintf(tmp,
sizeof(tmp),
"%s / VAAPI %s / %s", lavc, vaapi, driver);
627 for (i = 0; i <
sizeof(
tmp) && tmp[i]; i++)
628 u(8, tmp[i], user_data_payload_byte);
638 int payload_type, payload_size, i;
645 for (payload_type = 0; payload_type < 64; payload_type++) {
646 switch (payload_type) {
668 write_payload(&payload_bits, ctx, pic);
670 write_u(&payload_bits, 1, 1, bit_equal_to_one);
672 write_u(&payload_bits, 1, 0, bit_equal_to_zero);
677 u(8, payload_type, last_payload_type_byte);
678 u(8, payload_size, last_payload_size_byte);
679 for (i = 0; i < payload_size; i++)
680 u(8, payload[i] & 0xff, sei_payload);
687 char *
data,
size_t *data_len)
693 size_t nal_len, bit_len, bit_pos, next_len;
703 next_len = bit_len - bit_pos;
716 next_len = bit_len - bit_pos;
731 char *
data,
size_t *data_len)
750 char *
data,
size_t *data_len)
757 if (index == 0 && ctx->
va_rc_mode == VA_RC_CBR) {
758 *type = VAEncPackedHeaderH264_SEI;
785 vseq->seq_parameter_set_id = 0;
787 vseq->level_idc = avctx->
level;
789 vseq->max_num_ref_frames = 1 + (avctx->
max_b_frames > 0);
791 vseq->picture_width_in_mbs = priv->
mb_width;
792 vseq->picture_height_in_mbs = priv->
mb_height;
794 vseq->seq_fields.bits.chroma_format_idc = 1;
795 vseq->seq_fields.bits.frame_mbs_only_flag = 1;
796 vseq->seq_fields.bits.direct_8x8_inference_flag = 1;
797 vseq->seq_fields.bits.log2_max_frame_num_minus4 = 4;
798 vseq->seq_fields.bits.pic_order_cnt_type = 0;
799 vseq->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4 =
804 vseq->frame_cropping_flag = 1;
806 vseq->frame_crop_left_offset = 0;
807 vseq->frame_crop_right_offset =
809 vseq->frame_crop_top_offset = 0;
810 vseq->frame_crop_bottom_offset =
813 vseq->frame_cropping_flag = 0;
816 vseq->vui_parameters_present_flag = 1;
818 vseq->vui_fields.bits.aspect_ratio_info_present_flag = 1;
823 vseq->aspect_ratio_idc = 1;
825 vseq->aspect_ratio_idc = 255;
844 vseq->vui_fields.bits.bitstream_restriction_flag = 1;
848 vseq->vui_fields.bits.log2_max_mv_length_horizontal = 16;
849 vseq->vui_fields.bits.log2_max_mv_length_vertical = 16;
854 vseq->bits_per_second = avctx->
bit_rate;
856 vseq->vui_fields.bits.timing_info_present_flag = 1;
904 vseq->intra_period = avctx->
gop_size;
905 vseq->intra_idr_period = avctx->
gop_size;
906 vseq->ip_period = ctx->
b_per_p + 1;
910 vpic->CurrPic.picture_id = VA_INVALID_ID;
911 vpic->CurrPic.flags = VA_PICTURE_H264_INVALID;
914 vpic->ReferenceFrames[i].picture_id = VA_INVALID_ID;
915 vpic->ReferenceFrames[i].flags = VA_PICTURE_H264_INVALID;
918 vpic->coded_buf = VA_INVALID_ID;
920 vpic->pic_parameter_set_id = 0;
921 vpic->seq_parameter_set_id = 0;
923 vpic->num_ref_idx_l0_active_minus1 = 0;
924 vpic->num_ref_idx_l1_active_minus1 = 0;
926 vpic->pic_fields.bits.entropy_coding_mode_flag =
927 opt->coder ? ((avctx->profile & 0xff) != 66) : 0;
928 vpic->pic_fields.bits.weighted_pred_flag = 0;
929 vpic->pic_fields.bits.weighted_bipred_idc = 0;
930 vpic->pic_fields.bits.transform_8x8_mode_flag =
931 ((avctx->profile & 0xff) >= 100);
933 vpic->pic_init_qp = priv->fixed_qp_idr;
937 mseq->profile_idc = avctx->profile & 0xff;
940 mseq->constraint_set1_flag = 1;
942 mseq->constraint_set3_flag = 1;
973 vpic->frame_num = vpic->frame_num &
974 ((1 << (4 + vseq->seq_fields.bits.log2_max_frame_num_minus4)) - 1);
977 vpic->CurrPic.frame_idx = vpic->frame_num;
978 vpic->CurrPic.flags = 0;
982 for (i = 0; i < pic->
nb_refs; i++) {
987 vpic->ReferenceFrames[i].flags = VA_PICTURE_H264_SHORT_TERM_REFERENCE;
992 vpic->ReferenceFrames[i].picture_id = VA_INVALID_ID;
993 vpic->ReferenceFrames[i].flags = VA_PICTURE_H264_INVALID;
1030 switch (pic->
type) {
1052 vslice->macroblock_address = 0;
1055 vslice->macroblock_info = VA_INVALID_ID;
1057 vslice->pic_parameter_set_id = vpic->pic_parameter_set_id;
1061 ((1 << (4 + vseq->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4)) - 1);
1064 vslice->RefPicList0[i].picture_id = VA_INVALID_ID;
1065 vslice->RefPicList0[i].flags = VA_PICTURE_H264_INVALID;
1066 vslice->RefPicList1[i].picture_id = VA_INVALID_ID;
1067 vslice->RefPicList1[i].flags = VA_PICTURE_H264_INVALID;
1076 vslice->num_ref_idx_l0_active_minus1 = 0;
1077 vslice->RefPicList0[0] = vpic->ReferenceFrames[0];
1083 vslice->num_ref_idx_l1_active_minus1 = 0;
1084 vslice->RefPicList1[0] = vpic->ReferenceFrames[1];
1088 vslice->slice_qp_delta = priv->
fixed_qp_b - vpic->pic_init_qp;
1090 vslice->slice_qp_delta = priv->
fixed_qp_p - vpic->pic_init_qp;
1092 vslice->slice_qp_delta = priv->
fixed_qp_idr - vpic->pic_init_qp;
1094 vslice->direct_spatial_mv_pred_flag = 1;
1122 "%d / %d / %d for IDR- / P- / B-frames.\n",
1133 ctx->
va_rc_mode == VA_RC_CBR ?
"constant" :
"variable",
1151 .sequence_params_size =
sizeof(VAEncSequenceParameterBufferH264),
1154 .picture_params_size =
sizeof(VAEncPictureParameterBufferH264),
1157 .slice_params_size =
sizeof(VAEncSliceParameterBufferH264),
1160 .sequence_header_type = VAEncPackedHeaderSequence,
1163 .slice_header_type = VAEncPackedHeaderH264_Slice,
1175 ctx->
codec = &vaapi_encode_type_h264;
1180 "supported, using constrained baseline profile instead.\n");
1183 ctx->
va_profile = VAProfileH264ConstrainedBaseline;
1187 "doesn't support encoding with B frames, disabling them.\n");
1195 "is not supported.\n");
1204 "are not supported.\n");
1213 "are not supported.\n");
1221 #if VA_CHECK_VERSION(0, 39, 2)
1225 "supported with this VAAPI version.\n");
1244 VA_ENC_PACKED_HEADER_SEQUENCE |
1245 VA_ENC_PACKED_HEADER_SLICE |
1246 VA_ENC_PACKED_HEADER_MISC;
1254 #define OFFSET(x) (offsetof(VAAPIEncodeContext, codec_options_data) + \
1255 offsetof(VAAPIEncodeH264Options, x))
1256 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
1258 {
"qp",
"Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
1260 {
"quality",
"Set encode quality (trades off against speed, higher is faster)",
1262 {
"low_power",
"Use low-power encoding mode (experimental: only supported "
1263 "on some platforms, does not support all features)",
1265 {
"coder",
"Entropy coder type",
1275 {
"profile",
"100" },
1280 {
"i_qfactor",
"1" },
1281 {
"i_qoffset",
"0" },
1282 {
"b_qfactor",
"6/5" },
1283 {
"b_qoffset",
"0" },
1296 .
name =
"h264_vaapi",
1305 .priv_class = &vaapi_encode_h264_class,
1307 .
defaults = vaapi_encode_h264_defaults,
#define FF_PROFILE_H264_MAIN
unsigned int colour_primaries
static const VAAPIEncodeType vaapi_encode_type_h264
#define FF_PROFILE_H264_CAVLC_444
#define FF_COMPRESSION_DEFAULT
static av_cold int vaapi_encode_h264_configure(AVCodecContext *avctx)
VAEntrypoint va_entrypoint
ptrdiff_t const GLvoid * data
static void vaapi_encode_h264_write_slice_header2(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice)
char codec_options_data[0]
#define AV_LOG_WARNING
Something somehow does not look correct.
int64_t bit_rate
the average bitrate
#define LIBAVUTIL_VERSION_INT
unsigned int cpb_removal_delay_length_minus1
av_cold int ff_vaapi_encode_init(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
int max_b_frames
maximum number of B-frames between non-B-frames Note: The output will be delayed by max_b_frames+1 re...
char overscan_info_present_flag
av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
#define FF_PROFILE_H264_INTRA
static void vaapi_encode_h264_write_pic_timing(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodePicture *pic)
unsigned int max_num_reorder_frames
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel...
char adaptive_ref_pic_marking_mode_flag
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
void * codec_sequence_params
VAEncMiscParameterHRD hrd
float i_quant_offset
qscale offset between P and I-frames
struct VAAPIEncodeContext::@129 hrd_params
static const AVClass vaapi_encode_h264_class
#define FF_PROFILE_H264_HIGH_444_PREDICTIVE
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
unsigned int va_packed_headers
static void vaapi_encode_h264_write_nal_header(PutBitContext *pbc, int nal_unit_type, int nal_ref_idc)
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 AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
static int vaapi_encode_h264_write_extra_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, int index, int *type, char *data, size_t *data_len)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static const AVOption vaapi_encode_h264_options[]
#define FF_PROFILE_H264_BASELINE
unsigned int cpb_size_value_minus1[32]
static const AVCodecDefault vaapi_encode_h264_defaults[]
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...
char delta_pic_order_always_zero_flag
static void vaapi_encode_h264_write_vui(PutBitContext *pbc, VAAPIEncodeContext *ctx)
unsigned int transfer_characteristics
char constraint_set3_flag
static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)
char fixed_frame_rate_flag
unsigned int bit_rate_scale
char constraint_set5_flag
static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
#define AVERROR_EOF
End of file.
#define FF_PROFILE_H264_EXTENDED
static void vaapi_encode_h264_write_pps(PutBitContext *pbc, VAAPIEncodeContext *ctx)
VASurfaceID recon_surface
unsigned int cpb_cnt_minus1
H.264 common definitions.
unsigned int initial_cpb_removal_delay_offset
buffering period (H.264, D.1.1)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int ff_vaapi_encode2(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *input_image, int *got_packet)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
char constraint_set2_flag
#define FF_PROFILE_H264_HIGH_422
#define FF_PROFILE_H264_HIGH
simple assert() macros that are a bit more flexible than ISO C assert().
char motion_vectors_over_pic_boundaries_flag
const char * name
Name of the codec implementation.
float i_quant_factor
qscale factor between P- and I-frames If > 0 then the last P-frame quantizer will be used (q = lastp_...
char ref_pic_list_modification_flag_l0
char colour_description_present_flag
static int vaapi_encode_h264_init_sequence_params(AVCodecContext *avctx)
void * codec_picture_params
#define write_u(pbc, width, value, name)
char constraint_set1_flag
static int put_bits_count(PutBitContext *s)
char gaps_in_frame_num_allowed_flag
unsigned int video_format
common internal API header
static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB]
AVCodec ff_h264_vaapi_encoder
static void vaapi_encode_h264_write_sps(PutBitContext *pbc, VAAPIEncodeContext *ctx)
static void vaapi_encode_h264_write_buffering_period(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodePicture *pic)
char constraint_set0_flag
static int vaapi_encode_h264_write_sequence_header(AVCodecContext *avctx, char *data, size_t *data_len)
unsigned int max_bits_per_mb_denom
unsigned int cpb_size_scale
int width
picture width / height.
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
#define FF_PROFILE_UNKNOWN
char separate_colour_plane_flag
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
unsigned int va_rt_format
unsigned int num_slice_groups_minus1
unsigned int time_offset_length
void * codec_picture_params
char video_full_range_flag
static int vaapi_encode_h264_write_slice_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice, char *data, size_t *data_len)
#define FF_ARRAY_ELEMS(a)
char vcl_hrd_parameters_present_flag
VADisplay display
The VADisplay handle, to be filled by the user.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
struct VAAPIEncodePicture * refs[MAX_PICTURE_REFERENCES]
unsigned int colour_plane_id
const struct VAAPIEncodeType * codec
Libavcodec external API header.
unsigned int chroma_sample_loc_type_top_field
unsigned int slice_group_map_type
#define FF_PROFILE_H264_HIGH_422_INTRA
unsigned int bit_rate_value_minus1[32]
main external API structure.
char long_term_reference_flag
char chroma_loc_info_present_flag
char ref_pic_list_modification_flag_l1
char no_output_of_prior_pics_flag
#define FF_PROFILE_H264_HIGH_10_INTRA
Describe the class of an AVClass context structure.
unsigned int dpb_output_delay_length_minus1
enum AVColorSpace colorspace
YUV colorspace type.
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
char bottom_field_pic_order_in_frame_present_flag
unsigned int redundant_pic_cnt
#define FF_PROFILE_H264_HIGH_444
float b_quant_offset
qscale offset between IP and B-frames
static enum AVPixelFormat pix_fmts[]
unsigned int nal_unit_type
unsigned int initial_cpb_removal_delay_length_minus1
VAAPIEncodeH264MiscSliceParams misc_slice_params
char video_signal_type_present_flag
unsigned int chroma_sample_loc_type_bottom_field
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
static int vaapi_encode_h264_init_slice_params(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice)
common internal api header.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static int ref[MAX_W *MAX_W]
unsigned int initial_cpb_removal_delay
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void vaapi_encode_h264_write_sei(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodePicture *pic)
char qpprime_y_zero_transform_bypass_flag
void * codec_slice_params
unsigned int max_dec_pic_buffering
#define FF_PROFILE_H264_HIGH_444_INTRA
char nal_hrd_parameters_present_flag
unsigned int max_bytes_per_pic_denom
static void vaapi_encode_h264_write_trailing_rbsp(PutBitContext *pbc)
static const AVCodecDefault defaults[]
#define FF_PROFILE_H264_CONSTRAINED
#define FF_PROFILE_H264_CONSTRAINED_BASELINE
char overscan_appropriate_flag
char pic_struct_present_flag
#define FF_PROFILE_H264_HIGH_10
AVPixelFormat
Pixel format.
static void vaapi_encode_h264_write_identifier(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodePicture *pic)
VAAPIEncodeH264MiscSequenceParams misc_sequence_params
unsigned int matrix_coefficients
int64_t rc_max_rate
maximum bitrate
int ff_vaapi_encode_h26x_nal_unit_to_byte_stream(uint8_t *dst, size_t *dst_bit_len, uint8_t *src, size_t src_bit_len)
AVVAAPIDeviceContext * hwctx
char constraint_set4_flag