VC1
VC1是微软联合一些公司共同贡献形成的视频编解码协议
协议内容类似H264(现代的视频协议基本都类似H264)
协议内容存在歧义的 全部引用英文原文
解码
解码vc1的裸码流
layout层级结构
类似h264 分为sequence picture slices macroblocks blocks
区别点是多了一个entry-point
层级结构: decode顺序 sequence -> entry-point -> picture -> slices -> macroblocks
layout说明
entry-point仅在advanced profile下存在
slice: a slice comprises one or more contiguous rows of macroblocks
field: 场模式存在的情况下 picture layer 内还有 field layer,在 slices layer之上
profile
1. 比较简洁 仅分为 simple,main and advanced三种 ffmpeg的VC1解码器多包含一种complex 对应的是wmv9
2. simple和main: 一个sequence包含一或多个编码picture
3. advanced: 一个sequence包含一或多个entry-point segments,其中的每个entry-point segments又包含一或多个编码picture
4. simple和main profile只支持帧模式编码 advanced除了帧模式还支持场模式编码
5. 每个profile 还区分为不同的level
分帧
不同语法单元的起始码:
1. sequence header为0x00 0x00 0x01 0x0F sequence end则为0x00 0x00 0x01 0x0A
2. entry-point header为0x00 0x00 0x01 0x0E
3. IPB帧的frame header都为0x00 0x00 0x01 0x0D
4. slice header 0x00 0x00 0x01 0x0B
5. field header 0x00 0x00 0x01 0x0C
帧类型
类似于h264的nalu单元 0x00 0x00 0x01作为单元分隔符
帧的类型分为:
I帧
1. 仅使用自身信息编码
2. 不依赖其它帧的信息
3. 所有宏块都是intra-coded
P帧
1. 参考之前的帧 使用向量预测信息编码
2. 可以包含inter-coded宏块和intra-coded宏块
skipped帧
skipped帧是和它的参考帧相同的P帧
BI帧
BI帧是只包含intra-coded宏块的B帧
B帧
1. 参考之前或之后的帧 使用向量预测信息编码
2. 可以包含inter-coded宏块和intra-coded宏块
解码流程Overview
simple和main profile的解码流程
advanced profile的解码流程