京東云視頻云全面支持AVS2標(biāo)準(zhǔn)
一、概述
?
一、概述
二、技術(shù)實(shí)現(xiàn)

FLV ?AVS2擴(kuò)展說(shuō)明:
sequence_header()?{
????uint32_t????????profile_id;?????????/*?profile?ID,?davs2_profile_id_e?*/
????uint32_t????????level_id;???????????/*?level???ID?*/
????uint32_t????????progressive;????????/*?progressive?sequence?(0:?interlace,?1:?progressive)?*/
????uint32_t????????width;??????????????/*?image?width?*/
????uint32_t????????height;?????????????/*?image?height?*/
????uint32_t????????chroma_format;??????/*?chroma?format(1:?4:2:0,?2:?4:2:2)?*/
????uint32_t????????aspect_ratio;???????/*?2:?4:3,??3:?16:9?*/
????uint32_t????????low_delay;??????????/*?low?delay?*/
????uint32_t????????bitrate;????????????/*?bitrate?(bps)?*/
????uint32_t????????internal_bit_depth;?/*?internal?sample?bit?depth?*/
????uint32_t????????output_bit_depth;???/*?output?sample?bit?depth?*/
????uint32_t????????bytes_per_sample;???/*?bytes?per?sample?*/
????float???????????frame_rate;?????????/*?frame?rate?*/
????uint32_t????????frame_rate_id;??????/*?frame?rate?code,?mpeg12?[1...8]?*/
};

FLV AVS2擴(kuò)展示例
HLS ?AVS2擴(kuò)展說(shuō)明:
TS新增AVS2的stream_type=0xD2,stream_id=0xE0


AVS2碼流結(jié)構(gòu):
AVS2的碼流結(jié)構(gòu)由包含起始碼的視頻序列組成,視頻幀slice type包含I、P、B在內(nèi)的六種類型,如下:
slice?type?{
????AVS2_I_SLICE?=?0,???????????/*?slice?type:?I?frame?*/
????AVS2_P_SLICE?=?1,???????????/*?slice?type:?P?frame?*/
????AVS2_B_SLICE?=?2,???????????/*?slice?type:?B?frame?*/
????AVS2_G_SLICE?=?3,???????????/*?AVS2?type:??G?frame?*/
????AVS2_F_SLICE?=?4,???????????/*?slice?type:?F?frame?*/
????AVS2_S_SLICE?=?5,???????????/*?AVS2?type:??S?frame?*/
????AVS2_GB_SLICE?=?6,??????????/*?AVS2?type:??GB?frame*/
};
start?code?{
????SC_SEQUENCE_HEADER?=?0xB0,??/*?sequence?header?start?code?*/
????SC_SEQUENCE_END????=?0xB1,??/*?sequence?end????start?code?*/
????SC_USER_DATA???????=?0xB2,??/*?user?data???????start?code?*/
????SC_INTRA_PICTURE???=?0xB3,??/*?intra?picture???start?code?*/
????SC_EXTENSION???????=?0xB5,??/*?extension???????start?code?*/
????SC_INTER_PICTURE???=?0xB6,??/*?inter?picture???start?code?*/
????SC_VIDEO_EDIT_CODE?=?0xB7,??/*?video?edit??????start?code?*/
????SC_SLICE_CODE_MIN??=?0x00,??/*?min?slice???????start?code?*/
????SC_SLICE_CODE_MAX??=?0x8F???/*?max?slice???????start?code?*/
};

video_sequence()?{
??do?{
????sequence_header();
????extension_and_user_data(0);
????do?{
??????if?(next_bits(32)?==?intra_picture_start_code?)
??????????intra_picture_header()
??????else
??????????inter_picture_header()
??????extension_and_user_date(1)
??????picture_data()
????}?while(next_bits(32)?==?inter_picture_start_code()?||?next_bits(32)?==?intra_picture_start_code?))
????if?(next_bits(32)?==?video_sequence_end_code)
????????video_sequence_end_code
????if?(net_bits(32)?==?video_edit_code)
????????video_edit_code
????}
}
在視頻點(diǎn)播方面,AVS2能高效提升編碼效率,F(xiàn)Fmpeg對(duì)AVS標(biāo)準(zhǔn)容器格式MKV/MP4等還不支持。目前在視頻處理層面,京東云視頻點(diǎn)播已支持AVS2相關(guān)的轉(zhuǎn)碼等媒體處理。
主流編碼速度對(duì)比

相同的編碼速率,AVS2大概比x265的編碼效率高10%~30%;同樣在相同的編碼效率下, AVS2比x265的編碼速率快3~10倍。
AVS2與HEVC平均主觀質(zhì)量對(duì)比

相同碼率條件下,AVS2與HEVC的平均主觀質(zhì)量基本一致。
三、AVS2編碼效果

評(píng)論
圖片
表情
