close

這幾天在編我要測試的test sequence

首先我要先編出一個符合工研院的測試版本的test sequence
2 spatial layer, 3 temporal layer

首先two spatial layer好解決

layer 0:176x144
layer 1:352x288

three temporal layer就讓我頭痛了,不過好在多虧同學的幫忙,了解了架構
用IBBB就是3 temporal layer了,所以設GOP size 為4 即可  (一般來說我們GOP size會設32,而表示的temporal layer為5)

在encode的順序為
先去執行Encodexxx.bat →(程式會去call) xxx.cfg →(cfg檔會去參考,各個layer的設定檔)xxx_layer0.cfg,xxx_layer1.cfg

先來看一下今天在.bat檔遇到的問題

本來的原檔
@bin\H264AVCEncoderLibTestStatic -pf cfg\Harbour.cfg -numl 1 -mfile 0 2 mot\Harbour_layer0.mot -anafgs 0 3     tmp\Harbour_FGS0.dat
@bin\H264AVCEncoderLibTestStatic -pf cfg\Harbour.cfg -numl 2 -mfile 1 2 mot\Harbour_layer1.mot -encfgs 0 192.0 tmp\Harbour_FGS0.dat -anafgs 1 3     tmp\Harbour_FGS1.dat
@bin\H264AVCEncoderLibTestStatic -pf cfg\Harbour.cfg -numl 3 -mfile 2 2 mot\Harbour_layer2.mot -encfgs 0 192.0 tmp\Harbour_FGS0.dat -encfgs 1 768.0 tmp\Harbour_FGS1.dat -anafgs 2 3      tmp\Harbour_FGS2.dat
@bin\H264AVCEncoderLibTestStatic -pf cfg\Harbour.cfg -numl 3                                   -encfgs 0 192.0 tmp\Harbour_FGS0.dat -encfgs 1 768.0 tmp\Harbour_FGS1.dat -encfgs 2 3072.0 tmp\Harbour_FGS2.dat

首先前面幾個就是去call bin資料夾下的H264AVCEncoderLibTestStatic.exe 然後將後面的參數位給執行檔
在這邊學長的-anafgs , -enafgs是FGS的參數,先用-anafgs 將yuv跑一次壓縮後,
在第二次-encfgs 0 192.0 tmp\Harbour_FGS0.dat 時給定 bitrate(在這值給192)好取出符合大小的檔案
不過我這版的jsvm只支援MGS所以在這邊執行時,他會顯示出參數餵錯的資訊給我
所以在這邊我改成最簡單版

@bin\H264AVCEncoderLibTestStatic -pf cfg\Harbour.cfg

在Harbour.cfg中我煮要改兩個地方
1.GOP size
-----------------------------------------------------------------------------------------
GOPSize                 4                     # GOP Size (at maximum frame rate)

2.我只壓兩層spatial layer,所以NumLayers改為2,layer2.cfg上註解
-----------------------------------------------------------------------------------------
NumLayers               2                      # Number of layers
LayerCfg                cfg/Harbour_layer0.cfg # Layer configuration file
LayerCfg                cfg/Harbour_layer1.cfg # Layer configuration file
#LayerCfg                cfg/Harbour_layer2.cfg # Layer configuration file

在這邊要注意參考的cfg\Harbour_layer0.cfg和Harbour_layer1.cfg中,

MotionInfoMode  0                       # Motion Info Mode (0:no, 1:load, 2:save )
#MotionInfoFile  mot/HARBOUR_layer0.mot  # Motion Info File

MotionInfoMode 要設為0,因為在這你的motion是要重新編的,
所以不要讓他去讀mot/HARBOUR_layer0.mot 的舊檔
而下面的motion的資訊如不想存檔,MotionInfoFile這行可上註解

以上大概就是這幾點要注意

壓出來結果大概會是這樣

SUMMARY:
                        bitrate    Min-bitr   Y-PSNR   U-PSNR   V-PSNR
                       --------- ---------- -------- -------- --------
   176x144 @  7.5000   227.2064   227.2064  32.6684  39.7117  41.9348
   176x144 @ 15.0000   238.8968   238.8968  32.2479  39.7597  41.9408
   352x288 @  7.5000   596.1232   596.1232  29.3774  38.9976  40.9133
   352x288 @ 15.0000   630.5608   630.5608  29.1308  39.0824  40.9389
   352x288 @ 30.0000   660.1528   660.1528  29.0361  39.0918  40.9191

在352x288會有三個temporal layer
而spatial有172x144,352x288兩個spatial layer

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 angledark0123 的頭像
    angledark0123

    CONY的世界

    angledark0123 發表在 痞客邦 留言(0) 人氣()