上两篇里面写了划分NALU和指数哥伦布编码,这一篇主要写解析SPS和PPS。
下载bs.h头文件,并在项目中使用
先看SPS(序列参数集)的结构,再7.3.2.1.1里面包含了SPS结构的介绍
其中scaling_list函数在7.3.2.1.1.1里,如图所示
vui_parameters函数在E1.1里 ,如图所示
hrd_parameters()函数在E.1.2里面,如图
具体代码如下,注意点就是我们要将EBSP的数据转变为RBSP的数据才可以解析,不然系欸小会有问题
#define Extended_SAR 255
bs_t* b;
void scaling_list(uint32_t* scalingList, int sizeOfScalingList, uint32_t useDefaultScalingMatrixFlag) {
int lastScale = 8;
int nextScale = 8;
for (int j = 0; j < sizeOfScalingList; j++) {
if (nextScale != 0) {
int delta_scale = bs_read_se(b);
std::cout << "delta_scale:" << delta_scale << std::endl;
nextScale = (lastScale + delta_scale + 256) % 256;
useDefaultScalingMatrixFlag = (j == 0 && nextScale == 0);
}
scalingList[j] = (nextScale == 0) ? lastScale : nextScale;
lastScale = scalingList[j];
}
}
void hrd_parameters() {
std::cout << "==hrd==" << std::endl;
uint32_t cpb_cnt_minus1 = bs_read_ue(b);
std::cout << "cpb_cnt_minus1:" << cpb_cnt_minus1 << std::endl;
std::cout << "bit_rate_scale:" << bs_read_u(b, 4) << std::endl;
std::cout << "cpb_size_scale:" << bs_read_u(b, 4) << std::endl;
uint32_t bit_rate_value_minus1[5];
uint32_t cpb_size_value_minus1[5];
uint32_t cbr_flag[5];
for (int SchedSelIdx = 0; SchedSelIdx <= cpb_cnt_minus1; SchedSelIdx++) {
bit_rate_value_minus1[SchedSelIdx] = bs_read_ue(b);
cpb_size_value_minus1[SchedSelIdx] = bs_read_ue(b);
cbr_flag[SchedSelIdx] = bs_read_u1(b);
}
std::cout << "initial_cpb_removal_delay_length_minus1:" << bs_read_u(b, 5) << std::endl;
std::cout << "cpb_removal_delay_length_minus1:" << bs_read_u(b, 5) << std::endl;
std::cout << "dpb_output_delay_length_minus1:" << bs_read_u(b, 5) << std::endl;
std::cout << "time_offset_length:" << bs_read_u(b, 5) << std::endl;
std::cout << "==hrd end==" << std::endl;
}
void vui_parameters() {
std::cout << "==VUI==" << std::endl;
uint32_t aspect_ratio_info_present_flag = bs_read_u1(b);
std::cout << "aspect_ratio_info_present_flag:" << aspect_ratio_info_present_flag << std::endl;
if (aspect_ratio_info_present_flag) {
uint32_t aspect_ratio_idc = bs_read_u8(b);
std::cout << " aspect_ratio_idc:" << aspect_ratio_idc << std::endl;
if (aspect_ratio_idc == Extended_SAR){
std::cout << " sar_width:" << bs_read_u(b,16);
std::cout << " sar_height:" << bs_read_u(b, 16);
}
}
uint32_t overscan_info_present_flag = bs_read_u1(b);
std::cout << "overscan_info_present_flag:" << overscan_info_present_flag << std::endl;
if (overscan_info_present_flag) {
std::cout << " overscan_appropriate_flag:" << bs_read_u1(b) << std::endl;
}
uint32_t video_signal_type_present_flag = bs_read_u1(b);
std::cout << "video_signal_type_present_flag:" << video_signal_type_present_flag << std::endl;
if (video_signal_type_present_flag) {
std::cout << " video_format:" << bs_read_u(b,3) << std::endl;
std::cout << " video_full_range_flag:" << bs_read_u1(b) << std::endl;
uint32_t colour_description_present_flag = bs_read_u1(b);
std::cout << " colour_description_present_flag:" << colour_description_present_flag << std::endl;
if (colour_description_present_flag) {
std::cout << " colour_primaries:" << bs_read_u8(b) << std::endl;
std::cout << " transfer_characteristics:" << bs_read_u8(b) << std::endl;
std::cout << " matrix_coefficients:" << bs_read_u8(b) << std::endl;
}
}
uint32_t chroma_loc_info_present_flag = bs_read_u1(b);
std::cout << "chroma_loc_info_present_flag:" << chroma_loc_info_present_flag << std::endl;
if (chroma_loc_info_present_flag) {
std::cout << " chroma_sample_loc_type_top_field:" << bs_read_ue(b) << std::endl;
std::cout << " chroma_sample_loc_type_bottom_field:" << bs_read_ue(b) << std::endl;
}
uint32_t timing_info_present_flag = bs_read_u1(b);
std::cout << "timing_info_present_flag:" << timing_info_present_flag << std::endl;
if (timing_info_present_flag) {
std::cout << " num_units_in_tick:" << bs_read_u(b, 32) << std::endl;
std::cout << " time_scale:" << bs_read_u(b, 32) << std::endl;
std::cout << " fixed_frame_rate_flag:" << bs_read_u1(b) << std::endl;
}
uint32_t nal_hrd_parameters_present_flag = bs_read_u1(b);
std::cout << "nal_hrd_parameters_present_flag:" << nal_hrd_parameters_present_flag << std::endl;
if (nal_hrd_parameters_present_flag) {
hrd_parameters();
}
uint32_t vcl_hrd_parameters_present_flag = bs_read_u1(b);
std::cout << "vcl_hrd_parameters_present_flag:" << vcl_hrd_parameters_present_flag << std::endl;
if (vcl_hrd_parameters_present_flag) {
hrd_parameters();
}
if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_flag) {
std::cout << " low_delay_hrd_flag:" << bs_read_u1(b) << std::endl;
}
std::cout << "pic_struct_present_flag:" << bs_read_u1(b) << std::endl;
uint32_t bitstream_restriction_flag = bs_read_u1(b);
std::cout << "bitstream_restriction_flag:" << bitstream_restriction_flag << std::endl;
if (bitstream_restriction_flag) {
std::cout << " motion_vectors_over_pic_boundaries_flag:" << bs_read_u1(b) << std::endl;
std::cout << " max_bytes_per_pic_denom:" << bs_read_ue(b) << std::endl;
std::cout << " max_bits_per_mb_denom:" << bs_read_ue(b) << std::endl;
std::cout << " log2_max_mv_length_horizontal:" << bs_read_ue(b) << std::endl;
std::cout << " log2_max_mv_length_vertical:" << bs_read_ue(b) << std::endl;
std::cout << " num_reorder_frames:" << bs_read_ue(b) << std::endl;
std::cout << " max_dec_frame_buffering:" << bs_read_ue(b) << std::endl;
}
std::cout << "==VUI== End" << std::endl;
}
std::vector<uint8_t> EBSP2RBSP(uint8_t* buffer, int len) {
// 00 00 03 去掉03
std::vector<uint8_t> ebsp;
int i = 0;
for (i = 0; i < len-2; ++i) {
if (buffer[i] == 0x00 && buffer[i+1] == 0x00 && buffer[i+2] == 0x03) {
ebsp.push_back(buffer[i++]);
ebsp.push_back(buffer[i++]);
}
else {
ebsp.push_back(buffer[i]);
}
}
for (; i < len; ++i) {
ebsp.push_back(buffer[i]);
}
return ebsp;
}
uint32_t chroma_format_idc; // pps要使用
void ParseSPS(uint8_t* buffer, int len) {
std::vector<uint8_t> ebsp = EBSP2RBSP(buffer, len);
b = bs_new(ebsp.data(), ebsp.size());
std::cout << "forbidden_zero_bit :" << bs_read_u(b, 1) << std::endl;
std::cout << "nal_ref_idc:" << bs_read_u(b, 2) << std::endl;
std::cout << "nal_unit_type:" << bs_read_u(b, 5) << std::endl;
uint32_t profile_idc = bs_read_u8(b);
std::cout << "profile_idc:" << profile_idc << std::endl;
std::cout << "constraint_set0_flag:" << bs_read_u(b, 1) << std::endl;
std::cout << "constraint_set1_flag:" << bs_read_u(b, 1) << std::endl;
std::cout << "constraint_set2_flag:" << bs_read_u(b, 1) << std::endl;
std::cout << "constraint_set3_flag:" << bs_read_u(b, 1) << std::endl;
std::cout << "constraint_set4_flag:" << bs_read_u(b, 1) << std::endl;
std::cout << "constraint_set5_flag:" << bs_read_u(b, 1) << std::endl;
std::cout << "reserved_zero_2bits :" << bs_read_u(b, 2) << std::endl;
std::cout << "level_idc:" << bs_read_u8(b) << std::endl;
std::cout << "seq_parameter_set_id:" << bs_read_ue(b) << std::endl;
if (profile_idc == 100 || profile_idc == 110 || profile_idc == 122 ||
profile_idc == 244 || profile_idc == 44 || profile_idc == 83 ||
profile_idc == 86 || profile_idc == 118 || profile_idc == 128) {
chroma_format_idc = bs_read_ue(b);
std::cout << " chroma_format_idc:" << chroma_format_idc << std::endl;
if (chroma_format_idc == 3) {
std::cout << " separate_colour_plane_flag:" << bs_read_u(b, 1) << std::endl;
}
std::cout << " bit_depth_luma_minus8:" << bs_read_ue(b) << std::endl;
std::cout << " bit_depth_chroma_minus8:" << bs_read_ue(b) << std::endl;
std::cout << " qpprime_y_zero_transform_bypass_flag:" << bs_read_u(b, 1) << std::endl;
uint32_t seq_scaling_matrix_present_flag = bs_read_u(b, 1);
std::cout << " seq_scaling_matrix_present_flag:" << seq_scaling_matrix_present_flag << std::endl;
if (seq_scaling_matrix_present_flag) {
uint32_t seq_scaling_list_present_flag[12];
uint32_t* ScalingList4x4[12];
uint32_t UseDefaultScalingMatrix4x4Flag[12];
uint32_t* ScalingList8x8[12];
uint32_t UseDefaultScalingMatrix8x8Flag[12];
for (int i = 0; i < ((chroma_format_idc != 3) ? 8 : 12); i++) {
seq_scaling_list_present_flag[i] = bs_read_u(b, 1);
if (seq_scaling_list_present_flag[i]) {
if (i < 6) {
scaling_list(ScalingList4x4[i], 16,
UseDefaultScalingMatrix4x4Flag[i]);
}
else {
scaling_list(ScalingList8x8[i-6], 64,
UseDefaultScalingMatrix8x8Flag[i-6]);
}
}
}
}
}
std::cout << "log2_max_frame_num_minus4:" << bs_read_ue(b) << std::endl;
uint32_t pic_order_cnt_type = bs_read_ue(b);
std::cout << "pic_order_cnt_type:" << pic_order_cnt_type << std::endl;
if (pic_order_cnt_type == 0) {
std::cout << " log2_max_pic_order_cnt_lsb_minus4:" << bs_read_ue(b) << std::endl;
}
else if (pic_order_cnt_type == 1) {
std::cout << " delta_pic_order_always_zero_flag:" << bs_read_u(b, 1) << std::endl;
std::cout << " offset_for_non_ref_pic:" << bs_read_se(b) << std::endl;
std::cout << " offset_for_top_to_bottom_field:" << bs_read_se(b) << std::endl;
uint32_t num_ref_frames_in_pic_order_cnt_cycle = bs_read_ue(b);
std::cout << " num_ref_frames_in_pic_order_cnt_cycle:" << num_ref_frames_in_pic_order_cnt_cycle << std::endl;
int offset_for_ref_frame[256];
for (int i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++) {
offset_for_ref_frame[i] = bs_read_se(b);
}
}
std::cout << "max_num_ref_frames:" << bs_read_ue(b) << std::endl;
std::cout << "gaps_in_frame_num_value_allowed_flag:" << bs_read_u(b,1) << std::endl;
std::cout << "pic_width_in_mbs_minus1:" << bs_read_ue(b) << std::endl;
std::cout << "pic_height_in_map_units_minus1:" << bs_read_ue(b) << std::endl;
uint32_t frame_mbs_only_flag = bs_read_u(b, 1);
std::cout << "frame_mbs_only_flag:" << frame_mbs_only_flag << std::endl;
if (!frame_mbs_only_flag) {
std::cout << " mb_adaptive_frame_field_flag:" << bs_read_u(b, 1) << std::endl;
}
std::cout << "direct_8x8_inference_flag:" << bs_read_u(b, 1) << std::endl;
uint32_t frame_cropping_flag = bs_read_u(b, 1);
std::cout << "frame_cropping_flag:" << frame_cropping_flag << std::endl;
if (frame_cropping_flag) {
std::cout << " frame_crop_left_offset:" << bs_read_ue(b) << std::endl;
std::cout << " frame_crop_right_offset:" << bs_read_ue(b) << std::endl;
std::cout << " frame_crop_top_offset:" << bs_read_ue(b) << std::endl;
std::cout << " frame_crop_bottom_offset:" << bs_read_ue(b) << std::endl;
}
uint32_t vui_parameters_present_flag = bs_read_u(b, 1);
std::cout << "vui_parameters_present_flag:" << vui_parameters_present_flag << std::endl;
if (vui_parameters_present_flag) {
vui_parameters();
}
bs_free(b);
}
通过解析我们可以发现SPS序列参数集里面包含以下内容:
(1)、profile_idc,指明所需要的profile
(2)、level_idc,指明所需要的level
(3)、sps的id,后面pps根据sps的id找到对应的sps
(4)、max_num_ref_frames用于参考帧的最大数目
(5)、图像的宽pic_width_in_mbs_minus1和高pic_height_in_map_units_minus1,计算方法width = (pic_width_in_mbs_minus1+1)*16 。height = (pic_height_in_map_units_minus1+1)*16
(6)、video_full_range_flag ,表示video range还是full fange
(7)、帧速率,每一帧之间的间隔
(8)、 frame_mbs_only_flag,宏块编码方式,为1表示所有宏块都是用帧编码,为0表示可能使用帧编码也可能使用场编码
(9)、log2_max_pic_order_cnt_lsb_minus4,表示POC的上限
(10)、pic_order_cnt_type,指明poc的编码方式,poc标识图像的播放顺序
等等
具体可以参考下面两篇文章
H264___sps_pps___分析_郭风朴(guofengpu)的Android影音专栏-程序员宅基地
H264参数结构三:序列参数集层(SPS) & 图像参数集语义_heanyu的专栏-程序员宅基地
PPS:图像参数集,具体内容如下
具体代码如下所示
// 一个bit 1,若干个bit 0
void rbsp_trailing_bits() {
int rbsp_stop_one_bit = bs_read_u1(b); // equal to 1
std::cout << "rbsp_stop_one_bit:" << rbsp_stop_one_bit << std::endl;
while (!bs_byte_aligned(b)){
int rbsp_alignment_zero_bit = bs_read_u1(b); // equal to 0
}
}
// 是不是有更多的RBSP数据
uint32_t more_rbsp_data() {
if (bs_eof(b)) { return 0; }
if (bs_peek_u1(b) == 1) { return 0; } // if next bit is 1, we've reached the stop bit
return 1;
}
void ParsePPS(uint8_t* buffer, int len) {
std::cout << "=========================PPS=======================" << std::endl;
std::vector<uint8_t> ebsp = EBSP2RBSP(buffer, len);
// std::cout << "pps buffer len:" << ebsp.size() << std::endl;
b = bs_new(ebsp.data(), ebsp.size());
std::cout << "forbidden_zero_bit :" << bs_read_u(b, 1) << std::endl;
std::cout << "nal_ref_idc:" << bs_read_u(b, 2) << std::endl;
std::cout << "nal_unit_type:" << bs_read_u(b, 5) << std::endl;
std::cout << "pic_parameter_set_id:" << bs_read_ue(b) << std::endl;
std::cout << "seq_parameter_set_id:" << bs_read_ue(b) << std::endl;
std::cout << "entropy_coding_mode_flag:" << bs_read_u1(b) << std::endl;
std::cout << "bottom_field_pic_order_in_frame_present_flag:" << bs_read_u1(b) << std::endl;
uint32_t num_slice_groups_minus1 = bs_read_ue(b);
std::cout << "num_slice_groups_minus1:" << num_slice_groups_minus1 << std::endl;
if (num_slice_groups_minus1 > 0) {
uint32_t slice_group_map_type = bs_read_ue(b);
std::cout << " slice_group_map_type:" << slice_group_map_type << std::endl;
if (slice_group_map_type == 0) {
uint32_t run_length_minus1[8];
for (int iGroup = 0; iGroup <= num_slice_groups_minus1; iGroup++) {
run_length_minus1[iGroup] = bs_read_ue(b);
}
}
else if (slice_group_map_type == 2) {
uint32_t top_left[8];
uint32_t bottom_right[8];
for (int iGroup = 0; iGroup < num_slice_groups_minus1; iGroup++) {
top_left[iGroup] = bs_read_ue(b);
bottom_right[iGroup] = bs_read_ue(b);
}
}
else if (slice_group_map_type == 3 ||
slice_group_map_type == 4 ||
slice_group_map_type == 5) {
std::cout << " slice_group_change_direction_flag:" << bs_read_u1(b) << std::endl;
std::cout << " slice_group_change_rate_minus1:" << bs_read_ue(b) << std::endl;
}
else if (slice_group_map_type == 6) {
uint32_t pic_size_in_map_units_minus1 = bs_read_ue(b);
std::cout << " pic_size_in_map_units_minus1:" << pic_size_in_map_units_minus1 << std::endl;
uint32_t slice_group_id[8];
for (int i = 0; i <= pic_size_in_map_units_minus1; i++) {
slice_group_id[i] = bs_read_ue(b);
}
}
}
std::cout << "num_ref_idx_l0_default_active_minus1:" << bs_read_ue(b) << std::endl;
std::cout << "num_ref_idx_l1_default_active_minus1:" << bs_read_ue(b) << std::endl;
std::cout << "weighted_pred_flag:" << bs_read_u1(b) << std::endl;
std::cout << "weighted_bipred_idc:" << bs_read_u(b,2) << std::endl;
std::cout << "pic_init_qp_minus26:" << bs_read_se(b) << std::endl;
std::cout << "pic_init_qs_minus26:" << bs_read_se(b) << std::endl;
std::cout << "chroma_qp_index_offset:" << bs_read_se(b) << std::endl;
std::cout << "deblocking_filter_control_present_flag:" << bs_read_u1(b) << std::endl;
std::cout << "constrained_intra_pred_flag:" << bs_read_u1(b) << std::endl;
std::cout << "redundant_pic_cnt_present_flag:" << bs_read_u1(b) << std::endl;
if (more_rbsp_data()) {
uint32_t transform_8x8_mode_flag = bs_read_u1(b);
std::cout << " transform_8x8_mode_flag:" << transform_8x8_mode_flag << std::endl;
uint32_t pic_scaling_matrix_present_flag = bs_read_u1(b);
std::cout << " pic_scaling_matrix_present_flag:" << std::endl;
uint32_t pic_scaling_list_present_flag[6];
uint32_t* ScalingList4x4[12];
uint32_t UseDefaultScalingMatrix4x4Flag[12];
uint32_t* ScalingList8x8[12];
uint32_t UseDefaultScalingMatrix8x8Flag[12];
if (pic_scaling_matrix_present_flag) {
for (int i = 0; i < 6 + ((chroma_format_idc != 3) ? 2 : 6) * transform_8x8_mode_flag; i++) {
pic_scaling_list_present_flag[i] = bs_read_u1(b);
if (pic_scaling_list_present_flag[i]) {
if (i < 6) {
scaling_list(ScalingList4x4[i], 16,
UseDefaultScalingMatrix4x4Flag[i]);
}
else {
scaling_list(ScalingList8x8[i - 6], 64,
UseDefaultScalingMatrix8x8Flag[i - 6]);
}
}
}
}
std::cout << " second_chroma_qp_index_offset:" << bs_read_se(b) << std::endl;
}
rbsp_trailing_bits();
bs_free(b);
}
PPS里面主要包含以下内容
(1)、PPS的id
(2)、SPS的id
(3)、entropy_coding_mode_flag 熵编码的选择,为0表示使用CAVLC,为表示CABAC
(4)、num_slice_groups_minus1,加1表示图像中使用片组的个数
等等
当然,我们也可以不适用bs.h头文件,也可以自己写解析过程,主要就是bs_read_u1,bs_read_u,bs_read_u8,bs_read_ue,bs_read_se这几个函数
文章浏览阅读3.4k次,点赞8次,收藏42次。一、什么是内部类?or 内部类的概念内部类是定义在另一个类中的类;下面类TestB是类TestA的内部类。即内部类对象引用了实例化该内部对象的外围类对象。public class TestA{ class TestB {}}二、 为什么需要内部类?or 内部类有什么作用?1、 内部类方法可以访问该类定义所在的作用域中的数据,包括私有数据。2、内部类可以对同一个包中的其他类隐藏起来。3、 当想要定义一个回调函数且不想编写大量代码时,使用匿名内部类比较便捷。三、 内部类的分类成员内部_成员内部类和局部内部类的区别
文章浏览阅读118次。分布式系统要求拆分分布式思想的实质搭配要求分布式系统要求按照某些特定的规则将项目进行拆分。如果将一个项目的所有模板功能都写到一起,当某个模块出现问题时将直接导致整个服务器出现问题。拆分按照业务拆分为不同的服务器,有效的降低系统架构的耦合性在业务拆分的基础上可按照代码层级进行拆分(view、controller、service、pojo)分布式思想的实质分布式思想的实质是为了系统的..._分布式系统运维工具
文章浏览阅读174次。1.数据源准备2.数据处理step1:数据表处理应用函数:①VLOOKUP函数; ② CONCATENATE函数终表:step2:数据透视表统计分析(1) 透视表汇总不同渠道用户数, 金额(2)透视表汇总不同日期购买用户数,金额(3)透视表汇总不同用户购买订单数,金额step3:讲第二步结果可视化, 比如, 柱形图(1)不同渠道用户数, 金额(2)不同日期..._exce l趋势分析数据量
文章浏览阅读3.3k次。堡垒机可以为企业实现服务器、网络设备、数据库、安全设备等的集中管控和安全可靠运行,帮助IT运维人员提高工作效率。通俗来说,就是用来控制哪些人可以登录哪些资产(事先防范和事中控制),以及录像记录登录资产后做了什么事情(事后溯源)。由于堡垒机内部保存着企业所有的设备资产和权限关系,是企业内部信息安全的重要一环。但目前出现的以下问题产生了很大安全隐患:密码设置过于简单,容易被暴力破解;为方便记忆,设置统一的密码,一旦单点被破,极易引发全面危机。在单一的静态密码验证机制下,登录密码是堡垒机安全的唯一_horizon宁盾双因素配置
文章浏览阅读7.7k次,点赞4次,收藏16次。Chrome作为一款挺不错的浏览器,其有着诸多的优良特性,并且支持跨平台。其支持(Windows、Linux、Mac OS X、BSD、Android),在绝大多数情况下,其的安装都很简单,但有时会由于网络原因,无法安装,所以在这里总结下Chrome的安装。Windows下的安装:在线安装:离线安装:Linux下的安装:在线安装:离线安装:..._chrome linux debian离线安装依赖
文章浏览阅读153次。中国发达城市榜单每天都在刷新,但无非是北上广轮流坐庄。北京拥有最顶尖的文化资源,上海是“摩登”的国际化大都市,广州是活力四射的千年商都。GDP和发展潜力是衡量城市的数字指...
文章浏览阅读3.3k次。前言spark在java使用比较少,多是scala的用法,我这里介绍一下我在项目中使用的代码配置详细算法的使用请点击我主页列表查看版本jar版本说明spark3.0.1scala2.12这个版本注意和spark版本对应,只是为了引jar包springboot版本2.3.2.RELEASEmaven<!-- spark --> <dependency> <gro_使用java调用spark注册进去的程序
文章浏览阅读4.8k次。汽车零部件开发工具巨头V公司全套bootloader中UDS协议栈源代码,自己完成底层外设驱动开发后,集成即可使用,代码精简高效,大厂出品有量产保证。:139800617636213023darcy169_uds协议栈 源代码
文章浏览阅读4.6k次,点赞20次,收藏148次。AUTOSAR基础篇之OS(下)前言首先,请问大家几个小小的问题,你清楚:你知道多核OS在什么场景下使用吗?多核系统OS又是如何协同启动或者关闭的呢?AUTOSAR OS存在哪些功能安全等方面的要求呢?多核OS之间的启动关闭与单核相比又存在哪些异同呢?。。。。。。今天,我们来一起探索并回答这些问题。为了便于大家理解,以下是本文的主题大纲:[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-JCXrdI0k-1636287756923)(https://gite_autosar 定义了 5 种多核支持类型
文章浏览阅读2.2k次,点赞6次,收藏14次。原因:自己写的头文件没有被加入到方案的包含目录中去,无法被检索到,也就无法打开。将自己写的头文件都放入header files。然后在VS界面上,右键方案名,点击属性。将自己头文件夹的目录添加进去。_vs2013打不开自己定义的头文件
文章浏览阅读3.3w次,点赞80次,收藏342次。此时,可以将系统中所有用户的 Session 数据全部保存到 Redis 中,用户在提交新的请求后,系统先从Redis 中查找相应的Session 数据,如果存在,则再进行相关操作,否则跳转到登录页面。此时,可以将系统中所有用户的 Session 数据全部保存到 Redis 中,用户在提交新的请求后,系统先从Redis 中查找相应的Session 数据,如果存在,则再进行相关操作,否则跳转到登录页面。当数据量很大时,count 的数量的指定可能会不起作用,Redis 会自动调整每次的遍历数目。_redis命令
文章浏览阅读449次,点赞3次,收藏3次。URP的设计目标是在保持高性能的同时,提供更多的渲染功能和自定义选项。与普通项目相比,会多出Presets文件夹,里面包含着一些设置,包括本色,声音,法线,贴图等设置。全局只有主光源和附加光源,主光源只支持平行光,附加光源数量有限制,主光源和附加光源在一次Pass中可以一起着色。URP:全局只有主光源和附加光源,主光源只支持平行光,附加光源数量有限制,一次Pass可以计算多个光源。可编程渲染管线:渲染策略是可以供程序员定制的,可以定制的有:光照计算和光源,深度测试,摄像机光照烘焙,后期处理策略等等。_urp渲染管线