• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            牽著老婆滿街逛

            嚴以律己,寬以待人. 三思而后行.
            GMail/GTalk: yanglinbo#google.com;
            MSN/Email: tx7do#yahoo.com.cn;
            QQ: 3 0 3 3 9 6 9 2 0 .

            Close gop與Open Gop

            轉載自:http://blog.sina.com.cn/s/blog_4ae178ba01017ihs.html

            GOP和Reference

              在視頻編碼序列中,主要有三種編碼幀:I幀、P幀、B幀,如下圖3.1所示。

              ● I幀即Intra-coded picture(幀內編碼圖像幀),不參考其他圖像幀,只利用本幀的信息進行編碼
            ● P幀即Predictive-coded Picture(預測編碼圖像幀),利用之前的I幀或P幀,采用運動預測的方式進行幀間預測編碼
            ● B幀即Bidirectionally predicted picture(雙向預測編碼圖像幀),提供最高的壓縮比,它既需要之前的圖
            像幀(I幀或P幀),也需要后來的圖像幀(P幀),采用運動預測的方式進行幀間雙向預測編碼

              在視頻編碼序列中,GOP即Group of picture(圖像組),指兩個I幀之間的距離,Reference(參考周期)指兩個P幀之間的距離(如下圖3.1)。一個I幀所占用的字節數大于一個P幀,一個P幀所占用的字節數大于一個B幀(如下圖3.1所示)。

              圖3.1 I、P、B幀示意圖

              所以在碼率不變的前提下,GOP值越大,P、B幀的數量會越多,平均每個I、P、B幀所占用的字節數就越多,也就更容易獲取較好的圖像質量;Reference越大,B幀的數量越多,同理也更容易獲得較好的圖像質量。

              需要說明的是,通過提高GOP值來提高圖像質量是有限度的,在遇到場景切換的情況時,H.264編碼器會自動強制插入一個I幀,此時實際的GOP值被縮短了。另一方面,在一個GOP中,P、B幀是由I幀預測得到的,當I幀的圖像質量比較差時,會影響到一個GOP中后續P、B幀的圖像質量,直到下一個GOP開始才有可能得以恢復,所以GOP值也不宜設置過大。

            同時,由于P、B幀的復雜度大于I幀,所以過多的P、B幀會影響編碼效率,使編碼效率降低。另外,過長的GOP還會影響Seek操作的響應速度,由于P、B幀是由前面的I或P幀預測得到的,所以Seek操作需要直接定位,解碼某一個P或B幀時,需要先解碼得到本GOP內的I幀及之前的N個預測幀才可以,GOP值越長,需要解碼的預測幀就越多,seek響應的時間也越長。

             

            x264最近的更新加入了兩個關于keyframe的參數,–open-gop和–keyint infinite。
            所謂open-gop,就是指允許類似IBBPBBIBB的frame結構,它的作用在于提高低keyint設置時的壓縮率。
            –keyint infinite的作用和open-gop正好相反,它為了最大化的利用壓縮率存在的。開啟infinite的open-gop后,除非scene-cut自動判定需要加入keyframe,一般情況下都不會加入keyframe。

            眾所周知,過于頻繁的keyframe存在會降低壓縮率,而一定頻率的keyframe又能保證GOP間的B和P幀擁有良好的預測精度。同時keyframe的存在又保證了編碼視頻的可seek能力這在某些應用場合又是非常關鍵的。所以keyframe的選擇是一個因人而異,因應用場合不同而變化的參數。

            由于open-gop開啟/keyint infinite與open-gop關閉/keyint infinite結果一模一樣,所以不在列出了。這也可以理解,因為兩者對keyframe的控制作用是完全相反的。

            從上面的結果不難看出,開啟open-gop保持現有keyint的設定,或者完全無視open-gop直 接上極端的無窮keyint interval,都能對最終編碼視頻的質量有所提升(opengop的提升很有限)。至于兩者選何者好就要根據實際編碼視頻的質量,以及可播放性來確定 了,如果是極端ep的終極質量追求者,看片子幾乎不seek,那就選擇keyint infinite吧。


            MPEG的格式支持open GOP或者close GOP格式。Close GOP是指幀間的預測都是在GOP中進行的。而使用open GOP,后一個GOP會參考前一個GOP的信息。使用這種方式就大大降低了碼率。

            from: http://www.videohelp.com

            GOP: Group Of Pictures

            A Group Of Pictures (GOP) consists of all the pictures that follow a GOP header before another GOP header.


            The GOP layer allows random access because the first picture after the GOP header is an Intra picture that means that it doesn't need any reference to any other picture.


            The GOP layer is optional, i.e. it's not mandatory to put any GOP header in the bitstream. In the header there is also the timecode of the first picture of the GOP to be displayed.

            The decoding process, as the GOP header is immediately followed by an Intra picture, can begin at that point of the bitstream. Anyway it's possible that some B pictures, following such I_picture in the bitstream, have references coming from the previous GOP and can't be correctly decoded. In this case the GOP is called an Open GOP because some references from the previous GOP exist; if a random access to such a GOP is performed, some B_pictures shouldn't be displayed .
            A GOP is called a Closed GOP when either there are no B_pictures immediately following the first I_picture or such B_pictures haven't any references coming from the previous GOP (in this case a GOP header flag must be set).

            the GOP length is the period (often expressed in frames) by which an Intra frame occursIt must be noticed that such a value cannot be found in the bitstream and it is unnecessary to the decoding process. Furthermore it isn't specified any fixed period for the Intra frame. As the presence of the Intra frames is quite important for many applications, it is the encoder that has to provide them, while the decoder has only to work with all the valid bitstreams.

            例子:

            • 非封閉GOP: I1 P2 B3 B4 P5 B6 B7 

                   I8  B9  B10 P11 B11 B12 P13 B14 B15

                   I16 B16 B17 P18 B19 B20 P21 B22 B23

                   第一個GOP length為9-2幀,從第二個GOP開始為9幀

            • 封閉GOP:

                           I1  P2  B3  B4  P5  B6  B7   

                           I8  P9  B10 B11 P12 B13 B14

                           I15 P16 B17 B18 P19 B20 B21

                   GOP length = 9-2;

            posted on 2013-02-01 13:19 楊粼波 閱讀(1037) 評論(0)  編輯 收藏 引用

            久久婷婷色香五月综合激情| 久久国语露脸国产精品电影| 亚洲AV无码久久精品成人| 国产亚洲精品美女久久久| 久久精品亚洲精品国产欧美| 久久久久久久久久久久中文字幕| 国产精品99久久精品爆乳| 久久久国产乱子伦精品作者| 久久青草国产精品一区| 东京热TOKYO综合久久精品| 青青青国产成人久久111网站| 亚洲国产精品嫩草影院久久| 91精品国产91热久久久久福利| 日韩久久久久久中文人妻| 99久久国产综合精品女同图片| 久久这里只有精品首页| 色综合久久88色综合天天 | 国産精品久久久久久久| 亚洲国产精品久久久久| 久久天天躁狠狠躁夜夜2020一 | 开心久久婷婷综合中文字幕| 久久天堂电影网| 久久久亚洲裙底偷窥综合| 成人国内精品久久久久影院VR| 久久亚洲国产成人精品性色| 日本加勒比久久精品| 99国内精品久久久久久久| 国产精品女同久久久久电影院| 国内精品久久久久影院老司| 成人a毛片久久免费播放| 久久久久中文字幕| 国内精品久久久人妻中文字幕| 久久人人爽人人爽人人爽 | 少妇人妻综合久久中文字幕| 久久国产精品波多野结衣AV| 嫩草影院久久99| 久久亚洲国产中v天仙www | 狠狠色噜噜狠狠狠狠狠色综合久久| 久久精品国产亚洲AV大全| 99精品国产99久久久久久97 | 久久久久亚洲AV无码去区首|