Lines Matching refs:sps
287 H264RawSPS *sps = &priv->raw_sps; in vaapi_encode_h264_init_sequence_params() local
292 memset(sps, 0, sizeof(*sps)); in vaapi_encode_h264_init_sequence_params()
295 sps->nal_unit_header.nal_ref_idc = 3; in vaapi_encode_h264_init_sequence_params()
296 sps->nal_unit_header.nal_unit_type = H264_NAL_SPS; in vaapi_encode_h264_init_sequence_params()
298 sps->profile_idc = avctx->profile & 0xff; in vaapi_encode_h264_init_sequence_params()
302 sps->constraint_set1_flag = 1; in vaapi_encode_h264_init_sequence_params()
305 sps->constraint_set3_flag = ctx->gop_size == 1; in vaapi_encode_h264_init_sequence_params()
309 sps->constraint_set4_flag = 1; in vaapi_encode_h264_init_sequence_params()
310 sps->constraint_set5_flag = ctx->b_per_p == 0; in vaapi_encode_h264_init_sequence_params()
319 sps->level_idc = avctx->level; in vaapi_encode_h264_init_sequence_params()
329 level = ff_h264_guess_level(sps->profile_idc, in vaapi_encode_h264_init_sequence_params()
338 sps->constraint_set3_flag = 1; in vaapi_encode_h264_init_sequence_params()
339 sps->level_idc = level->level_idc; in vaapi_encode_h264_init_sequence_params()
343 sps->level_idc = 62; in vaapi_encode_h264_init_sequence_params()
347 sps->seq_parameter_set_id = 0; in vaapi_encode_h264_init_sequence_params()
348 sps->chroma_format_idc = 1; in vaapi_encode_h264_init_sequence_params()
350 sps->log2_max_frame_num_minus4 = 4; in vaapi_encode_h264_init_sequence_params()
351 sps->pic_order_cnt_type = 0; in vaapi_encode_h264_init_sequence_params()
352 sps->log2_max_pic_order_cnt_lsb_minus4 = 4; in vaapi_encode_h264_init_sequence_params()
354 sps->max_num_ref_frames = priv->dpb_frames; in vaapi_encode_h264_init_sequence_params()
356 sps->pic_width_in_mbs_minus1 = priv->mb_width - 1; in vaapi_encode_h264_init_sequence_params()
357 sps->pic_height_in_map_units_minus1 = priv->mb_height - 1; in vaapi_encode_h264_init_sequence_params()
359 sps->frame_mbs_only_flag = 1; in vaapi_encode_h264_init_sequence_params()
360 sps->direct_8x8_inference_flag = 1; in vaapi_encode_h264_init_sequence_params()
364 sps->frame_cropping_flag = 1; in vaapi_encode_h264_init_sequence_params()
366 sps->frame_crop_left_offset = 0; in vaapi_encode_h264_init_sequence_params()
367 sps->frame_crop_right_offset = in vaapi_encode_h264_init_sequence_params()
369 sps->frame_crop_top_offset = 0; in vaapi_encode_h264_init_sequence_params()
370 sps->frame_crop_bottom_offset = in vaapi_encode_h264_init_sequence_params()
373 sps->frame_cropping_flag = 0; in vaapi_encode_h264_init_sequence_params()
376 sps->vui_parameters_present_flag = 1; in vaapi_encode_h264_init_sequence_params()
393 sps->vui.aspect_ratio_idc = i; in vaapi_encode_h264_init_sequence_params()
398 sps->vui.aspect_ratio_idc = 255; in vaapi_encode_h264_init_sequence_params()
399 sps->vui.sar_width = num; in vaapi_encode_h264_init_sequence_params()
400 sps->vui.sar_height = den; in vaapi_encode_h264_init_sequence_params()
402 sps->vui.aspect_ratio_info_present_flag = 1; in vaapi_encode_h264_init_sequence_params()
406 sps->vui.video_format = 5; in vaapi_encode_h264_init_sequence_params()
407 sps->vui.video_full_range_flag = in vaapi_encode_h264_init_sequence_params()
409 sps->vui.colour_primaries = avctx->color_primaries; in vaapi_encode_h264_init_sequence_params()
410 sps->vui.transfer_characteristics = avctx->color_trc; in vaapi_encode_h264_init_sequence_params()
411 sps->vui.matrix_coefficients = avctx->colorspace; in vaapi_encode_h264_init_sequence_params()
415 sps->vui.colour_description_present_flag = 1; in vaapi_encode_h264_init_sequence_params()
417 sps->vui.colour_description_present_flag) in vaapi_encode_h264_init_sequence_params()
418 sps->vui.video_signal_type_present_flag = 1; in vaapi_encode_h264_init_sequence_params()
421 sps->vui.chroma_loc_info_present_flag = 1; in vaapi_encode_h264_init_sequence_params()
422 sps->vui.chroma_sample_loc_type_top_field = in vaapi_encode_h264_init_sequence_params()
423 sps->vui.chroma_sample_loc_type_bottom_field = in vaapi_encode_h264_init_sequence_params()
427 sps->vui.timing_info_present_flag = 1; in vaapi_encode_h264_init_sequence_params()
429 sps->vui.num_units_in_tick = avctx->framerate.den; in vaapi_encode_h264_init_sequence_params()
430 sps->vui.time_scale = 2 * avctx->framerate.num; in vaapi_encode_h264_init_sequence_params()
431 sps->vui.fixed_frame_rate_flag = 1; in vaapi_encode_h264_init_sequence_params()
433 sps->vui.num_units_in_tick = avctx->time_base.num; in vaapi_encode_h264_init_sequence_params()
434 sps->vui.time_scale = 2 * avctx->time_base.den; in vaapi_encode_h264_init_sequence_params()
435 sps->vui.fixed_frame_rate_flag = 0; in vaapi_encode_h264_init_sequence_params()
439 H264RawHRD *hrd = &sps->vui.nal_hrd_parameters; in vaapi_encode_h264_init_sequence_params()
442 sps->vui.nal_hrd_parameters_present_flag = 1; in vaapi_encode_h264_init_sequence_params()
467 bp->seq_parameter_set_id = sps->seq_parameter_set_id; in vaapi_encode_h264_init_sequence_params()
475 sps->vui.nal_hrd_parameters_present_flag = 0; in vaapi_encode_h264_init_sequence_params()
476 sps->vui.low_delay_hrd_flag = 1 - sps->vui.fixed_frame_rate_flag; in vaapi_encode_h264_init_sequence_params()
479 sps->vui.bitstream_restriction_flag = 1; in vaapi_encode_h264_init_sequence_params()
480 sps->vui.motion_vectors_over_pic_boundaries_flag = 1; in vaapi_encode_h264_init_sequence_params()
481 sps->vui.log2_max_mv_length_horizontal = 15; in vaapi_encode_h264_init_sequence_params()
482 sps->vui.log2_max_mv_length_vertical = 15; in vaapi_encode_h264_init_sequence_params()
483 sps->vui.max_num_reorder_frames = ctx->max_b_depth; in vaapi_encode_h264_init_sequence_params()
484 sps->vui.max_dec_frame_buffering = ctx->max_b_depth + 1; in vaapi_encode_h264_init_sequence_params()
493 !(sps->profile_idc == FF_PROFILE_H264_BASELINE || in vaapi_encode_h264_init_sequence_params()
494 sps->profile_idc == FF_PROFILE_H264_EXTENDED || in vaapi_encode_h264_init_sequence_params()
495 sps->profile_idc == FF_PROFILE_H264_CAVLC_444); in vaapi_encode_h264_init_sequence_params()
504 if (sps->profile_idc == FF_PROFILE_H264_BASELINE || in vaapi_encode_h264_init_sequence_params()
505 sps->profile_idc == FF_PROFILE_H264_EXTENDED || in vaapi_encode_h264_init_sequence_params()
506 sps->profile_idc == FF_PROFILE_H264_MAIN) { in vaapi_encode_h264_init_sequence_params()
515 .seq_parameter_set_id = sps->seq_parameter_set_id, in vaapi_encode_h264_init_sequence_params()
516 .level_idc = sps->level_idc, in vaapi_encode_h264_init_sequence_params()
522 .max_num_ref_frames = sps->max_num_ref_frames, in vaapi_encode_h264_init_sequence_params()
523 .picture_width_in_mbs = sps->pic_width_in_mbs_minus1 + 1, in vaapi_encode_h264_init_sequence_params()
524 .picture_height_in_mbs = sps->pic_height_in_map_units_minus1 + 1, in vaapi_encode_h264_init_sequence_params()
527 .chroma_format_idc = sps->chroma_format_idc, in vaapi_encode_h264_init_sequence_params()
528 .frame_mbs_only_flag = sps->frame_mbs_only_flag, in vaapi_encode_h264_init_sequence_params()
529 .mb_adaptive_frame_field_flag = sps->mb_adaptive_frame_field_flag, in vaapi_encode_h264_init_sequence_params()
530 .seq_scaling_matrix_present_flag = sps->seq_scaling_matrix_present_flag, in vaapi_encode_h264_init_sequence_params()
531 .direct_8x8_inference_flag = sps->direct_8x8_inference_flag, in vaapi_encode_h264_init_sequence_params()
532 .log2_max_frame_num_minus4 = sps->log2_max_frame_num_minus4, in vaapi_encode_h264_init_sequence_params()
533 .pic_order_cnt_type = sps->pic_order_cnt_type, in vaapi_encode_h264_init_sequence_params()
534 .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_pic_order_cnt_lsb_minus4, in vaapi_encode_h264_init_sequence_params()
535 .delta_pic_order_always_zero_flag = sps->delta_pic_order_always_zero_flag, in vaapi_encode_h264_init_sequence_params()
538 .bit_depth_luma_minus8 = sps->bit_depth_luma_minus8, in vaapi_encode_h264_init_sequence_params()
539 .bit_depth_chroma_minus8 = sps->bit_depth_chroma_minus8, in vaapi_encode_h264_init_sequence_params()
541 .frame_cropping_flag = sps->frame_cropping_flag, in vaapi_encode_h264_init_sequence_params()
542 .frame_crop_left_offset = sps->frame_crop_left_offset, in vaapi_encode_h264_init_sequence_params()
543 .frame_crop_right_offset = sps->frame_crop_right_offset, in vaapi_encode_h264_init_sequence_params()
544 .frame_crop_top_offset = sps->frame_crop_top_offset, in vaapi_encode_h264_init_sequence_params()
545 .frame_crop_bottom_offset = sps->frame_crop_bottom_offset, in vaapi_encode_h264_init_sequence_params()
547 .vui_parameters_present_flag = sps->vui_parameters_present_flag, in vaapi_encode_h264_init_sequence_params()
550 .aspect_ratio_info_present_flag = sps->vui.aspect_ratio_info_present_flag, in vaapi_encode_h264_init_sequence_params()
551 .timing_info_present_flag = sps->vui.timing_info_present_flag, in vaapi_encode_h264_init_sequence_params()
552 .bitstream_restriction_flag = sps->vui.bitstream_restriction_flag, in vaapi_encode_h264_init_sequence_params()
553 .log2_max_mv_length_horizontal = sps->vui.log2_max_mv_length_horizontal, in vaapi_encode_h264_init_sequence_params()
554 .log2_max_mv_length_vertical = sps->vui.log2_max_mv_length_vertical, in vaapi_encode_h264_init_sequence_params()
557 .aspect_ratio_idc = sps->vui.aspect_ratio_idc, in vaapi_encode_h264_init_sequence_params()
558 .sar_width = sps->vui.sar_width, in vaapi_encode_h264_init_sequence_params()
559 .sar_height = sps->vui.sar_height, in vaapi_encode_h264_init_sequence_params()
560 .num_units_in_tick = sps->vui.num_units_in_tick, in vaapi_encode_h264_init_sequence_params()
561 .time_scale = sps->vui.time_scale, in vaapi_encode_h264_init_sequence_params()
827 H264RawSPS *sps = &priv->raw_sps; in vaapi_encode_h264_init_slice_params() local
848 ((1 << (4 + sps->log2_max_frame_num_minus4)) - 1); in vaapi_encode_h264_init_slice_params()
851 ((1 << (4 + sps->log2_max_pic_order_cnt_lsb_minus4)) - 1); in vaapi_encode_h264_init_slice_params()