关于level_idc和Profile_IDC的解释

本文详细解析了H.264/AVC编码中Bitstream Profile和Level的设置及其作用,包括Baseline、Main、Extended、High等不同配置的特点,以及Level选项如10、11、12等对分辨率、帧率等限制的影响。

2010-01-21 15:51:40|  分类: windows mobile开 |字号 订阅

Description: Set bitstream Profile IDC. Default is 88.

Note: Some profiles cannot support certain features. See MPEG-4 AVC for supported features for each profile. Reference software may perform tests for certain features for profile conformance, but it is possible that certain validations are missing. See Annex A of H.264/AVC.

Options:
66Baseline
77Main
88Extended
100High (FRExt)
110High 10 (FRExt)
122High 4:2:2 (FRExt)
144High 4:4:4 (FRExt)

Class: Numeric (Integer)

Description: Set bitstream Level IDC. Default is 51.

Note: Similar with the ProfileIDC, LevelIDC sets certain restrictions during the encoding process, such as resolution supported, maximum number of references, frame rate etc. See Annex A of H.264/AVC.

Options:
101       (supports only QCIF format and below with 380160 samples/sec)
111.1    (CIF and below. 768000 samples/sec)
121.2    (CIF and below. 1536000 samples/sec)
131.3    (CIF and below. 3041280 samples/sec)
202       (CIF and below. 3041280 samples/sec)
212.1    (Supports HHR formats. Enables Interlace support. 5068800 samples/sec)
222.2    (Supports SD/4CIF formats. Enables Interlace support. 5184000 samples/sec)
303       (Supports SD/4CIF formats. Enables Interlace support. 10368000 samples/sec)
313.1    (Supports 720p HD format. Enables Interlace support. 27648000 samples/sec)
323.2    (Supports SXGA format. Enables Interlace support. 55296000 samples/sec)
404       (Supports 2Kx1K format. Enables Interlace support. 62914560 samples/sec)
414.1    (Supports 2Kx1K format. Enables Interlace support. 62914560 samples/sec)
424.2    (Supports 2Kx1K format. Frame coding only. 125829120 samples/sec)
505       (Supports 3672x1536 format. Frame coding only. 150994944 samples/sec)
515.1    (Supports 4096x2304 format. Frame coding only. 251658240 samples/sec)

/*---------------------------------------------------------------------- | AP4_HevcProfileTierLevel::AP4_HevcProfileTierLevel +---------------------------------------------------------------------*/ AP4_HevcProfileTierLevel::AP4_HevcProfileTierLevel() : general_profile_space(0), general_tier_flag(0), general_profile_idc(0), general_profile_compatibility_flags(0), general_constraint_indicator_flags(0), general_level_idc(0) { AP4_SetMemory(&sub_layer_info[0], 0, sizeof(sub_layer_info)); } /*---------------------------------------------------------------------- | AP4_HevcProfileTierLevel::Parse +---------------------------------------------------------------------*/ AP4_Result AP4_HevcProfileTierLevel::Parse(AP4_BitReader& bits, unsigned int max_num_sub_layers_minus_1) { // profile_tier_level general_profile_space = bits.ReadBits(2); general_tier_flag = bits.ReadBit(); general_profile_idc = bits.ReadBits(5); general_profile_compatibility_flags = bits.ReadBits(32); general_constraint_indicator_flags = ((AP4_UI64)bits.ReadBits(16)) << 32; general_constraint_indicator_flags |= bits.ReadBits(32); general_level_idc = bits.ReadBits(8); for (unsigned int i = 0; i < max_num_sub_layers_minus_1; i++) { sub_layer_info[i].sub_layer_profile_present_flag = bits.ReadBit(); sub_layer_info[i].sub_layer_level_present_flag = bits.ReadBit(); } if (max_num_sub_layers_minus_1) { for (unsigned int i = max_num_sub_layers_minus_1; i < 8; i++) { bits.ReadBits(2); // reserved_zero_2bits[i] } } for (unsigned int i = 0; i < max_num_sub_layers_minus_1; i++) { if (sub_layer_info[i].sub_layer_profile_present_flag) { sub_layer_info[i].sub_layer_profile_space = bits.ReadBits(2); sub_layer_info[i].sub_layer_tier_flag = bits.ReadBit(); sub_layer_info[i].sub_layer_profile_idc = bits.ReadBits(5); sub_layer_info[i].sub_layer_profile_compatibility_flags = bits.ReadBits(32); sub_layer_info[i].sub_layer_progressive_source_flag = bits.ReadBit(); sub_layer_info[i].sub_layer_interlaced_source_flag = bits.ReadBit(); sub_layer_info[i].sub_layer_non_packed_constraint_flag = bits.ReadBit(); sub_layer_info[i].sub_layer_frame_only_constraint_flag = bits.ReadBit(); bits.ReadBits(32); bits.ReadBits(12); // sub_layer_reserved_zero_44bits } if (sub_layer_info[i].sub_layer_level_present_flag) { sub_layer_info[i].sub_layer_level_idc = bits.ReadBits(8); } } return AP4_SUCCESS; } /*---------------------------------------------------------------------- | AP4_HevcShortTermRefPicSet::AP4_HevcShortTermRefPicSet +---------------------------------------------------------------------*/ AP4_HevcShortTermRefPicSet::AP4_HevcShortTermRefPicSet() : num_negative_pics(0), num_positive_pics(0) { AP4_SetMemory(delta_poc_s0_minus1, 0, sizeof(delta_poc_s0_minus1)); AP4_SetMemory(delta_poc_s1_minus1, 0, sizeof(delta_poc_s1_minus1)); AP4_SetMemory(used_by_curr_pic_s0_flag, 0, sizeof(used_by_curr_pic_s0_flag)); AP4_SetMemory(used_by_curr_pic_s1_flag, 0, sizeof(used_by_curr_pic_s1_flag)); } /*---------------------------------------------------------------------- | AP4_HevcVuiParameterSet::AP4_HevcVuiParameterSet +---------------------------------------------------------------------*/ AP4_HevcVuiParameterSet::AP4_HevcVuiParameterSet() : aspect_ratio_info_present_flag(0), aspect_ratio_idc(0), sar_width(0), sar_height(0), overscan_info_present_flag(0), overscan_appropriate_flag(0), video_signal_type_present_flag(0), video_format(0), video_full_range_flag(0), colour_description_present_flag(0), colour_primaries(0), transfer_characteristics(0), matrix_coefficients(0), chroma_loc_info_present_flag(0), chroma_sample_loc_type_top_field(0), chroma_sample_loc_type_bottom_field(0), neutral_chroma_indication_flag(0), field_seq_flag(0), frame_field_info_present_flag(0), default_display_window_flag(0), def_disp_win_left_offset(0), def_disp_win_right_offset(0), def_disp_win_top_offset(0), def_disp_win_bottom_offset(0), timing_info_present_flag(0), num_units_in_tick(0), time_scale(0), vui_poc_proportional_to_timing_flag(0), vui_num_ticks_poc_diff_one_minus1(0) { } 详细注释上述代码
最新发布
09-25
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值