JSVM中对质量层编码问题的一点认识

来源:互联网 发布:广州知名淘宝电商公司 编辑:程序博客网 时间:2024/06/05 12:48

http://wenku.baidu.com/view/f895b321dd36a32d7375812f.html


对于做质量可伸缩时,为什么设置两层图像输入会得到4个质量层?而且后3个层的QP一样,YUVPSNR是出现在最后?

答:我认为,JSVM实际上只是做了两层的编码。只是在做第二层编码的时候,又分为了3个子层,但这三个子层使用的是同一个QP,分层的依据是layer1.cfg中的变量MGSVectorMode和MGSVector0~MGSVector2。查SoftwareManual中它们的意思可以知道:当MGSVectorMode为1时,JSVM会根据MGSVectorX的不同而分配不同数量的变换系数(默认为4×4的块,所以也说明了为什么MGSVectorX之和一定要是16)给不同的子层。也就是说,我们看到的输出结果中,后3个层加起来才是一个完整的层的数据。所以在最后才输出一个YUVPSNR下面是通过修改layer1层中的MGSVectorMode和MGSVectorX后得到的输出结果。

1、MGSVectorMode=0时(以下都是只编5帧)

# JSVM Main Configuration File

 

OutputFile              test.264   # Bitstream file

FrameRate               30.0       # Maximum frame rate [Hz]

FramesToBeEncoded       5       # Number of frames (at input frame rate)

GOPSize                 16         # GOP Size (at maximum frame rate)

BaseLayerMode           2          # Base layer mode (0: AVC w larger DPB,

                                   #   1:AVC compatible, 2:AVC w subseq SEI)

CgsSnrRefinement        1          # SNR refinement as 1: MGS; 0: CGS

EncodeKeyPictures       1          # Key pics at T=0 (0:none, 1:MGS, 2:all)

MGSControl              2          # ME/MC for non-key pictures in MGS layers

                                   # (0:std, 1:ME with EL, 2:ME+MC with EL)

MGSKeyPicMotRef         1          # motion ref for MGS key pics (0:off, 1:on)

SearchMode              4          # Search mode (0:BlockSearch, 4:FastSearch)

SearchRange             32         # Search range (Full Pel)

NumLayers               2          # Number of layers

LayerCfg                layer0.cfg # Layer configuration file

LayerCfg                layer1.cfg # Layer configuration file

#LayerCfg                layer2.cfg # Layer configuration file

#LayerCfg                layer3.cfg # Layer configuration file

 

# JSVM Layer0 Configuration File

 

InputFile            foreman_4cif.yuv  # Input  file

SourceWidth          352            # Input  frame width

SourceHeight         288            # Input  frame height

FrameRateIn          30             # Input  frame rate [Hz]

FrameRateOut         30             # Output frame rate [Hz]

MGSVectorMode        0              # MGS vector usage selection

 

 

 

# JSVM Layer1 Configuration File

 

InputFile            foreman_4cif.yuv  # Input  file

SourceWidth          352            # Input  frame width

SourceHeight         288            # Input  frame height

FrameRateIn          30             # Input  frame rate [Hz]

FrameRateOut         30             # Output frame rate [Hz]

InterLayerPred       1              # Inter-layer Prediction (0: no, 1: yes, 2:adaptive)

MGSVectorMode        0              # MGS vector usage selection

MGSVector0           4              # Specifies 0th position of the vector

MGSVector1           4              # Specifies 1st position of the vector

MGSVector2           8              # Specifies 2nd position of the vector

 

        

2、MGSVectorMode=1,MGSVector0=16时

由于main.cfg,layer0文件和上述的一样,这里不再给出,只给出layer1层的配置文件。

# JSVM Layer1 Configuration File

 

InputFile            foreman_4cif.yuv  # Input  file

SourceWidth          352            # Input  frame width

SourceHeight         288            # Input  frame height

FrameRateIn          30             # Input  frame rate [Hz]

FrameRateOut         30             # Output frame rate [Hz]

InterLayerPred       1              # Inter-layer Prediction (0: no, 1: yes, 2:adaptive)

MGSVectorMode        1              # MGS vector usage selection

MGSVector0           16              # Specifies 0th position of the vector

 

 

此情况实际跟第一种情况是一个意思。

2、MGSVectorMode=1,MGSVector0=4,MGSVector1=12时

由于main.cfg,layer0文件和上述的一样,这里不再给出,只给出layer1层的配置文件。

# JSVM Layer1 Configuration File

 

InputFile            foreman_4cif.yuv  # Input  file

SourceWidth          352            # Input  frame width

SourceHeight         288            # Input  frame height

FrameRateIn          30             # Input  frame rate [Hz]

FrameRateOut         30             # Output frame rate [Hz]

InterLayerPred       1              # Inter-layer Prediction (0: no, 1: yes, 2:adaptive)

MGSVectorMode        1             # MGS vector usage selection

MGSVector0           4              # Specifies 0th position of the vector

MGSVector1           12              # Specifies 1st position of the vector

2、MGSVectorMode=1,MGSVector0=4,MGSVector1=4,MGSVector2=8时

由于main.cfg,layer0文件和上述的一样,这里不再给出,只给出layer1层的配置文件。

# JSVM Layer1 Configuration File

 

InputFile            foreman_4cif.yuv  # Input  file

SourceWidth          352            # Input  frame width

SourceHeight         288            # Input  frame height

FrameRateIn          30             # Input  frame rate [Hz]

FrameRateOut         30             # Output frame rate [Hz]

InterLayerPred       1              # Inter-layer Prediction (0: no, 1: yes, 2:adaptive)

MGSVectorMode        1             # MGS vector usage selection

MGSVector0           4              # Specifies 0th position of the vector

MGSVector1           4              # Specifies 1st position of the vector

MGSVector2           8              # Specifies 2nd position of the vector

 


0 0
原创粉丝点击