错误检测dP->bitstream->ei_flag run&&RestrictRef

JM86模型,对于错误检测,dP->bitstream->ei_flag在什么情况下置1?
还是无错的时候dP->bitstream->ei_flag=0,有错时dP->bitstream->ei_flag等于一个较大的无效值?

看下所有给 dP->bitstream->ei_flag 赋值的地方就知道了

JM86中,dP->bitstream->ei_flag标记了当前码流是否出错,代码中出现很多如 if (active_pps->entropy_coding_mode_flag == UVLC || dP-
>bitstream->ei_flag)的条件判断,active_pps->entropy_coding_mode_flag == UVLC条件好理解,但是dP->bitstream->ei_flag怎么跟是否选用

 

算作一个小知识点的积累吧。若有错误,请不吝指正!

JM73的encode_one_macroblock()函数中定义了这样一个变量
int
runs = (input->RestrictRef==1 && input->rdopt==2 && (img->type==P_SLICE || img->type==SP_SLICE || (img->type==B_SLICE && img- nal_reference_idc>0)) ? 2 : 1);

先来看一下条件语句中的变量。                                                                                      
标准中提到:nal_ref_idc 不等于0 时,规定NAL 单元的内容包含一个序列参数集,或一个图像参数集,或一个参考图像条带,或一个参考图像的条带数据分割。                                                                                                                                                                                                                                                                                                                                                                                                                        
如如果一个包含一个条带或条带数据分割的NAL单元的nal_ref_idc 等于0 时,该条带或条带数据分割是一个非参考图像的一部分
对于序列参数集或序列参数集扩展或图像参数集的NAL单元,nal_ref_idc不应等于0。当一个特定的图像的一个条带或条带数据分割NAL单元的nal_ref_idc等于0,该图像的所有条带或条带数据划分NAL单元都应该等于0。
IDR NAL单元的nal_ref_idc不应等于0,即nal_unit_type等于5的NAL单元。
所有nal_unit_type等于6、9、10、11或12的NAL单元其nal_ref_idc都应等于0。                                                                                                                                                                                                                                                                              
在配置
文件中:                                                                                                                                                                                                                                                                                                                                                                                                  RDOptimization       = 1 # rd-optimized mode decision (0:off, 1:on, 2: with losses)                                                                                                                                                                                                                                  
lossRateA= 10 # expected packet loss rate of the channel for the first partition, only valid if RDOptimization = 2
LossRateB            = 0 # expected packet loss rate of the channel for the second partition, only valid if RDOptimization = 2
LossRateC            = 0 # expected packet loss rate of the channel for the third partition, only valid if RDOptimization = 2
NumberOfDecoders     = 30 # Numbers of decoders used to simulate the channel, only valid if RDOptimization = 2
RestrictRefFrames    = 0 # Doesnt allow reference to areas that have been intra updated in a later frame.

所以,runs=2 是针对 loss rdo 模式下P条带(包括SP)或可作参考图像的B条带,其余的情况 runs=1。                                                      
loss rdo 通过LossRateA可以出:是指明
算法是否有预期的条带数据分割的丢包率。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值