错误检测dP-bitstream-ei_flag runRestrictRef
JM86模型,對于錯誤檢測,dP->bitstream->ei_flag在什么情況下置1?
還是無錯的時候dP->bitstream->ei_flag=0,有錯時dP->bitstream->ei_flag等于一個較大的無效值?
看下所有給 dP->bitstream->ei_flag 賦值的地方就知道了
JM86中,dP->bitstream->ei_flag標記了當前碼流是否出錯,代碼中出現(xiàn)很多如 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()函數(shù)中定義了這樣一個變量:
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 時,規(guī)定NAL 單元的內容包含一個序列參數(shù)集,或一個圖像參數(shù)集,或一個參考圖像條帶,或一個參考圖像的條帶數(shù)據(jù)分割。????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????如如果一個包含一個條帶或條帶數(shù)據(jù)分割的NAL單元的nal_ref_idc 等于0 時,該條帶或條帶數(shù)據(jù)分割是一個非參考圖像的一部分。
對于序列參數(shù)集或序列參數(shù)集擴展或圖像參數(shù)集的NAL單元,nal_ref_idc不應等于0。當一個特定的圖像的一個條帶或條帶數(shù)據(jù)分割NAL單元的nal_ref_idc等于0,該圖像的所有條帶或條帶數(shù)據(jù)劃分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.
loss rdo 通過LossRateA可以出:是指明算法是否有預期的條帶數(shù)據(jù)分割的丟包率。
總結
以上是生活随笔為你收集整理的错误检测dP-bitstream-ei_flag runRestrictRef的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用directX 7结合C#进行2D游
- 下一篇: DirectX学习笔记_关于Sprite