20 #include <va/va_enc_hevc.h>
35 #define MAX_ST_REF_PIC_SETS 32
36 #define MAX_DPB_PICS 16
189 VAEncMiscParameterRateControl
rc;
192 VAEncMiscParameterBuffer
misc;
193 VAEncMiscParameterHRD
hrd;
202 #define vseq_var(name) vseq->name, name
203 #define vseq_field(name) vseq->seq_fields.bits.name, name
204 #define vpic_var(name) vpic->name, name
205 #define vpic_field(name) vpic->pic_fields.bits.name, name
206 #define vslice_var(name) vslice->name, name
207 #define vslice_field(name) vslice->slice_fields.bits.name, name
208 #define mseq_var(name) mseq->name, name
209 #define mslice_var(name) mslice->name, name
210 #define mstrps_var(name) mstrps->name, name
215 u(1, 0, forbidden_zero_bit);
216 u(6, nal_unit_type, nal_unit_type);
217 u(6, 0, nuh_layer_id);
218 u(3, 1, nuh_temporal_id_plus1);
223 u(1, 1, rbsp_stop_one_bit);
225 u(1, 0, rbsp_alignment_zero_bit);
237 u(2, 0, general_profile_space);
241 for (j = 0; j < 32; j++) {
242 u(1,
mseq_var(general_profile_compatibility_flag[j]));
245 u(1,
mseq_var(general_progressive_source_flag));
246 u(1,
mseq_var(general_interlaced_source_flag));
247 u(1,
mseq_var(general_non_packed_constraint_flag));
248 u(1,
mseq_var(general_frame_only_constraint_flag));
255 u(23, 0, general_reserved_zero_43bits);
256 u(20, 0, general_reserved_zero_43bits);
259 if (vseq->general_profile_idc >= 1 && vseq->general_profile_idc <= 5) {
262 u(1, 0, general_reserved_zero_bit);
282 u(1, 1, vps_base_layer_internal_flag);
283 u(1, 1, vps_base_layer_available_flag);
285 u(3,
mseq_var(vps_max_sub_layers_minus1));
286 u(1,
mseq_var(vps_temporal_id_nesting_flag));
288 u(16, 0xffff, vps_reserved_0xffff_16bits);
292 u(1,
mseq_var(vps_sub_layer_ordering_info_present_flag));
295 i <= mseq->vps_max_sub_layers_minus1; i++) {
296 ue(
mseq_var(vps_max_dec_pic_buffering_minus1[i]));
298 ue(
mseq_var(vps_max_latency_increase_plus1[i]));
305 u(1,
mseq_var(layer_id_included_flag[i][j]));
308 u(1,
mseq_var(vps_timing_info_present_flag));
310 u(1, 0, put_bits_hack_zero_bit);
312 u(1, 0, put_bits_hack_zero_bit);
314 u(1,
mseq_var(vps_poc_proportional_to_timing_flag));
318 ue(0, vps_num_hrd_parameters);
321 u(1, 0, vps_extension_flag);
333 u(1,
mstrps_var(inter_ref_pic_set_prediction_flag));
336 av_assert0(0 &&
"inter ref pic set prediction not supported");
358 u(1,
mseq_var(aspect_ratio_info_present_flag));
367 u(1, 0, overscan_info_present_flag);
369 u(1,
mseq_var(video_signal_type_present_flag));
373 u(1,
mseq_var(colour_description_present_flag));
381 u(1, 0, chroma_loc_info_present_flag);
382 u(1, 0, neutral_chroma_indication_flag);
383 u(1, 0, field_seq_flag);
384 u(1, 0, frame_field_info_present_flag);
385 u(1, 0, default_display_window_flag);
386 u(1, 0, vui_timing_info_present_flag);
387 u(1, 0, bitstream_restriction_flag_flag);
402 u(3,
mseq_var(sps_max_sub_layers_minus1));
403 u(1,
mseq_var(sps_temporal_id_nesting_flag));
409 if (vseq->seq_fields.bits.chroma_format_idc == 3)
410 u(1, 0, separate_colour_plane_flag);
426 ue(
mseq_var(log2_max_pic_order_cnt_lsb_minus4));
428 u(1,
mseq_var(sps_sub_layer_ordering_info_present_flag));
431 i <= mseq->sps_max_sub_layers_minus1; i++) {
432 ue(
mseq_var(sps_max_dec_pic_buffering_minus1[i]));
434 ue(
mseq_var(sps_max_latency_increase_plus1[i]));
437 ue(
vseq_var(log2_min_luma_coding_block_size_minus3));
438 ue(
vseq_var(log2_diff_max_min_luma_coding_block_size));
439 ue(
vseq_var(log2_min_transform_block_size_minus2));
440 ue(
vseq_var(log2_diff_max_min_transform_block_size));
441 ue(
vseq_var(max_transform_hierarchy_depth_inter));
442 ue(
vseq_var(max_transform_hierarchy_depth_intra));
445 if (vseq->seq_fields.bits.scaling_list_enabled_flag) {
446 u(1, 0, sps_scaling_list_data_present_flag);
450 u(1,
vseq_field(sample_adaptive_offset_enabled_flag));
453 if (vseq->seq_fields.bits.pcm_enabled_flag) {
454 u(4,
vseq_var(pcm_sample_bit_depth_luma_minus1));
455 u(4,
vseq_var(pcm_sample_bit_depth_chroma_minus1));
456 ue(
vseq_var(log2_min_pcm_luma_coding_block_size_minus3));
457 ue(vseq->log2_max_pcm_luma_coding_block_size_minus3 -
458 vseq->log2_min_pcm_luma_coding_block_size_minus3,
459 log2_diff_max_min_pcm_luma_coding_block_size);
468 u(1,
mseq_var(long_term_ref_pics_present_flag));
470 ue(0, num_long_term_ref_pics_sps);
474 u(1,
vseq_field(strong_intra_smoothing_enabled_flag));
476 u(1,
mseq_var(vui_parameters_present_flag));
481 u(1, 0, sps_extension_present_flag);
496 ue(vpic->slice_pic_parameter_set_id, pps_pic_parameter_set_id);
499 u(1,
vpic_field(dependent_slice_segments_enabled_flag));
500 u(1,
mseq_var(output_flag_present_flag));
501 u(3,
mseq_var(num_extra_slice_header_bits));
505 ue(
vpic_var(num_ref_idx_l0_default_active_minus1));
506 ue(
vpic_var(num_ref_idx_l1_default_active_minus1));
508 se(vpic->pic_init_qp - 26, init_qp_minus26);
514 if (vpic->pic_fields.bits.cu_qp_delta_enabled_flag)
520 u(1,
mseq_var(pps_slice_chroma_qp_offsets_present_flag));
525 u(1,
vpic_field(entropy_coding_sync_enabled_flag));
527 if (vpic->pic_fields.bits.tiles_enabled_flag) {
532 for (i = 0; i < vpic->num_tile_columns_minus1; i++)
534 for (i = 0; i < vpic->num_tile_rows_minus1; i++)
537 u(1,
vpic_field(loop_filter_across_tiles_enabled_flag));
540 u(1,
vpic_field(pps_loop_filter_across_slices_enabled_flag));
541 u(1,
mseq_var(deblocking_filter_control_present_flag));
543 u(1,
mseq_var(deblocking_filter_override_enabled_flag));
544 u(1,
mseq_var(pps_deblocking_filter_disabled_flag));
551 u(1, 0, pps_scaling_list_data_present_flag);
554 u(1,
mseq_var(lists_modification_present_flag));
555 ue(
vpic_var(log2_parallel_merge_level_minus2));
556 u(1, 0, slice_segment_header_extension_present_flag);
557 u(1, 0, pps_extension_present_flag);
580 vpic->nal_unit_type <= 23)
586 if (vpic->pic_fields.bits.dependent_slice_segments_enabled_flag)
591 if (!vslice->slice_fields.bits.dependent_slice_segment_flag) {
597 u(1, 1, pic_output_flag);
598 if (vseq->seq_fields.bits.separate_colour_plane_flag)
605 slice_pic_order_cnt_lsb);
621 if (vseq->seq_fields.bits.sps_temporal_mvp_enabled_flag) {
625 if (vseq->seq_fields.bits.sample_adaptive_offset_enabled_flag) {
627 if (!vseq->seq_fields.bits.separate_colour_plane_flag &&
628 vseq->seq_fields.bits.chroma_format_idc != 0) {
635 if (vslice->slice_fields.bits.num_ref_idx_active_override_flag) {
652 if (vslice->slice_fields.bits.slice_temporal_mvp_enabled_flag) {
655 ue(vpic->collocated_ref_pic_index, collocated_ref_idx);
657 if ((vpic->pic_fields.bits.weighted_pred_flag &&
659 (vpic->pic_fields.bits.weighted_bipred_flag &&
664 ue(5 - vslice->max_num_merge_cand, five_minus_max_num_merge_cand);
673 u(1, 0, cu_chroma_qp_offset_enabled_flag);
680 if (!vslice->slice_fields.bits.slice_deblocking_filter_disabled_flag) {
685 if (vpic->pic_fields.bits.pps_loop_filter_across_slices_enabled_flag &&
686 (vslice->slice_fields.bits.slice_sao_luma_flag ||
687 vslice->slice_fields.bits.slice_sao_chroma_flag ||
688 vslice->slice_fields.bits.slice_deblocking_filter_disabled_flag)) {
689 u(1,
vslice_field(slice_loop_filter_across_slices_enabled_flag));
692 if (vpic->pic_fields.bits.tiles_enabled_flag ||
693 vpic->pic_fields.bits.entropy_coding_sync_enabled_flag) {
702 u(1, 1, alignment_bit_equal_to_one);
704 u(1, 0, alignment_bit_equal_to_zero);
708 char *
data,
size_t *data_len)
714 size_t nal_len, bit_len, bit_pos, next_len;
724 next_len = bit_len - bit_pos;
737 next_len = bit_len - bit_pos;
750 next_len = bit_len - bit_pos;
765 char *
data,
size_t *data_len)
792 vseq->general_profile_idc = 1;
793 vseq->general_tier_flag = 0;
795 vseq->general_level_idc = avctx->
level * 3;
797 vseq->intra_period = 0;
798 vseq->intra_idr_period = 0;
804 vseq->seq_fields.bits.chroma_format_idc = 1;
805 vseq->seq_fields.bits.separate_colour_plane_flag = 0;
806 vseq->seq_fields.bits.bit_depth_luma_minus8 =
808 vseq->seq_fields.bits.bit_depth_chroma_minus8 =
815 vseq->log2_min_luma_coding_block_size_minus3 = 0;
816 vseq->log2_diff_max_min_luma_coding_block_size = 2;
818 vseq->log2_min_transform_block_size_minus2 = 0;
819 vseq->log2_diff_max_min_transform_block_size = 3;
821 vseq->max_transform_hierarchy_depth_inter = 3;
822 vseq->max_transform_hierarchy_depth_intra = 3;
824 vseq->vui_parameters_present_flag = 0;
826 vseq->bits_per_second = avctx->
bit_rate;
836 vseq->intra_idr_period = vseq->intra_period;
837 vseq->ip_period = ctx->
b_per_p + 1;
841 vpic->decoded_curr_pic.picture_id = VA_INVALID_ID;
842 vpic->decoded_curr_pic.flags = VA_PICTURE_HEVC_INVALID;
845 vpic->reference_frames[i].picture_id = VA_INVALID_ID;
846 vpic->reference_frames[i].flags = VA_PICTURE_HEVC_INVALID;
849 vpic->collocated_ref_pic_index = 0xff;
851 vpic->last_picture = 0;
855 vpic->diff_cu_qp_delta_depth = 0;
856 vpic->pps_cb_qp_offset = 0;
857 vpic->pps_cr_qp_offset = 0;
861 vpic->log2_parallel_merge_level_minus2 = 0;
864 vpic->ctu_max_bitsize_allowed = 0;
866 vpic->num_ref_idx_l0_default_active_minus1 = 0;
867 vpic->num_ref_idx_l1_default_active_minus1 = 0;
869 vpic->slice_pic_parameter_set_id = 0;
871 vpic->pic_fields.bits.screen_content_flag = 0;
872 vpic->pic_fields.bits.enable_gpu_weighted_prediction = 0;
875 vpic->pic_fields.bits.cu_qp_delta_enabled_flag =
889 for (i = 0; i < 32; i++) {
891 (i == vseq->general_profile_idc);
976 vpic->decoded_curr_pic.pic_order_cnt =
978 vpic->decoded_curr_pic.flags = 0;
980 for (i = 0; i < pic->
nb_refs; i++) {
984 vpic->reference_frames[i].pic_order_cnt =
986 vpic->reference_frames[i].flags =
988 VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE : 0) |
990 VA_PICTURE_HEVC_RPS_ST_CURR_AFTER : 0);
993 vpic->reference_frames[i].picture_id = VA_INVALID_ID;
994 vpic->reference_frames[i].flags = VA_PICTURE_HEVC_INVALID;
1002 vpic->pic_fields.bits.idr_pic_flag = 1;
1003 vpic->pic_fields.bits.coding_type = 1;
1004 vpic->pic_fields.bits.reference_pic_flag = 1;
1008 vpic->pic_fields.bits.idr_pic_flag = 0;
1009 vpic->pic_fields.bits.coding_type = 1;
1010 vpic->pic_fields.bits.reference_pic_flag = 1;
1014 vpic->pic_fields.bits.idr_pic_flag = 0;
1015 vpic->pic_fields.bits.coding_type = 2;
1016 vpic->pic_fields.bits.reference_pic_flag = 1;
1020 vpic->pic_fields.bits.idr_pic_flag = 0;
1021 vpic->pic_fields.bits.coding_type = 3;
1022 vpic->pic_fields.bits.reference_pic_flag = 0;
1055 switch (pic->
type) {
1070 vslice->slice_pic_parameter_set_id = vpic->slice_pic_parameter_set_id;
1075 vslice->ref_pic_list0[i].picture_id = VA_INVALID_ID;
1076 vslice->ref_pic_list0[i].flags = VA_PICTURE_HEVC_INVALID;
1077 vslice->ref_pic_list1[i].picture_id = VA_INVALID_ID;
1078 vslice->ref_pic_list1[i].flags = VA_PICTURE_HEVC_INVALID;
1087 vslice->num_ref_idx_l0_active_minus1 = 0;
1088 vslice->ref_pic_list0[0] = vpic->reference_frames[0];
1094 vslice->num_ref_idx_l1_active_minus1 = 0;
1095 vslice->ref_pic_list1[0] = vpic->reference_frames[1];
1098 vslice->max_num_merge_cand = 5;
1101 vslice->slice_qp_delta = priv->
fixed_qp_b - vpic->pic_init_qp;
1103 vslice->slice_qp_delta = priv->
fixed_qp_p - vpic->pic_init_qp;
1105 vslice->slice_qp_delta = priv->
fixed_qp_idr - vpic->pic_init_qp;
1107 vslice->slice_fields.bits.last_slice_of_pic_flag = 1;
1129 for (i = 0; i < pic->
nb_refs; i++) {
1130 if (pic->
refs[i] == st)
1186 "%d / %d / %d for IDR- / P- / B-frames.\n",
1210 .sequence_params_size =
sizeof(VAEncSequenceParameterBufferHEVC),
1213 .picture_params_size =
sizeof(VAEncPictureParameterBufferHEVC),
1216 .slice_params_size =
sizeof(VAEncSliceParameterBufferHEVC),
1219 .sequence_header_type = VAEncPackedHeaderSequence,
1222 .slice_header_type = VAEncPackedHeaderHEVC_Slice,
1239 #ifdef VA_RT_FORMAT_YUV420_10BPP
1245 "supported with this VAAPI version.\n");
1261 VA_ENC_PACKED_HEADER_SEQUENCE |
1262 VA_ENC_PACKED_HEADER_SLICE;
1270 #define OFFSET(x) (offsetof(VAAPIEncodeContext, codec_options_data) + \
1271 offsetof(VAAPIEncodeH265Options, x))
1272 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
1274 {
"qp",
"Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
1285 {
"i_qfactor",
"1" },
1286 {
"i_qoffset",
"0" },
1287 {
"b_qfactor",
"6/5" },
1288 {
"b_qoffset",
"0" },
1300 .
name =
"hevc_vaapi",
1309 .priv_class = &vaapi_encode_h265_class,
1311 .
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
unsigned int slice_segment_address
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
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
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)