Lines Matching full:sps
94 * because it needs to write SPS/PPS NAL units. The encoder writes the actual
1574 struct nal_h264_sps *sps;
1585 sps = kzalloc(sizeof(*sps), GFP_KERNEL);
1586 if (!sps)
1592 sps->profile_idc = nal_h264_profile(profile);
1593 sps->constraint_set0_flag = 0;
1594 sps->constraint_set1_flag = 1;
1595 sps->constraint_set2_flag = 0;
1596 sps->constraint_set3_flag = 0;
1597 sps->constraint_set4_flag = 0;
1598 sps->constraint_set5_flag = 0;
1599 sps->level_idc = nal_h264_level(level);
1600 sps->seq_parameter_set_id = 0;
1601 sps->log2_max_frame_num_minus4 = LOG2_MAX_FRAME_NUM - 4;
1602 sps->pic_order_cnt_type = 0;
1603 sps->log2_max_pic_order_cnt_lsb_minus4 = LOG2_MAX_PIC_ORDER_CNT - 4;
1604 sps->max_num_ref_frames = 3;
1605 sps->gaps_in_frame_num_value_allowed_flag = 0;
1606 sps->pic_width_in_mbs_minus1 =
1608 sps->pic_height_in_map_units_minus1 =
1610 sps->frame_mbs_only_flag = 1;
1611 sps->mb_adaptive_frame_field_flag = 0;
1612 sps->direct_8x8_inference_flag = 1;
1613 sps->frame_cropping_flag =
1615 if (sps->frame_cropping_flag) {
1616 sps->crop_left = 0;
1617 sps->crop_right = (round_up(channel->width, size_mb) - channel->width) / crop_unit_x;
1618 sps->crop_top = 0;
1619 sps->crop_bottom = (round_up(channel->height, size_mb) - channel->height) / crop_unit_y;
1621 sps->vui_parameters_present_flag = 1;
1622 sps->vui.aspect_ratio_info_present_flag = 0;
1623 sps->vui.overscan_info_present_flag = 0;
1625 sps->vui.video_signal_type_present_flag = 1;
1626 sps->vui.video_format = 5; /* unspecified */
1627 sps->vui.video_full_range_flag = nal_h264_full_range(channel->quantization);
1628 sps->vui.colour_description_present_flag = 1;
1629 sps->vui.colour_primaries = nal_h264_color_primaries(channel->colorspace);
1630 sps->vui.transfer_characteristics =
1632 sps->vui.matrix_coefficients =
1635 sps->vui.chroma_loc_info_present_flag = 1;
1636 sps->vui.chroma_sample_loc_type_top_field = 0;
1637 sps->vui.chroma_sample_loc_type_bottom_field = 0;
1639 sps->vui.timing_info_present_flag = 1;
1640 sps->vui.num_units_in_tick = channel->framerate.denominator;
1641 sps->vui.time_scale = 2 * channel->framerate.numerator;
1643 sps->vui.fixed_frame_rate_flag = 1;
1644 sps->vui.nal_hrd_parameters_present_flag = 0;
1645 sps->vui.vcl_hrd_parameters_present_flag = 1;
1646 sps->vui.vcl_hrd_parameters.cpb_cnt_minus1 = 0;
1648 sps->vui.vcl_hrd_parameters.bit_rate_scale =
1650 sps->vui.vcl_hrd_parameters.bit_rate_value_minus1[0] =
1651 channel->bitrate_peak / (1 << (6 + sps->vui.vcl_hrd_parameters.bit_rate_scale)) - 1;
1655 sps->vui.vcl_hrd_parameters.cpb_size_scale = cpb_size_scale;
1656 sps->vui.vcl_hrd_parameters.cpb_size_value_minus1[0] =
1658 sps->vui.vcl_hrd_parameters.cbr_flag[0] =
1660 sps->vui.vcl_hrd_parameters.initial_cpb_removal_delay_length_minus1 = 31;
1661 sps->vui.vcl_hrd_parameters.cpb_removal_delay_length_minus1 = 31;
1662 sps->vui.vcl_hrd_parameters.dpb_output_delay_length_minus1 = 31;
1663 sps->vui.vcl_hrd_parameters.time_offset_length = 0;
1664 sps->vui.low_delay_hrd_flag = 0;
1665 sps->vui.pic_struct_present_flag = 1;
1666 sps->vui.bitstream_restriction_flag = 0;
1668 size = nal_h264_write_sps(&dev->plat_dev->dev, dest, n, sps);
1670 kfree(sps);
1764 struct nal_hevc_sps *sps;
1775 sps = kzalloc(sizeof(*sps), GFP_KERNEL);
1776 if (!sps)
1779 sps->temporal_id_nesting_flag = 1;
1781 ptl = &sps->profile_tier_level;
1789 sps->seq_parameter_set_id = 0;
1790 sps->chroma_format_idc = 1; /* Only 4:2:0 sampling supported */
1791 sps->pic_width_in_luma_samples = round_up(channel->width, 8);
1792 sps->pic_height_in_luma_samples = round_up(channel->height, 8);
1793 sps->conf_win_right_offset =
1794 sps->pic_width_in_luma_samples - channel->width;
1795 sps->conf_win_bottom_offset =
1796 sps->pic_height_in_luma_samples - channel->height;
1797 sps->conformance_window_flag =
1798 sps->conf_win_right_offset || sps->conf_win_bottom_offset;
1800 sps->log2_max_pic_order_cnt_lsb_minus4 = LOG2_MAX_PIC_ORDER_CNT - 4;
1802 sps->sub_layer_ordering_info_present_flag = 1;
1803 sps->max_dec_pic_buffering_minus1[0] = num_ref_frames;
1804 sps->max_num_reorder_pics[0] = num_ref_frames;
1806 sps->log2_min_luma_coding_block_size_minus3 =
1808 sps->log2_diff_max_min_luma_coding_block_size =
1810 sps->log2_min_luma_transform_block_size_minus2 =
1812 sps->log2_diff_max_min_luma_transform_block_size =
1814 sps->max_transform_hierarchy_depth_intra =
1816 sps->max_transform_hierarchy_depth_inter =
1819 sps->sps_temporal_mvp_enabled_flag = channel->temporal_mvp_enable;
1820 sps->strong_intra_smoothing_enabled_flag = channel->max_cu_size > 4;
1822 sps->vui_parameters_present_flag = 1;
1823 vui = &sps->vui;
1866 size = nal_hevc_write_sps(&dev->plat_dev->dev, dest, n, sps);
1868 kfree(sps);
2036 * because we will put the sps and pps data there.
2073 "channel %d: wrote %zd byte SPS nal unit\n",