elva

关于MPEG2中的图像序列和图像组头GOP

图像序列

图像序列是由图像组构成的,是随机存取段落

sequence_header_code – The sequence_header_code is the bit string ‘000001B3’ in hexadecimal

sequence_end_code – The sequence_end_code is the bit string ‘000001B7’ in hexadecimal.

MPEG-2为了实现随机访问,在码流中会插入repeat_sequence_header,它可以插在I、P帧或GOP前面;假如是场编码,只能插在第一场前面。

图像组头

图像组(GOP)是为方便随机存取而加的,图像组是随机存取视频单位。一个GOP由一串IBP帧组成,起始为I帧。基准帧(I/P)的反复频率用M表示,它描述为多少帧里出现一次I/P帧。GOP的长度是一个I帧到下一个I 帧的间隔,即多少帧里面出现一次I帧,一般用N表示,这个长度是可变的,长GOP可以提供高的压缩比,但是会造成随机存取的延迟(必须等到下一个I帧)和误差的积累(P帧的误差传播)。一般是一秒内有两个I帧,用来作为随机存取的入口。在MPEG2中也没有规定GOP的结构,帧反复方式可以是IP,IB,IBP,IBBP,甚至全部是I帧。

M=1 N=X:IPPP...

M=2 N=X:IBPBP...

M=3 N=X:IBBPBBP...

MPEG-2标准中的GOP语法结构如下:

group_start_code – The group_start_code is the bit string ‘000001B8’ in hexadecimal.

closed_gop – This is a one-bit flag which indicates the nature of the predictions used in the first consecutive B-pictures (if any) immediately following the first coded I-frame following the group of picture header.closed_gop is set to ‘1’ to indicate that these B-pictures have been encoded using only backward prediction or intracoding.

broken_link – This is a one-bit flag which shall be set to ‘0’ during encoding. It is set to ‘1’ to indicate that the first
consecutive B-Pictures (if any) immediately following the first coded I-frame following the group of picture header may not be correctly decoded because the reference frame which is used for prediction is not available (because of the action of editing).A decoder may use this flag to avoid displaying frames that cannot be correctly decoded.


http://lyj2682.spaces.live.com/blog/cns!177B1314D2038BE4!142.entry

posted on 2011-02-23 14:26 叶子 阅读(2857) 评论(3)  编辑 收藏 引用 所属分类: MPEG

Feedback

# re: 关于MPEG2中的图像序列和图像组头GOP 2012-07-13 15:16 vivien

我想提取视频I帧的信息~~可是程序不太会,请教~~我的联系方式410649339  回复  更多评论   

# re: 关于MPEG2中的图像序列和图像组头GOP 2012-07-16 11:21 叶子

加了@vivien
  回复  更多评论   

# re: 关于MPEG2中的图像序列和图像组头GOP 2012-07-16 22:05 vivien

刚加你了,谢谢了,有问题请教  回复  更多评论   


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理