20 #include <va/va_enc_hevc.h>
35 #define MAX_ST_REF_PIC_SETS 32
36 #define MAX_DPB_PICS 16
188 VAEncMiscParameterRateControl
rc;
191 VAEncMiscParameterBuffer
misc;
192 VAEncMiscParameterHRD
hrd;
201 #define vseq_var(name) vseq->name, name
202 #define vseq_field(name) vseq->seq_fields.bits.name, name
203 #define vpic_var(name) vpic->name, name
204 #define vpic_field(name) vpic->pic_fields.bits.name, name
205 #define vslice_var(name) vslice->name, name
206 #define vslice_field(name) vslice->slice_fields.bits.name, name
207 #define mseq_var(name) mseq->name, name
208 #define mslice_var(name) mslice->name, name
209 #define mstrps_var(name) mstrps->name, name
214 u(1, 0, forbidden_zero_bit);
215 u(6, nal_unit_type, nal_unit_type);
216 u(6, 0, nuh_layer_id);
217 u(3, 1, nuh_temporal_id_plus1);
222 u(1, 1, rbsp_stop_one_bit);
224 u(1, 0, rbsp_alignment_zero_bit);
236 u(2, 0, general_profile_space);
240 for (j = 0; j < 32; j++) {
241 u(1,
mseq_var(general_profile_compatibility_flag[j]));
244 u(1,
mseq_var(general_progressive_source_flag));
245 u(1,
mseq_var(general_interlaced_source_flag));
246 u(1,
mseq_var(general_non_packed_constraint_flag));
247 u(1,
mseq_var(general_frame_only_constraint_flag));
254 u(23, 0, general_reserved_zero_43bits);
255 u(20, 0, general_reserved_zero_43bits);
258 if (vseq->general_profile_idc >= 1 && vseq->general_profile_idc <= 5) {
261 u(1, 0, general_reserved_zero_bit);
281 u(1, 1, vps_base_layer_internal_flag);
282 u(1, 1, vps_base_layer_available_flag);
284 u(3,
mseq_var(vps_max_sub_layers_minus1));
285 u(1,
mseq_var(vps_temporal_id_nesting_flag));
287 u(16, 0xffff, vps_reserved_0xffff_16bits);
291 u(1,
mseq_var(vps_sub_layer_ordering_info_present_flag));
294 i <= mseq->vps_max_sub_layers_minus1; i++) {
295 ue(
mseq_var(vps_max_dec_pic_buffering_minus1[i]));
297 ue(
mseq_var(vps_max_latency_increase_plus1[i]));
304 u(1,
mseq_var(layer_id_included_flag[i][j]));
307 u(1,
mseq_var(vps_timing_info_present_flag));
309 u(1, 0, put_bits_hack_zero_bit);
311 u(1, 0, put_bits_hack_zero_bit);
313 u(1,
mseq_var(vps_poc_proportional_to_timing_flag));
317 ue(0, vps_num_hrd_parameters);
320 u(1, 0, vps_extension_flag);
332 u(1,
mstrps_var(inter_ref_pic_set_prediction_flag));
335 av_assert0(0 &&
"inter ref pic set prediction not supported");
357 u(1,
mseq_var(aspect_ratio_info_present_flag));
366 u(1, 0, overscan_info_present_flag);
368 u(1,
mseq_var(video_signal_type_present_flag));
372 u(1,
mseq_var(colour_description_present_flag));
380 u(1, 0, chroma_loc_info_present_flag);
381 u(1, 0, neutral_chroma_indication_flag);
382 u(1, 0, field_seq_flag);
383 u(1, 0, frame_field_info_present_flag);
384 u(1, 0, default_display_window_flag);
385 u(1, 0, vui_timing_info_present_flag);
386 u(1, 0, bitstream_restriction_flag_flag);
401 u(3,
mseq_var(sps_max_sub_layers_minus1));
402 u(1,
mseq_var(sps_temporal_id_nesting_flag));
408 if (vseq->seq_fields.bits.chroma_format_idc == 3)
409 u(1, 0, separate_colour_plane_flag);
425 ue(
mseq_var(log2_max_pic_order_cnt_lsb_minus4));
427 u(1,
mseq_var(sps_sub_layer_ordering_info_present_flag));
430 i <= mseq->sps_max_sub_layers_minus1; i++) {
431 ue(
mseq_var(sps_max_dec_pic_buffering_minus1[i]));
433 ue(
mseq_var(sps_max_latency_increase_plus1[i]));
436 ue(
vseq_var(log2_min_luma_coding_block_size_minus3));
437 ue(
vseq_var(log2_diff_max_min_luma_coding_block_size));
438 ue(
vseq_var(log2_min_transform_block_size_minus2));
439 ue(
vseq_var(log2_diff_max_min_transform_block_size));
440 ue(
vseq_var(max_transform_hierarchy_depth_inter));
441 ue(
vseq_var(max_transform_hierarchy_depth_intra));
444 if (vseq->seq_fields.bits.scaling_list_enabled_flag) {
445 u(1, 0, sps_scaling_list_data_present_flag);
449 u(1,
vseq_field(sample_adaptive_offset_enabled_flag));
452 if (vseq->seq_fields.bits.pcm_enabled_flag) {
453 u(4,
vseq_var(pcm_sample_bit_depth_luma_minus1));
454 u(4,
vseq_var(pcm_sample_bit_depth_chroma_minus1));
455 ue(
vseq_var(log2_min_pcm_luma_coding_block_size_minus3));
456 ue(vseq->log2_max_pcm_luma_coding_block_size_minus3 -
457 vseq->log2_min_pcm_luma_coding_block_size_minus3,
458 log2_diff_max_min_pcm_luma_coding_block_size);
467 u(1,
mseq_var(long_term_ref_pics_present_flag));
469 ue(0, num_long_term_ref_pics_sps);
473 u(1,
vseq_field(strong_intra_smoothing_enabled_flag));
475 u(1,
mseq_var(vui_parameters_present_flag));
480 u(1, 0, sps_extension_present_flag);
495 ue(vpic->slice_pic_parameter_set_id, pps_pic_parameter_set_id);
498 u(1,
vpic_field(dependent_slice_segments_enabled_flag));
499 u(1,
mseq_var(output_flag_present_flag));
500 u(3,
mseq_var(num_extra_slice_header_bits));
504 ue(
vpic_var(num_ref_idx_l0_default_active_minus1));
505 ue(
vpic_var(num_ref_idx_l1_default_active_minus1));
507 se(vpic->pic_init_qp - 26, init_qp_minus26);
513 if (vpic->pic_fields.bits.cu_qp_delta_enabled_flag)
519 u(1,
mseq_var(pps_slice_chroma_qp_offsets_present_flag));
524 u(1,
vpic_field(entropy_coding_sync_enabled_flag));
526 if (vpic->pic_fields.bits.tiles_enabled_flag) {
531 for (i = 0; i < vpic->num_tile_columns_minus1; i++)
533 for (i = 0; i < vpic->num_tile_rows_minus1; i++)
536 u(1,
vpic_field(loop_filter_across_tiles_enabled_flag));
539 u(1,
vpic_field(pps_loop_filter_across_slices_enabled_flag));
540 u(1,
mseq_var(deblocking_filter_control_present_flag));
542 u(1,
mseq_var(deblocking_filter_override_enabled_flag));
543 u(1,
mseq_var(pps_deblocking_filter_disabled_flag));
550 u(1, 0, pps_scaling_list_data_present_flag);
553 u(1,
mseq_var(lists_modification_present_flag));
554 ue(
vpic_var(log2_parallel_merge_level_minus2));
555 u(1, 0, slice_segment_header_extension_present_flag);
556 u(1, 0, pps_extension_present_flag);
579 vpic->nal_unit_type <= 23)
585 if (vpic->pic_fields.bits.dependent_slice_segments_enabled_flag)
590 if (!vslice->slice_fields.bits.dependent_slice_segment_flag) {
596 u(1, 1, pic_output_flag);
597 if (vseq->seq_fields.bits.separate_colour_plane_flag)
604 slice_pic_order_cnt_lsb);
620 if (vseq->seq_fields.bits.sps_temporal_mvp_enabled_flag) {
624 if (vseq->seq_fields.bits.sample_adaptive_offset_enabled_flag) {
626 if (!vseq->seq_fields.bits.separate_colour_plane_flag &&
627 vseq->seq_fields.bits.chroma_format_idc != 0) {
634 if (vslice->slice_fields.bits.num_ref_idx_active_override_flag) {
651 if (vslice->slice_fields.bits.slice_temporal_mvp_enabled_flag) {
654 ue(vpic->collocated_ref_pic_index, collocated_ref_idx);
656 if ((vpic->pic_fields.bits.weighted_pred_flag &&
658 (vpic->pic_fields.bits.weighted_bipred_flag &&
663 ue(5 - vslice->max_num_merge_cand, five_minus_max_num_merge_cand);
672 u(1, 0, cu_chroma_qp_offset_enabled_flag);
679 if (!vslice->slice_fields.bits.slice_deblocking_filter_disabled_flag) {
684 if (vpic->pic_fields.bits.pps_loop_filter_across_slices_enabled_flag &&
685 (vslice->slice_fields.bits.slice_sao_luma_flag ||
686 vslice->slice_fields.bits.slice_sao_chroma_flag ||
687 vslice->slice_fields.bits.slice_deblocking_filter_disabled_flag)) {
688 u(1,
vslice_field(slice_loop_filter_across_slices_enabled_flag));
691 if (vpic->pic_fields.bits.tiles_enabled_flag ||
692 vpic->pic_fields.bits.entropy_coding_sync_enabled_flag) {
701 u(1, 1, alignment_bit_equal_to_one);
703 u(1, 0, alignment_bit_equal_to_zero);
707 char *
data,
size_t *data_len)
713 size_t nal_len, bit_len, bit_pos, next_len;
723 next_len = bit_len - bit_pos;
736 next_len = bit_len - bit_pos;
749 next_len = bit_len - bit_pos;
764 char *
data,
size_t *data_len)
791 vseq->general_profile_idc = 1;
792 vseq->general_tier_flag = 0;
794 vseq->general_level_idc = avctx->
level * 3;
796 vseq->intra_period = 0;
797 vseq->intra_idr_period = 0;
803 vseq->seq_fields.bits.chroma_format_idc = 1;
804 vseq->seq_fields.bits.separate_colour_plane_flag = 0;
805 vseq->seq_fields.bits.bit_depth_luma_minus8 =
807 vseq->seq_fields.bits.bit_depth_chroma_minus8 =
814 vseq->log2_min_luma_coding_block_size_minus3 = 0;
815 vseq->log2_diff_max_min_luma_coding_block_size = 2;
817 vseq->log2_min_transform_block_size_minus2 = 0;
818 vseq->log2_diff_max_min_transform_block_size = 3;
820 vseq->max_transform_hierarchy_depth_inter = 3;
821 vseq->max_transform_hierarchy_depth_intra = 3;
823 vseq->vui_parameters_present_flag = 0;
825 vseq->bits_per_second = avctx->
bit_rate;
834 vseq->intra_period = avctx->
gop_size;
835 vseq->intra_idr_period = avctx->
gop_size;
836 vseq->ip_period = ctx->
b_per_p + 1;
840 vpic->decoded_curr_pic.picture_id = VA_INVALID_ID;
841 vpic->decoded_curr_pic.flags = VA_PICTURE_HEVC_INVALID;
844 vpic->reference_frames[i].picture_id = VA_INVALID_ID;
845 vpic->reference_frames[i].flags = VA_PICTURE_HEVC_INVALID;
848 vpic->collocated_ref_pic_index = 0xff;
850 vpic->last_picture = 0;
854 vpic->diff_cu_qp_delta_depth = 0;
855 vpic->pps_cb_qp_offset = 0;
856 vpic->pps_cr_qp_offset = 0;
860 vpic->log2_parallel_merge_level_minus2 = 0;
863 vpic->ctu_max_bitsize_allowed = 0;
865 vpic->num_ref_idx_l0_default_active_minus1 = 0;
866 vpic->num_ref_idx_l1_default_active_minus1 = 0;
868 vpic->slice_pic_parameter_set_id = 0;
870 vpic->pic_fields.bits.screen_content_flag = 0;
871 vpic->pic_fields.bits.enable_gpu_weighted_prediction = 0;
874 vpic->pic_fields.bits.cu_qp_delta_enabled_flag =
888 for (i = 0; i < 32; i++) {
890 (i == vseq->general_profile_idc);
975 vpic->decoded_curr_pic.pic_order_cnt =
977 vpic->decoded_curr_pic.flags = 0;
979 for (i = 0; i < pic->
nb_refs; i++) {
983 vpic->reference_frames[i].pic_order_cnt =
985 vpic->reference_frames[i].flags =
987 VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE : 0) |
989 VA_PICTURE_HEVC_RPS_ST_CURR_AFTER : 0);
992 vpic->reference_frames[i].picture_id = VA_INVALID_ID;
993 vpic->reference_frames[i].flags = VA_PICTURE_HEVC_INVALID;
1001 vpic->pic_fields.bits.idr_pic_flag = 1;
1002 vpic->pic_fields.bits.coding_type = 1;
1003 vpic->pic_fields.bits.reference_pic_flag = 1;
1007 vpic->pic_fields.bits.idr_pic_flag = 0;
1008 vpic->pic_fields.bits.coding_type = 1;
1009 vpic->pic_fields.bits.reference_pic_flag = 1;
1013 vpic->pic_fields.bits.idr_pic_flag = 0;
1014 vpic->pic_fields.bits.coding_type = 2;
1015 vpic->pic_fields.bits.reference_pic_flag = 1;
1019 vpic->pic_fields.bits.idr_pic_flag = 0;
1020 vpic->pic_fields.bits.coding_type = 3;
1021 vpic->pic_fields.bits.reference_pic_flag = 0;
1051 vslice->slice_segment_address = 0;
1054 switch (pic->
type) {
1069 vslice->slice_pic_parameter_set_id = vpic->slice_pic_parameter_set_id;
1074 vslice->ref_pic_list0[i].picture_id = VA_INVALID_ID;
1075 vslice->ref_pic_list0[i].flags = VA_PICTURE_HEVC_INVALID;
1076 vslice->ref_pic_list1[i].picture_id = VA_INVALID_ID;
1077 vslice->ref_pic_list1[i].flags = VA_PICTURE_HEVC_INVALID;
1086 vslice->num_ref_idx_l0_active_minus1 = 0;
1087 vslice->ref_pic_list0[0] = vpic->reference_frames[0];
1093 vslice->num_ref_idx_l1_active_minus1 = 0;
1094 vslice->ref_pic_list1[0] = vpic->reference_frames[1];
1097 vslice->max_num_merge_cand = 5;
1100 vslice->slice_qp_delta = priv->
fixed_qp_b - vpic->pic_init_qp;
1102 vslice->slice_qp_delta = priv->
fixed_qp_p - vpic->pic_init_qp;
1104 vslice->slice_qp_delta = priv->
fixed_qp_idr - vpic->pic_init_qp;
1106 vslice->slice_fields.bits.last_slice_of_pic_flag = 1;
1128 for (i = 0; i < pic->
nb_refs; i++) {
1129 if (pic->
refs[i] == st)
1185 "%d / %d / %d for IDR- / P- / B-frames.\n",
1196 ctx->
va_rc_mode == VA_RC_CBR ?
"constant" :
"variable",
1211 .sequence_params_size =
sizeof(VAEncSequenceParameterBufferHEVC),
1214 .picture_params_size =
sizeof(VAEncPictureParameterBufferHEVC),
1217 .slice_params_size =
sizeof(VAEncSliceParameterBufferHEVC),
1220 .sequence_header_type = VAEncPackedHeaderSequence,
1223 .slice_header_type = VAEncPackedHeaderHEVC_Slice,
1240 #ifdef VA_RT_FORMAT_YUV420_10BPP
1246 "supported with this VAAPI version.\n");
1265 VA_ENC_PACKED_HEADER_SEQUENCE |
1266 VA_ENC_PACKED_HEADER_SLICE;
1274 #define OFFSET(x) (offsetof(VAAPIEncodeContext, codec_options_data) + \
1275 offsetof(VAAPIEncodeH265Options, x))
1276 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
1278 {
"qp",
"Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
1289 {
"i_qfactor",
"1" },
1290 {
"i_qoffset",
"0" },
1291 {
"b_qfactor",
"6/5" },
1292 {
"b_qoffset",
"0" },
1304 .
name =
"hevc_vaapi",
1313 .priv_class = &vaapi_encode_h265_class,
1315 .
defaults = vaapi_encode_h265_defaults,
char pps_deblocking_filter_disabled_flag
char general_progressive_source_flag
unsigned int conf_win_bottom_offset
unsigned int delta_poc_s0_minus1[MAX_DPB_PICS]
#define MAX_ST_REF_PIC_SETS
static void vaapi_encode_h265_write_vps(PutBitContext *pbc, VAAPIEncodeContext *ctx)
VAEntrypoint va_entrypoint
ptrdiff_t const GLvoid * data
char no_output_of_prior_pics_flag
unsigned int num_short_term_ref_pic_sets
int64_t bit_rate
the average bitrate
#define LIBAVUTIL_VERSION_INT
char deblocking_filter_control_present_flag
av_cold int ff_vaapi_encode_init(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
char long_term_ref_pics_present_flag
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...
static void vaapi_encode_h265_write_vui_parameters(PutBitContext *pbc, VAAPIEncodeContext *ctx)
char pps_slice_chroma_qp_offsets_present_flag
av_cold int ff_vaapi_encode_close(AVCodecContext *avctx)
unsigned int vps_num_ticks_poc_diff_minus1
static const AVClass vaapi_encode_h265_class
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 sps_sub_layer_ordering_info_present_flag
char vps_sub_layer_ordering_info_present_flag
VAAPIEncodeH265MiscSliceParams misc_slice_params
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
unsigned int video_parameter_set_id
void * codec_sequence_params
static const AVCodecDefault vaapi_encode_h265_defaults[]
float i_quant_offset
qscale offset between P and I-frames
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
unsigned int conf_win_top_offset
unsigned int va_packed_headers
char general_interlaced_source_flag
unsigned int video_format
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...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
unsigned int delta_poc_s1_minus1[MAX_DPB_PICS]
unsigned int seq_parameter_set_id
char general_non_packed_constraint_flag
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...
#define FF_PROFILE_HEVC_MAIN
unsigned int num_extra_slice_header_bits
struct VAAPIEncodeH265MiscSequenceParams::@133 lt_ref_pic
#define AV_LOG_VERBOSE
Detailed information.
VASurfaceID recon_surface
char vui_parameters_present_flag
unsigned int vps_max_dec_pic_buffering_minus1[MAX_LAYERS]
#define FF_PROFILE_HEVC_MAIN_10
unsigned int conf_win_right_offset
char layer_id_included_flag[MAX_LAYERS][64]
VAEncMiscParameterHRD hrd
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void vaapi_encode_h265_write_slice_header2(PutBitContext *pbc, VAAPIEncodeContext *ctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice)
unsigned int transfer_characteristics
static av_cold int vaapi_encode_h265_init(AVCodecContext *avctx)
VAEncMiscParameterRateControl rc
char lists_modification_present_flag
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. ...
unsigned int colour_primaries
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static int vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
simple assert() macros that are a bit more flexible than ISO C assert().
char general_profile_compatibility_flag[32]
VAAPIEncodeH265MiscSequenceParams misc_sequence_params
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_...
static const AVOption vaapi_encode_h265_options[]
struct VAAPIEncodeH265Context::@134 rc_params
#define vslice_field(name)
char vps_poc_proportional_to_timing_flag
void * codec_picture_params
unsigned int vps_time_scale
unsigned int vps_max_layers_minus1
static int put_bits_count(PutBitContext *s)
struct VAAPIEncodeH265Context::@135 hrd_params
static int vaapi_encode_h265_init_slice_params(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice)
common internal API header
char cabac_init_present_flag
unsigned int vps_max_num_reorder_pics[MAX_LAYERS]
char aspect_ratio_info_present_flag
static const VAAPIEncodeType vaapi_encode_type_h265
static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB]
int width
picture width / height.
char used_by_curr_pic_s0_flag[MAX_DPB_PICS]
#define FF_PROFILE_UNKNOWN
AVCodec ff_hevc_vaapi_encoder
enum AVColorPrimaries color_primaries
Chromaticity coordinates of the source primaries.
unsigned int va_rt_format
struct VAAPIEncodePicture * next
unsigned int log2_max_pic_order_cnt_lsb_minus4
void * codec_picture_params
unsigned int vps_max_layer_id
static int vaapi_encode_h265_init_picture_params(AVCodecContext *avctx, VAAPIEncodePicture *pic)
static void vaapi_encode_h265_write_pps(PutBitContext *pbc, VAAPIEncodeContext *ctx)
unsigned int sps_max_sub_layers_minus1
static void vaapi_encode_h265_write_sps(PutBitContext *pbc, VAAPIEncodeContext *ctx)
unsigned int conf_win_left_offset
char deblocking_filter_override_flag
#define FF_ARRAY_ELEMS(a)
unsigned int sps_max_dec_pic_buffering_minus1[MAX_LAYERS]
struct VAAPIEncodePicture * refs[MAX_PICTURE_REFERENCES]
static void vaapi_encode_h265_write_nal_unit_header(PutBitContext *pbc, int nal_unit_type)
char conformance_window_flag
static int vaapi_encode_h265_write_slice_header(AVCodecContext *avctx, VAAPIEncodePicture *pic, VAAPIEncodeSlice *slice, char *data, size_t *data_len)
const struct VAAPIEncodeType * codec
Libavcodec external API header.
char video_signal_type_present_flag
VAAPIEncodePicture * pic_start
unsigned int num_positive_pics
unsigned int vps_max_sub_layers_minus1
main external API structure.
unsigned int vps_max_latency_increase_plus1[MAX_LAYERS]
char used_by_curr_pic_s1_flag[MAX_DPB_PICS]
char vps_timing_info_present_flag
Describe the class of an AVClass context structure.
enum AVColorSpace colorspace
YUV colorspace type.
enum AVColorTransferCharacteristic color_trc
Color Transfer Characteristic.
char sps_temporal_id_nesting_flag
char short_term_ref_pic_set_sps_flag
VAEncMiscParameterBuffer misc
unsigned int sps_max_num_reorder_pics[MAX_LAYERS]
float b_quant_offset
qscale offset between IP and B-frames
unsigned int num_negative_pics
static enum AVPixelFormat pix_fmts[]
static int vaapi_encode_h265_write_sequence_header(AVCodecContext *avctx, char *data, size_t *data_len)
static void vaapi_encode_h265_write_st_ref_pic_set(PutBitContext *pbc, int st_rps_idx, VAAPIEncodeH265STRPS *mstrps)
char uniform_spacing_flag
int gop_size
the number of pictures in a group of pictures, or 0 for intra_only
VAAPIEncodeH265STRPS st_ref_pic_set
unsigned int vps_num_units_in_tick
unsigned int num_long_term_ref_pics_sps
char output_flag_present_flag
char video_full_range_flag
static av_cold int vaapi_encode_h265_configure(AVCodecContext *avctx)
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 vps_num_layer_sets_minus1
char deblocking_filter_override_enabled_flag
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void vaapi_encode_h265_write_profile_tier_level(PutBitContext *pbc, VAAPIEncodeContext *ctx)
char colour_description_present_flag
char inter_ref_pic_set_prediction_flag
unsigned int sps_max_latency_increase_plus1[MAX_LAYERS]
char used_by_curr_pic_lt_sps_flag
static const float matrix_coeffs[8]
char vps_temporal_id_nesting_flag
void * codec_slice_params
VAAPIEncodeH265STRPS st_ref_pic_set[MAX_ST_REF_PIC_SETS]
char slice_reserved_flag[8]
static void vaapi_encode_h265_write_rbsp_trailing_bits(PutBitContext *pbc)
unsigned int aspect_ratio_idc
unsigned int lt_ref_pic_poc_lsb_sps
char general_frame_only_constraint_flag
unsigned int short_term_ref_pic_idx
static const AVCodecDefault defaults[]
unsigned int matrix_coeffs
char first_slice_segment_in_pic_flag
AVPixelFormat
Pixel format.
char pps_slice_chroma_offset_list_enabled_flag
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)