• <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ù)測(cè)編碼圖像幀),利用之前的I幀或P幀,采用運(yùn)動(dòng)預(yù)測(cè)的方式進(jìn)行幀間預(yù)測(cè)編碼
            ● B幀即Bidirectionally predicted picture(雙向預(yù)測(cè)編碼圖像幀),提供最高的壓縮比,它既需要之前的圖
            像幀(I幀或P幀),也需要后來(lái)的圖像幀(P幀),采用運(yùn)動(dòng)預(yù)測(cè)的方式進(jìn)行幀間雙向預(yù)測(cè)編碼

              在視頻編碼序列中,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ì)量。

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

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

             

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

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

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

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


            MPEG的格式支持open GOP或者close GOP格式。Close GOP是指幀間的預(yù)測(cè)都是在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開(kāi)始為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) 評(píng)論(0)  編輯 收藏 引用


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


            久久综合给合久久国产免费| 老男人久久青草av高清| 久久99精品综合国产首页| 狠色狠色狠狠色综合久久| 国产精品丝袜久久久久久不卡| 狠狠色综合久久久久尤物| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区| 亚洲成av人片不卡无码久久 | 一本色道久久88精品综合| 韩国免费A级毛片久久| 国产精品免费久久| 狠狠色婷婷久久综合频道日韩 | 久久一日本道色综合久久| 亚洲嫩草影院久久精品| 亚洲日韩欧美一区久久久久我 | 久久亚洲国产午夜精品理论片 | 色天使久久综合网天天| 久久超乳爆乳中文字幕| 日韩亚洲国产综合久久久| AV无码久久久久不卡网站下载| 久久精品国产福利国产琪琪| 亚洲国产精品无码成人片久久| 国产精品永久久久久久久久久| 亚洲熟妇无码另类久久久| 精品久久人人妻人人做精品 | 久久亚洲中文字幕精品一区四 | 精品国产一区二区三区久久蜜臀| 久久热这里只有精品在线观看| 99久久成人18免费网站| 久久亚洲AV成人无码国产| 日本久久久久久久久久| 国产亚洲美女精品久久久久狼| 久久精品无码一区二区WWW| 大蕉久久伊人中文字幕| 久久国产欧美日韩精品| 色综合久久夜色精品国产| 国产午夜电影久久| 久久精品国产99国产精品澳门| 亚洲精品无码久久久久sm| 久久这里的只有是精品23| 精品久久国产一区二区三区香蕉 |