• <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>

            牽著老婆滿街逛

            嚴(yán)以律己,寬以待人. 三思而后行.
            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

            轉(zhuǎn)載自:http://blog.sina.com.cn/s/blog_4ae178ba01017ihs.html

            GOP和Reference

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

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

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

              圖3.1 I、P、B幀示意圖

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

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

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

             

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

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

            由于open-gop開啟/keyint infinite與open-gop關(guān)閉/keyint infinite結(jié)果一模一樣,所以不在列出了。這也可以理解,因?yàn)閮烧邔?duì)keyframe的控制作用是完全相反的。

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


            MPEG的格式支持open GOP或者close GOP格式。Close GOP是指幀間的預(yù)測都是在GOP中進(jìn)行的。而使用open GOP,后一個(gè)GOP會(huì)參考前一個(gè)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

                   第一個(gè)GOP length為9-2幀,從第二個(gè)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 楊粼波 閱讀(1041) 評(píng)論(0)  編輯 收藏 引用


            只有注冊用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            久久精品无码一区二区日韩AV| 一个色综合久久| 99热精品久久只有精品| 内射无码专区久久亚洲| 伊人久久大香线蕉亚洲| 国产国产成人久久精品| 久久久久青草线蕉综合超碰| 久久精品国产99国产精偷 | 久久精品国产亚洲αv忘忧草| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 伊人久久精品影院| 精品国产一区二区三区久久久狼| 国产99久久久国产精品~~牛 | 国产精品gz久久久| 色欲久久久天天天综合网| 麻豆精品久久精品色综合| 久久强奷乱码老熟女网站| 久久国产成人午夜aⅴ影院| 91精品国产综合久久婷婷| 合区精品久久久中文字幕一区| 久久精品一区二区| 国产亚洲欧美成人久久片| 久久久久青草线蕉综合超碰| 日韩中文久久| 亚洲国产成人久久笫一页 | 亚洲中文字幕久久精品无码APP| 久久国产精品国语对白| 99久久精品费精品国产| 成人综合伊人五月婷久久| 无遮挡粉嫩小泬久久久久久久 | 久久久久久午夜精品| 久久99精品免费一区二区| 国产精品免费久久| 国产综合免费精品久久久| 精品国产婷婷久久久| 久久久久一级精品亚洲国产成人综合AV区 | 蜜臀久久99精品久久久久久小说| 国内精品久久久久影院薰衣草| 99精品久久久久久久婷婷| 久久亚洲私人国产精品vA| 潮喷大喷水系列无码久久精品|