...
 
Commits (470)
......@@ -56,8 +56,8 @@ SEIDecodedPictureHash : 0
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 1 31 43
QpOutValCb : 1 32 41
QpInValCb : 17 27 32 44
QpOutValCb : 17 29 34 41
TemporalSubsampleRatio : 8
ReWriteParamSets : 1
......
......@@ -82,8 +82,8 @@ SEIDecodedPictureHash : 0
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 32 44
QpOutValCb : 32 41
QpInValCb : 17 22 34 42
QpOutValCb : 17 23 35 39
ReWriteParamSets : 1
#============ NEXT ====================
......
......@@ -82,8 +82,8 @@ SEIDecodedPictureHash : 0
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 32 44
QpOutValCb : 32 41
QpInValCb : 17 22 34 42
QpOutValCb : 17 23 35 39
ReWriteParamSets : 1
#============ NEXT ====================
......
......@@ -93,8 +93,8 @@ SEIDecodedPictureHash : 0
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 32 44
QpOutValCb : 32 41
QpInValCb : 17 22 34 42
QpOutValCb : 17 23 35 39
ReWriteParamSets : 1
#============ NEXT ====================
......
This diff is collapsed.
FieldCoding : 1 # (0: Frame based coding, 1: Field based coding)
TopFieldFirst : 1 # Field parity order (1: Top field first, 0: Bottom field first)
ConformanceMode : 1
VuiParametersPresent : 1
SEIPictureTiming : 1
SEIFrameFieldInfo : 1
IntraPeriod : -1 # Period of I-Frame ( -1 = only first)
DecodingRefreshType : 0 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
GOPSize : 8 # GOP Size (number of B slice = GOPSize-1)
# Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1
Frame1: B 2 5 -6.5 0.2590 0 0 1.0 0 0 0 5 5 1 2 9 10 17 5 5 1 2 9 10 17
Frame2: B 3 5 -6.5 0.2590 0 0 1.0 0 0 0 6 6 1 2 3 10 11 18 6 6 1 2 3 10 11 18
Frame3: B 4 4 -6.5 0.2590 0 0 1.0 0 0 0 7 7 1 2 3 4 11 12 19 7 7 1 2 3 4 11 12 19
Frame4: B 5 4 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 3 4 5 12 13 20 8 8 1 2 3 4 5 12 13 20
Frame5: B 6 5 -6.5 0.2590 0 0 1.0 0 0 0 7 7 1 2 5 6 13 14 21 7 7 1 2 5 6 13 14 21
Frame6: B 7 5 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 3 6 7 14 15 22 8 8 1 2 3 6 7 14 15 22
Frame7: B 8 1 0.0 0.0 0 0 1.0 0 0 0 7 7 1 2 7 8 15 16 23 7 7 1 2 7 8 15 16 23
Frame8: B 9 1 0.0 0.0 0 0 1.0 0 0 0 8 8 1 2 3 8 9 16 17 24 8 8 1 2 3 8 9 16 17 24
# Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 CbTcOffsetDiv2 CbBetaOffsetDiv2 CrTcOffsetDiv2 CrBetaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1
Frame1: B 2 5 -6.5 0.2590 0 0 1.0 0 0 0 0 0 0 0 5 5 1 2 9 10 17 5 5 1 2 9 10 17
Frame2: B 3 5 -6.5 0.2590 0 0 1.0 0 0 0 0 0 0 0 6 6 1 2 3 10 11 18 6 6 1 2 3 10 11 18
Frame3: B 4 4 -6.5 0.2590 0 0 1.0 0 0 0 0 0 0 0 7 7 1 2 3 4 11 12 19 7 7 1 2 3 4 11 12 19
Frame4: B 5 4 -6.5 0.2590 0 0 1.0 0 0 0 0 0 0 0 8 8 1 2 3 4 5 12 13 20 8 8 1 2 3 4 5 12 13 20
Frame5: B 6 5 -6.5 0.2590 0 0 1.0 0 0 0 0 0 0 0 7 7 1 2 5 6 13 14 21 7 7 1 2 5 6 13 14 21
Frame6: B 7 5 -6.5 0.2590 0 0 1.0 0 0 0 0 0 0 0 8 8 1 2 3 6 7 14 15 22 8 8 1 2 3 6 7 14 15 22
Frame7: B 8 1 0.0 0.0 0 0 1.0 0 0 0 0 0 0 0 7 7 1 2 7 8 15 16 23 7 7 1 2 7 8 15 16 23
Frame8: B 9 1 0.0 0.0 0 0 1.0 0 0 0 0 0 0 0 8 8 1 2 3 8 9 16 17 24 8 8 1 2 3 8 9 16 17 24
FieldCoding : 1 # (0: Frame based coding, 1: Field based coding)
TopFieldFirst : 1 # Field parity order (1: Top field first, 0: Bottom field first)
ConformanceMode : 1
VuiParametersPresent : 1
SEIPictureTiming : 1
SEIFrameFieldInfo : 1
IntraPeriod : 32 # Period of I-Frame ( -1 = only first)
DecodingRefreshType : 1 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
GOPSize : 16 # GOP Size (number of B slice = GOPSize-1)
# Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1
Frame1: B 17 1 0.0 0.0 0 0 0.442 0 0 0 4 4 16 17 20 21 4 4 16 17 20 21
Frame2: B 16 1 0.0 0.0 0 0 0.442 0 0 0 3 3 15 16 -1 3 3 -1 15 16
Frame3: B 8 2 0.0 0.0 0 0 0.3536 0 0 1 2 4 7 8 -8 -9 2 4 -8 -9 7 8
Frame4: B 9 2 0.0 0.0 0 0 0.3536 0 0 1 2 5 1 8 9 -7 -8 2 5 -7 -8 1 8 9
Frame5: B 4 3 0.0 0.0 0 0 0.3536 0 0 2 2 4 3 4 -4 -5 2 4 -4 -5 -12 -13
Frame6: B 5 3 0.0 0.0 0 0 0.3536 0 0 2 2 5 1 4 5 -3 -4 2 4 -3 -4 -11 -12
Frame7: B 2 4 0.0 0.0 0 0 0.68 0 0 3 2 4 1 2 -2 -3 2 6 -2 -3 -6 -7 -14 -15
Frame8: B 3 4 0.0 0.0 0 0 0.68 0 0 3 2 4 1 2 -1 -2 2 6 -1 -2 -5 -6 -13 -14
Frame9: B 6 4 0.0 0.0 0 0 0.68 0 0 3 2 4 1 2 -2 -3 2 4 -2 -3 -10 -11
Frame10: B 7 4 0.0 0.0 0 0 0.68 0 0 3 2 5 1 2 3 -1 -2 2 4 -1 -2 -9 -10
Frame11: B 12 3 0.0 0.0 0 0 0.3536 0 0 2 2 4 3 4 -4 -5 2 4 -4 -5 3 4
Frame12: B 13 3 0.0 0.0 0 0 0.3536 0 0 2 2 5 1 4 5 -3 -4 2 5 -3 -4 1 4 5
Frame13: B 10 4 0.0 0.0 0 0 0.68 0 0 3 2 4 1 2 -2 -3 2 4 -2 -3 -6 -7
Frame14: B 11 4 0.0 0.0 0 0 0.68 0 0 3 2 5 1 2 3 -1 -2 2 4 -1 -2 -5 -6
Frame15: B 14 4 0.0 0.0 0 0 0.68 0 0 3 2 5 1 2 5 -2 -3 2 4 -2 -3 1 2
Frame16: B 15 4 0.0 0.0 0 0 0.68 0 0 3 2 4 1 2 3 6 2 4 -1 -2 1 2
# Type POC QPoffset QPOffsetModelOff QPOffsetModelScale CbQPoffset CrQPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 CbTcOffsetDiv2 CbBetaOffsetDiv2 CrTcOffsetDiv2 CrBetaOffsetDiv2 temporal_id #ref_pics_active_L0 #ref_pics_L0 reference_pictures_L0 #ref_pics_active_L1 #ref_pics_L1 reference_pictures_L1
Frame1: B 17 1 0.0 0.0 0 0 0.442 0 0 0 0 0 0 0 4 4 16 17 20 21 4 4 16 17 20 21
Frame2: B 16 1 0.0 0.0 0 0 0.442 0 0 0 0 0 0 0 3 3 15 16 -1 3 3 -1 15 16
Frame3: B 8 2 0.0 0.0 0 0 0.3536 0 0 0 0 0 0 1 2 4 7 8 -8 -9 2 4 -8 -9 7 8
Frame4: B 9 2 0.0 0.0 0 0 0.3536 0 0 0 0 0 0 1 2 5 1 8 9 -7 -8 2 5 -7 -8 1 8 9
Frame5: B 4 3 0.0 0.0 0 0 0.3536 0 0 0 0 0 0 2 2 4 3 4 -4 -5 2 4 -4 -5 -12 -13
Frame6: B 5 3 0.0 0.0 0 0 0.3536 0 0 0 0 0 0 2 2 5 1 4 5 -3 -4 2 4 -3 -4 -11 -12
Frame7: B 2 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 4 1 2 -2 -3 2 6 -2 -3 -6 -7 -14 -15
Frame8: B 3 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 4 1 2 -1 -2 2 6 -1 -2 -5 -6 -13 -14
Frame9: B 6 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 4 1 2 -2 -3 2 4 -2 -3 -10 -11
Frame10: B 7 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 5 1 2 3 -1 -2 2 4 -1 -2 -9 -10
Frame11: B 12 3 0.0 0.0 0 0 0.3536 0 0 0 0 0 0 2 2 4 3 4 -4 -5 2 4 -4 -5 3 4
Frame12: B 13 3 0.0 0.0 0 0 0.3536 0 0 0 0 0 0 2 2 5 1 4 5 -3 -4 2 5 -3 -4 1 4 5
Frame13: B 10 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 4 1 2 -2 -3 2 4 -2 -3 -6 -7
Frame14: B 11 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 5 1 2 3 -1 -2 2 4 -1 -2 -5 -6
Frame15: B 14 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 5 1 2 5 -2 -3 2 4 -2 -3 1 2
Frame16: B 15 4 0.0 0.0 0 0 0.68 0 0 0 0 0 0 3 2 4 1 2 3 6 2 4 -1 -2 1 2
CostMode : lossless
BDPCM : 1
ChromaTS : 1
BDPCM : 1
DepQuant : 0
RDOQ : 1
RDOQTS : 1
SBT : 0
LMCSEnable : 0
ISP : 0
MTS : 0
LFNST : 0
JointCbCr : 0
LoopFilterDisable : 0
SAO : 1
ALF : 1
CCALF : 0
DMVR : 0
BIO : 0
PROF : 0
Log2MaxTbSize : 5
InternalBitDepth : 0
TSRCdisableLL : 1
# Configuration to achieve mixed-lossy lossless coding
QP : 55 # Quantization parameter for lossy slices
CbQpOffset : 0
CrQpOffset : 0
SliceLevelDblk : 1
SliceLevelAlf : 1
SliceLevelSao : 1
SignHideFlag : 0
MixedLossyLossless : 1
SliceLosslessArray : 1 2 # slices with index 1 and 2 are lossless coded
#============ Tiles / Slices ================
EnablePicPartitioning : 1 # Enable picture partitioning (0: single tile, single slice, 1: multiple tiles/slices can be used)
TileColumnWidthArray : 3 3 3 3 3 3 # Tile column widths in units of CTUs. Last column width will be repeated uniformly to cover any remaining picture width
TileRowHeightArray : 3 3 3 3 # Tile row heights in units of CTUs. Last row height will be repeated uniformly to cover any remaining picture height
RasterScanSlices : 0 # Raster-scan or rectangular slices (0: rectangular, 1: raster-scan)
RectSliceFixedWidth : 1 # Fixed rectangular slice width in units of tiles (0: disable this feature and use RectSlicePositions instead)
RectSliceFixedHeight : 1 # Fixed rectangular slice height in units of tiles (0: disable this feature and use RectSlicePositions instead)
DisableLoopFilterAcrossTiles : 1 # Loop filtering (DBLK/SAO/ALF) applied across tile boundaries or not (0: filter across tile boundaries 1: do not filter across tile boundaries)
DisableLoopFilterAcrossSlices : 1 # Loop filtering (DBLK/SAO/ALF) applied across slice boundaries or not (0: filter across slice boundaries 1: do not filter across slice boundaries)
#======== Layers ===============
MaxLayers : 2
MaxSublayers : 1
MaxSublayers : 7
AllLayersSameNumSublayersFlag : 0
AllIndependentLayersFlag : 0
#======== OLSs ===============
......
#======== Layers ===============
MaxLayers : 2
MaxSublayers : 1
AllLayersSameNumSublayersFlag : 0
AllIndependentLayersFlag : 0
AllowablePredDirection : 1 1 1 1 1 # equal to 0 specifies the picture in the i-th temporal layer is allowed to use both inter-layer and intra-layer preditions
# equal to 1 specifies the picture in the i-th temporal layer is allowed to use inter-layer predition only
# equal to 2 specifies the picture in the i-th temporal layer is allowed to use intra-layer predition only
#======== OLSs ===============
EachLayerIsAnOlsFlag : 0
OlsModeIdc : 2
NumOutputLayerSets : 2
OlsOutputLayer1 : 1 0
NumPTLsInVPS : 2
#======== Layer-0 ===============
LayerId0 : 0
#======== Layer-1 ===============
LayerId1 : 1
NumRefLayers1 : 1
RefLayerIdx1 : 0
#======== OLS-0 ===============
OlsPTLIdx0 : 0
#======== OLS-1 ===============
LevelPTL1 : 6.2
OlsPTLIdx1 : 1
# example config file for MaxTidILRefPicsPlus1
# combines with random-access GOP config file
#======== Layers ===============
MaxLayers : 2
MaxSublayers : 7 # allow up to 7 temporal layers
AllLayersSameNumSublayersFlag : 0
AllIndependentLayersFlag : 0
MaxTidILRefPicsPlus1 : 3 # don't use pictures with temoporal_id > 2 for inter-layer reference
#======== OLSs ===============
EachLayerIsAnOlsFlag : 0
OlsModeIdc : 2
NumOutputLayerSets : 2
OlsOutputLayer1 : 1 # only one output layer in OLS #1
NumPTLsInVPS : 2
#======== Layer-0 ===============
LayerId0 : 0
#======== Layer-1 ===============
LayerId1 : 1
NumRefLayers1 : 1
RefLayerIdx1 : 0
#======== OLS-0 ===============
OlsPTLIdx0 : 0
#======== OLS-1 ===============
LevelPTL1 : 6.2
OlsPTLIdx1 : 1
#======== File I/O ===============
InputFile : BasketballDrillText_832x480_50.yuv
InputBitDepth : 8 # Input bitdepth
InputChromaFormat : 420 # Ratio of luminance to chrominance samples
FrameRate : 50 # Frame Rate per second
FrameSkip : 0 # Number of frames to be skipped in input
SourceWidth : 832 # Input frame width
SourceHeight : 480 # Input frame height
FramesToBeEncoded : 500 # Number of frames to be coded
Level : 3.1
#============ Subpictures ==================
# example cfg file, assuming an 832x480 input sequence with CTU size = 128x128, and split to 4 rectangular slices, each slice include one tile.
# example 2 subpictures in a 832x480 picture:
#----------
#| | |
#| | |
#|----|---|--> horizontally divided into 2 subpicture, each subpicture contains two slices
#| | |
#| | |
#----------
SubPicInfoPresentFlag : 1 # subpicture information present flag(0: OFF, 1: ON)
NumSubPics : 2 # number of subpictures in a picture
SubPicCtuTopLeftX : 0 0 # specifies horizontal position of top left CTU of i-th subpicture in unit of CtbSizeY
SubPicCtuTopLeftY : 0 2 # specifies vertical position of top left CTU of i-th subpicture in unit of CtbSizeY
SubPicWidth : 7 7 # specifies the width of the i-th subpicture in units of CtbSizeY
SubPicHeight : 2 2 # specifies the height of the i-th subpicture in units of CtbSizeY
SubPicTreatedAsPicFlag : 1 1 # equal to 1 specifies that the i-th subpicture of each coded picture in the CLVS is treated as a picture in the decoding process excluding in-loop filtering operations
LoopFilterAcrossSubpicEnabledFlag : 0 0 # equal to 1 specifies that in-loop filtering operations may be performed across the boundaries of the i-th subpicture in each coded picture in the CLVS
SubPicIdMappingExplicitlySignalledFlag : 0 # equal to 1 specifies that the subpicture ID mapping is explicitly signalled, either in the SPS or in the PPSs
SubPicIdMappingInSpsFlag : 0 # specifies that subpicture ID mapping is signalled in the SPS(0: OFF, 1: ON)
SubPicIdLen : 0 # the number of bits used to represent the syntax element sps_subpic_id[ i ]
SubPicId : 0 # subpicture ID of the i-th subpicture
#============ Tiles / Slices ================
EnablePicPartitioning : 1 # Enable picture partitioning (0: single tile, single slice, 1: multiple tiles/slices can be used)
# 24 tiles and 6 rectangular slices
TileColumnWidthArray : 4 # Tile column widths in units of CTUs. Last column width will be repeated uniformly to cover any remaining picture width
TileRowHeightArray : 2 # Tile row heights in units of CTUs. Last row height will be repeated uniformly to cover any remaining picture height
RasterScanSlices : 0 # Raster-scan or rectangular slices (0: rectangular, 1: raster-scan)
RectSliceFixedWidth : 1 # Fixed rectangular slice width in units of tiles (0: disable this feature and use RectSlicePositions instead)
RectSliceFixedHeight : 1 # Fixed rectangular slice height in units of tiles (0: disable this feature and use RectSlicePositions instead)
DisableLoopFilterAcrossTiles : 1 # Loop filtering (DBLK/SAO/ALF) applied across tile boundaries or not (0: filter across tile boundaries 1: do not filter across tile boundaries)
DisableLoopFilterAcrossSlices : 1 # Loop filtering (DBLK/SAO/ALF) applied across slice boundaries or not (0: filter across slice boundaries 1: do not filter across slice boundaries)
WaveFrontSynchro : 1 # Enable entropy coding synchronization, a.k.a. wavefront parallel processing (WPP) (0: entropy coding sync disabled; 1 entropy coding sync enabled)
# example config file for a corner test case:
# set single_slice_per_subpic_flag equal to 1, while subpicture_info_present_flag is equal to 0
# requires special handling, when RPR is enabled (which is allowed because subpicture_info_present_flag is equal to 0) and tiles are present
#
# example command line:
# ./EncoderApp -c ../cfg/encoder_randomaccess_vtm.cfg -c ../cfg/per-sequence/RaceHorses.cfg -q 42 -f 5 --SEIDecodedPictureHash=1 -c ../cfg/partitioning/rpr_no_subpic_single_slice_per_subpic.cfg
ScalingRatioHor : 2.0 # enable horizontal scaling
ScalingRatioVer : 2.0 # enable vertical scaling
UpscaledOutput : 1 # upscale output
EnablePicPartitioning : 1 # enable signalling of picture partitioning
SingleSlicePerSubpic : 1 # single_slice_per_subpic_flag equal to 1
RasterScanSlices : 0 # rectangular slices
TileColumnWidthArray : 2 # two tiles horizontally
TileRowHeightArray : 2 # two tiles vertically
Level : 6 # level increase required for small tiles (because of subsampling)
#============ Scaling List ======================
ScalingList : 2 # Scaling list: 0: no scaling list, 2: scaling lists specified in ScalingListFile
ScalingListFile : sample_scaling_list_file.txt
# ScalingListFile
# The matrices in this sample file are inherited from JCTVC-H1104.
INTRA2X2_LUMA =
7,19
19,41
INTRA2X2_CHROMAU =
7,19
19,41
INTRA2X2_CHROMAV =
7,19
19,41
INTER2X2_LUMA =
11,30
30,50
INTER2X2_CHROMAU =
11,30
30,50
INTER2X2_CHROMAV =
11,30
30,50
INTRA4X4_LUMA =
7,12,19,26
12,16,24,40
19,24,41,50
26,40,50,56
INTRA4X4_CHROMAU =
7,12,19,26
12,16,24,40
19,24,41,50
26,40,50,56
INTRA4X4_CHROMAV =
7,12,19,26
12,16,24,40
19,24,41,50
26,40,50,56
INTER4X4_LUMA =
11,18,30,43
18,22,40,50
30,40,50,52
43,50,52,55
INTER4X4_CHROMAU =
11,18,30,43
18,22,40,50
30,40,50,52
43,50,52,55
INTER4X4_CHROMAV =
11,18,30,43
18,22,40,50
30,40,50,52
43,50,52,55
INTRA8X8_LUMA =
6, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA8X8_CHROMAU =
6, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA8X8_CHROMAV =
6, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTER8X8_LUMA =
9,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER8X8_CHROMAU =
9,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER8X8_CHROMAV =
9,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTRA16X16_LUMA =
6, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA16X16_LUMA_DC =
6
INTRA16X16_CHROMAU =
7, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA16X16_CHROMAU_DC =
6
INTRA16X16_CHROMAV =
7, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA16X16_CHROMAV_DC =
6
INTER16X16_LUMA =
11,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER16X16_LUMA_DC =
9
INTER16X16_CHROMAU =
11,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER16X16_CHROMAU_DC =
9
INTER16X16_CHROMAV =
11,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER16X16_CHROMAV_DC =
9
INTRA32X32_LUMA =
7, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA32X32_LUMA_DC =
6
INTRA32X32_CHROMAU =
7, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA32X32_CHROMAU_DC =
6
INTRA32X32_CHROMAV =
7, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA32X32_CHROMAV_DC =
6
INTER32X32_LUMA =
11,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER32X32_LUMA_DC =
9
INTER32X32_CHROMAU =
11,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER32X32_CHROMAU_DC =
9
INTER32X32_CHROMAV =
11,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER32X32_CHROMAV_DC =
9
INTRA64X64_LUMA =
7, 9,13,18,25,35,36,37
9,10,15,21,32,35,37,41
13,15,18,23,35,55,58,59
18,21,23,26,65,58,64,66
25,32,35,65,66,66,67,70
35,35,55,58,66,68,70,73
36,37,58,64,67,70,76,80
37,41,59,66,70,73,80,85
INTRA64X64_LUMA_DC =
6
INTER64X64_LUMA =
11,15,20,29,36,38,42,43
15,17,22,29,39,43,45,46
20,22,32,34,47,48,49,50
29,29,34,44,50,51,52,53
36,39,47,50,51,52,55,55
38,43,48,51,52,53,56,58
42,45,49,52,55,56,55,60
43,46,50,53,55,58,60,63
INTER64X64_LUMA_DC =
9
SEIParameterSetsInclusionIndication: 1
SEISelfContainedClvsFlag: 1
SEIBufferingPeriod: 1
SEIPictureTiming: 1
VuiParametersPresent: 1
HrdParametersPresent: 1
RCCpbSize: 2000
......@@ -8,6 +8,8 @@ ColourPrimaries: 1 // the source colour primaries according
TransferCharacteristics: 1 // transfer characteristics function according to Rec. ITU-T H.273 | ISO/IEC 23091-2
MatrixCoefficients: 1 // the formulae used in deriving luma and chroma signals acc. to Rec. ITU-T H.273 | ISO/IEC 23091-2
VideoFullRange: 0 // scaling and offset values applied according to Rec. ITU-T H.273 | ISO/IEC 23091-2
ProgressiveSource: 1 // indicates if content is progressive
InterlacedSource: 0 // indicates if content is interlaced
ChromaLocInfoPresent: 1 // enable presence of chroma location information
ChromaSampleLocTypeTopField: 0 // the location of chroma sample top field
ChromaSampleLocTypeBottomField: 0 // the location of chroma sample bottom field
......
......@@ -8,6 +8,8 @@ ColourPrimaries: 9 // the source colour primaries according
TransferCharacteristics: 16 // transfer characteristics function according to Rec. ITU-T H.273 | ISO/IEC 23091-2
MatrixCoefficients: 9 // the formulae used in deriving luma and chroma signals acc. to Rec. ITU-T H.273 | ISO/IEC 23091-2
VideoFullRange: 0 // scaling and offset values applied according to Rec. ITU-T H.273 | ISO/IEC 23091-2
ProgressiveSource: 1 // Indicates if content is progressive
InterlacedSource: 0 // Indicates if content is interlaced
ChromaLocInfoPresent: 1 // enable presence of chroma location information
ChromaSampleLocTypeTopField: 2 // the location of chroma sample top field
ChromaSampleLocTypeBottomField: 2 // the location of chroma sample bottom field
......
No preview for this file type
......@@ -205,7 +205,7 @@ fontsize=\footnotesize}
\maketitle
\begin{abstract}
This document is a user manual describing usage of the VTM reference software
for the VVC project. It applies to version 8.1 of the software.
for the VVC project. It applies to version 9.2 of the software.
\end{abstract}
\tableofcontents
......@@ -954,25 +954,15 @@ multiple matches.
\Default{none} &
Specifies the profile to which the encoded bitstream complies.
Valid HEVC Ver. 1 values are: none, main, main10, main-still-picture
Valid HEVC Ver. 2 (RExt) values are: main-RExt, high-throughput-RExt,
monochrome, monochrome12, monochrome16, main12, main_422_10,
main_422_12, main_444, main_444_10, main_444_12, main_444_16,
main_intra, main_10_intra, main_12_intra, main_422_10_intra, main_422_12_intra,
main_444_intra, main_444_10_intra, main_444_12_intra, main_444_16_intra.
When main-RExt is specified, the constraint flags are either manually specified, or calculated via the other supplied settings.
Compatibility flags are automatically determined according to the profile.
NB: There is currently only limited validation that the encoder configuration complies with the profile, level and tier constraints.
Valid VVC Ver. 1 values are: none, main_10, main_10_still_picture, main_444_10, main_444_10_still_picture.
When one of the still picture profiles are selected, the OnePictureOnlyConstraintFlag setting will be forced to 1.
\\
\Option{Level} &
%\ShortOption{\None} &
\Default{none} &
Specifies the level to which the encoded bitstream complies.
Valid values are: none, 1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2, 8.5
Valid values are: none, 1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2, 15.5
NB: There is currently only limited validation that the encoder configuration complies with the profile, level and tier constraints.
\\
......@@ -1019,7 +1009,7 @@ For --profile=main-RExt, specifies the value of general_intra_constraint_flag to
\Option{OnePictureOnlyConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
For --profile=main-RExt, specifies the value of general_one_picture_only_constraint_flag to use for RExt profiles.
Specifies the value of general_one_picture_only_constraint_flag.
\\
\Option{LowerBitRateConstraintFlag} &
......@@ -1028,34 +1018,34 @@ For --profile=main-RExt, specifies the value of general_one_picture_only_constra
Specifies the value of general_lower_bit_constraint_flag to use for RExt profiles.
\\
\Option{ProgressiveSource} &
\Option{NonPackedSource} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of general_progressive_source_flag
Specifies the value of general_non_packed_constraint_flag
\\
\Option{InterlacedSource} &
\Option{NonProjectedConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of general_interlaced_source_flag
Specifies the value of general_non_projected_constraint_flag
\\
\Option{NonPackedSource} &
\Option{NoResChangeInClvsConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of general_non_packed_constraint_flag
Specifies the value of no_res_change_in_clvs_constraint_flag
\\
\Option{NonProjectedConstraintFlag} &
\Option{SingleLayerConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of general_non_projected_constraint_flag
Specifies the value of single_layer_constraint_flag
\\
\Option{NoResChangeInClvsConstraintFlag} &
\Option{AllLayersIndependentConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of no_res_change_in_clvs_constraint_flag
Specifies the value of all_layers_independent_constraint_flag
\\
\Option{OneTilePerPicConstraintFlag} &
......@@ -1064,6 +1054,12 @@ Specifies the value of no_res_change_in_clvs_constraint_flag
Specifies the value of one_tile_per_pic_constraint_flag
\\
\Option{PicHeaderInSliceHeaderConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
Specifies the value of pic_header_in_slice_header_constraint_flag
\\
\Option{OneSlicePerPicConstraintFlag} &
%\ShortOption{\None} &
\Default{false} &
......@@ -1098,7 +1094,7 @@ Specifies the value to use to derive the vps_max_layers_minus1 for layered codin
\Option{MaxSubLayers} &
%\ShortOption{\None} &
\Default{1} &
\Default{7} &
Specifies the maximum number of temporal sublayers to signal in the VPS
\\
......@@ -1108,6 +1104,18 @@ Specifies the maximum number of temporal sublayers to signal in the VPS
Specifies the value of vps_all_layers_same_num_sublayers_flag in the VPS
\\
\Option{AllowablePredDirection} &
%\ShortOption{\None} &
\Default{""} &
Specifies a list of values of the allowable prediction directions for dependent layers. The number of entries is equal to the number of temporal layers.
\par
\begin{tabular}{cp{0.45\textwidth}}
0 & Both inter-layer and intra-layer preditions are allowed for the speficied temporal layer. \\
1 & Only inter-layer predition is allowed for the speficied temporal layer. \\
2 & Only intra-layer predition is allowed for the speficied temporal layer. \\
\end{tabular}
\\
\Option{LayerId\emph{i}} &
%\ShortOption{\None} &
\Default{0} &
......@@ -1167,6 +1175,25 @@ Specifies the level to signal in the i-th PTL of the VPS (with i an integer grea
\Default{0} &
Specifies the index of the PTL that applies to the i-th OLS (with i an integer greater than 0)
\\
\Option{SamePicTimingInAllOLS} &
%\ShortOption{\None} &
\Default{1} &
Indicates that all OLSs are using the same (not nested) picture timing SEI message, i.e. picture timing SEI will not
be included in scalable nesting SEI messages (if scalable nesting SEI is enabled).
\\
\Option{MaxTidILRefPicsPlus1} &
%\ShortOption{\None} &
\Default{-1} &
Specifies the maximum temporal ID for inter-layer reference pictures plus 1. The value 0 allows only to use IRAP pictures for inter-layer prediction.
\\
\Option{AvoidIntraInDepLayer} &
%\ShortOption{\None} &
\Default{1} &
Replaces I slices in dependent layers with B slices, except for all-intra configuration (IntraPeriod=1).
\\
\end{OptionTableNoShorthand}
......@@ -1935,6 +1962,18 @@ is output and the encoder stops.
Specifies whether scaling matrices are to be applied to blocks coded with LFNST.
\\
\Option{DisableScalingMatrixForAlternativeColourSpace} &
%\ShortOption{\None} &
\Default{true} &
Specifies whether scaling matrices are disabled to blocks when the colour space is not equal to the designated colour space of scaling matrices.
\\
\Option{ScalingMatrixDesignatedColourSpace} &
%\ShortOption{\None} &
\Default{true} &
Indicates if the designated colour space of scaling matrices is equal to the original colour space.
\\
\Option{MaxCUChromaQpAdjustmentDepth} &
%\ShortOption{\None} &
\Default{-1} &
......@@ -2036,6 +2075,18 @@ Allow signalling of entry points for WPP in slice header.
Note that when a slice contains more than one tile, entry point offsets for tile are always present in the slice header.
\\
\Option{MixedLossyLossless} &
%\ShortOption{\None} &
\Default{0} &
Enable or disable mixed lossy/lossless coding. 0 means disable; 1 means enable. Mixed lossy/lossless can only be enable if CostMode is set to lossless.
\\
\Option{SliceLosslessArray} &
%\ShortOption{\None} &
\Default{\None} &
Slice index array of lossless slices. Example: 1 5 6 means slices with index of 1, 5, and 6 are lossless coded. The rest of the slices are lossy coded. If MixedLossyLossless is disbaled, the values are ignored.
\\
\end{OptionTableNoShorthand}
%%
......@@ -2859,6 +2910,14 @@ Indicates the black level and range of luma and chroma signals.
1 & Indicates that the luma and chroma signals are not to be scaled prior to display. \\
\end{tabular}
\\
\Option{ProgressiveSource} &
\Default{false} &
Specifies the value of general_progressive_source_flag
\\
\Option{InterlacedSource} &
\Default{false} &
Specifies the value of general_interlaced_source_flag
\\
\Option{ChromaLocInfoPresent} &
\Default{false} &
Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present.
......@@ -2970,7 +3029,7 @@ The table below lists the SEI messages defined for Version 1 and Range-Extension
47 & Display orientation & Table \ref{tab:sei-display-orientation} \\
56 & Green Metadata & Table \ref{tab:sei-green-metadata} \\
128 & Structure of pictures information & Table \ref{tab:sei-sop-info} \\
129 & Active parameter sets & Table \ref{tab:sei-active-parameter-sets} \\
129 & Parameter sets inclusion indication & Table \ref{tab:sei-parameter-sets-inclusion-indication} \\
130 & Decoding unit information & Table \ref{tab:sei-decoding-unit-info} \\
131 & Temporal sub-layer zero index & Table \ref{tab:sei-temporal-level-0} \\
132 & Decoded picture hash & Table \ref{tab:sei-decoded-picture-hash} \\
......@@ -3354,11 +3413,14 @@ Enables or disables the insertion of the Structure of pictures information SEI m
\begin{OptionTableNoShorthand}{Active parameter sets SEI message encoder parameters}{tab:sei-active-parameter-sets}
\Option{SEIActiveParameterSets} &
\begin{OptionTableNoShorthand}{Parameter sets inclusion indication SEI message encoder parameters}{tab:sei-parameter-sets-inclusion-indication}
\Option{SEIParameterSetsInclusionIndication} &
\Default{0} &
Enables or disables the insertion of the Active parameter sets
SEI messages.
Enables or disables the insertion of the Parameter sets inclusion SEI messages.
\\
\Option{SEISelfContainedClvsFlag} &
\Default{0} &
When equal to 1, the SEI specifies that the CLVS contains all the required NAL units for decoding the CLVS that is associated with the SEI message and that sublayer up-switching within the CLVS works without a need of fetching parameter sets from PUs earlier in decoding order than the PU containing the picture at which the sublayer up-switching occurs.
\\
\end{OptionTableNoShorthand}
......
......@@ -46,7 +46,9 @@
#include "EncoderLib/AnnexBwrite.h"
BitstreamExtractorApp::BitstreamExtractorApp()
:m_vpsId(-1)
:m_vpsId(0)
, m_removeTimingSEI (false)
{
}
......@@ -56,8 +58,8 @@ void BitstreamExtractorApp::xPrintVPSInfo (VPS *vps)
msg (VERBOSE, " VPS ID : %d\n", vps->getVPSId());
msg (VERBOSE, " Max layers : %d\n", vps->getMaxLayers());
msg (VERBOSE, " Max sub-layers : %d\n", vps->getMaxSubLayers());
msg (VERBOSE, " Number of OLS : %d\n", vps->getNumOutputLayerSets());
for (int olsIdx=0; olsIdx < vps->getNumOutputLayerSets(); olsIdx++)
msg (VERBOSE, " Number of OLS : %d\n", vps->getTotalNumOLSs());
for (int olsIdx=0; olsIdx < vps->getTotalNumOLSs(); olsIdx++)
{
vps->deriveTargetOutputLayerSet(olsIdx);
msg (VERBOSE, " OLS # %d\n", olsIdx);
......@@ -112,7 +114,7 @@ bool BitstreamExtractorApp::xCheckSliceSubpicture(InputNALUnit &nalu, int target
slice.setNalUnitLayerId(nalu.m_nuhLayerId);
slice.setTLayer(nalu.m_temporalId);
m_hlSynaxReader.parseSliceHeader(&slice, &m_picHeader, &m_parameterSetManager, m_prevTid0Poc);
m_hlSynaxReader.parseSliceHeader(&slice, &m_picHeader, &m_parameterSetManager, m_prevTid0Poc, m_prevPicPOC);
PPS *pps = m_parameterSetManager.getPPS(m_picHeader.getPPSId());
CHECK (nullptr==pps, "referenced PPS not found");
......@@ -348,6 +350,15 @@ void BitstreamExtractorApp::xWritePPS(PPS *pps, std::ostream& out, int layerId,
writeAnnexB (out, tmpAu);
}
// returns true, if the NAL unit is to be discarded
bool BitstreamExtractorApp::xCheckNumSubLayers(InputNALUnit &nalu, VPS *vps)
{
bool retval = (nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP) && (nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_W_RADL) && (nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA);
retval &= nalu.m_temporalId >= vps->getNumSubLayersInLayerInOLS(m_targetOlsIdx, vps->getGeneralLayerIdx(nalu.m_nuhLayerId));
return retval;
}
uint32_t BitstreamExtractorApp::decode()
{
......@@ -365,6 +376,7 @@ uint32_t BitstreamExtractorApp::decode()
bitstreamFileIn.seekg( 0, std::ios::beg );
int unitCnt = 0;
bool lastSliceWritten= false; // stores status of previous slice for associated filler data NAL units
VPS *vpsIdZero = new VPS();
std::vector<uint8_t> empty;
......@@ -422,25 +434,26 @@ uint32_t BitstreamExtractorApp::decode()
if (m_targetOlsIdx >= 0)
{
// if there is no VPS nal unit, there shall be one OLS and one layer.
if (m_vpsId == -1)
if (m_vpsId == 0)
{
CHECK(m_targetOlsIdx != 0, "only one OLS and one layer exist, but target olsIdx is not equal to zero");
vps = new VPS();
vps->setNumLayersInOls(0, 1);
vps->setLayerIdInOls(0, 0, nalu.m_nuhLayerId);
}
else
// Remove NAL units with nal_unit_type not equal to any of VPS_NUT, DPS_NUT, and EOB_NUT and with nuh_layer_id not included in the list LayerIdInOls[targetOlsIdx].
NalUnitType t = nalu.m_nalUnitType;
bool isSpecialNalTypes = t == NAL_UNIT_VPS || t == NAL_UNIT_DCI || t == NAL_UNIT_EOB;
vps = m_parameterSetManager.getVPS(m_vpsId);
if (m_vpsId == 0)
{
// Remove NAL units with nal_unit_type not equal to any of VPS_NUT, DPS_NUT, and EOB_NUT and with nuh_layer_id not included in the list LayerIdInOls[targetOlsIdx].
NalUnitType t = nalu.m_nalUnitType;
bool isSpecialNalTypes = t == NAL_UNIT_VPS || t == NAL_UNIT_DCI || t == NAL_UNIT_EOB;
vps = m_parameterSetManager.getVPS(m_vpsId);
uint32_t numOlss = vps->getNumOutputLayerSets();
CHECK(m_targetOlsIdx <0 || m_targetOlsIdx >= numOlss, "target Ols shall be in the range of OLSs specified by the VPS");
std::vector<int> LayerIdInOls = vps->getLayerIdsInOls(m_targetOlsIdx);
bool isIncludedInTargetOls = std::find(LayerIdInOls.begin(), LayerIdInOls.end(), nalu.m_nuhLayerId) != LayerIdInOls.end();
writeInpuNalUnitToStream &= (isSpecialNalTypes || isIncludedInTargetOls);
// this initialization can be removed once the dummy VPS is properly initialized in the parameter set manager
vps->deriveOutputLayerSets();
}
uint32_t numOlss = vps->getTotalNumOLSs();
CHECK(m_targetOlsIdx <0 || m_targetOlsIdx >= numOlss, "target Ols shall be in the range of OLSs specified by the VPS");
std::vector<int> layerIdInOls = vps->getLayerIdsInOls(m_targetOlsIdx);
bool isIncludedInTargetOls = std::find(layerIdInOls.begin(), layerIdInOls.end(), nalu.m_nuhLayerId) != layerIdInOls.end();
writeInpuNalUnitToStream &= (isSpecialNalTypes || isIncludedInTargetOls);
writeInpuNalUnitToStream &= !xCheckNumSubLayers(nalu, vps);
m_removeTimingSEI = !vps->getGeneralHrdParameters()->getGeneralSamePicTimingInAllOlsFlag();
}
if( nalu.m_nalUnitType == NAL_UNIT_SPS )
{
......@@ -491,6 +504,22 @@ uint32_t BitstreamExtractorApp::decode()
}
else
{
if( pps->getNoPicPartitionFlag() )
{
pps->resetTileSliceInfo();
pps->setLog2CtuSize( ceilLog2(sps->getCTUSize()) );
pps->setNumExpTileColumns(1);
pps->setNumExpTileRows(1);
pps->addTileColumnWidth( pps->getPicWidthInCtu( ) );
pps->addTileRowHeight( pps->getPicHeightInCtu( ) );
pps->initTiles();
pps->setRectSliceFlag( 1 );
pps->setNumSlicesInPic( 1 );
pps->initRectSlices( );
pps->setTileIdxDeltaPresentFlag( 0 );
pps->setSliceTileIdx( 0, 0 );
}
pps->initRectSliceMap(sps);
pps->initSubPic(*sps);
xPrintSubPicInfo (pps);
if (m_subPicId >= 0)
......@@ -541,6 +570,7 @@ uint32_t BitstreamExtractorApp::decode()
APS* aps = new APS();
m_hlSynaxReader.setBitstream( &nalu.getBitstream() );
m_hlSynaxReader.parseAPS( aps );
msg (VERBOSE, "APS Info: APS ID = %d Type = %d Layer = %d\n", aps->getAPSId(), aps->getAPSType(), nalu.m_nuhLayerId);
int apsId = aps->getAPSId();
int apsType = aps->getAPSType();
// note: storeAPS may invalidate the aps pointer!
......@@ -567,12 +597,12 @@ uint32_t BitstreamExtractorApp::decode()
if (sei->payloadType() == SEI::SCALABLE_NESTING)
{
SEIScalableNesting *seiNesting = (SEIScalableNesting *)sei;
if (seiNesting->m_nestingOlsFlag == 1)
if (seiNesting->m_snOlsFlag == 1)
{
bool targetOlsIdxInNestingAppliedOls = false;
for (uint32_t i = 0; i <= seiNesting->m_nestingNumOlssMinus1; i++)
for (uint32_t i = 0; i <= seiNesting->m_snNumOlssMinus1; i++)
{
if (seiNesting->m_nestingOlsIdx[i] == m_targetOlsIdx)
if (seiNesting->m_snOlsIdx[i] == m_targetOlsIdx)
{
targetOlsIdxInNestingAppliedOls = true;
break;
......@@ -582,7 +612,7 @@ uint32_t BitstreamExtractorApp::decode()
}
}
// remove unqualified timing related SEI
if (sei->payloadType() == SEI::BUFFERING_PERIOD || sei->payloadType() == SEI::PICTURE_TIMING || sei->payloadType() == SEI::DECODING_UNIT_INFO)
if (sei->payloadType() == SEI::BUFFERING_PERIOD || (m_removeTimingSEI && sei->payloadType() == SEI::PICTURE_TIMING ) || sei->payloadType() == SEI::DECODING_UNIT_INFO)
{
bool targetOlsIdxGreaterThanZero = m_targetOlsIdx > 0;
writeInpuNalUnitToStream &= !targetOlsIdxGreaterThanZero;
......@@ -601,7 +631,10 @@ uint32_t BitstreamExtractorApp::decode()
// check for subpicture ID
writeInpuNalUnitToStream = xCheckSliceSubpicture(nalu, m_subPicId);
}
if (nalu.m_nalUnitType == NAL_UNIT_FD)
{
writeInpuNalUnitToStream = lastSliceWritten;
}
}
unitCnt++;
......@@ -616,8 +649,25 @@ uint32_t BitstreamExtractorApp::decode()
}
ch = 1;
bitstreamFileOut.write( &ch, 1 );
// write input NAL unit
bitstreamFileOut.write( (const char*)nalu.getBitstream().getFifo().data(), nalu.getBitstream().getFifo().size() );
// create output NAL unit
OutputNALUnit out (nalu.m_nalUnitType, nalu.m_nuhLayerId, nalu.m_temporalId);
out.m_Bitstream.getFIFO() = nalu.getBitstream().getFifo();
// write with start code emulation prevention
writeNaluContent (bitstreamFileOut, out);
}
// update status of previous slice
if (nalu.isSlice())
{
if (writeInpuNalUnitToStream)
{
lastSliceWritten = true;
}
else
{
lastSliceWritten=false;
}
}
}
}
......
......@@ -73,6 +73,8 @@ protected:
bool xIsSPSUpdate(int spsId) { return (std::find(m_updatedSPSList.begin(),m_updatedSPSList.end(), spsId) != m_updatedSPSList.end()); }
void xClearSPSUpdated(int spsId) { m_updatedSPSList.erase(std::remove(m_updatedSPSList.begin(), m_updatedSPSList.end(), spsId)); };
bool xCheckNumSubLayers(InputNALUnit &nalu, VPS *vps);
void xWriteVPS(VPS *vps, std::ostream& out, int layerId, int temporalId);
void xWriteSPS(SPS *sps, std::ostream& out, int layerId, int temporalId);
void xWritePPS(PPS *pps, std::ostream& out, int layerId, int temporalId);
......@@ -82,9 +84,11 @@ protected:
HLSWriter m_hlSyntaxWriter;
SEIReader m_seiReader;
int m_vpsId;
bool m_removeTimingSEI;
PicHeader m_picHeader;
int m_prevTid0Poc;
int m_prevPicPOC;
std::vector<int> m_updatedVPSList;
std::vector<int> m_updatedSPSList;
std::vector<int> m_updatedPPSList;
......
......@@ -130,8 +130,8 @@ uint32_t DecApp::decode()
nalu.m_nalUnitType = NAL_UNIT_INVALID;
// determine if next NAL unit will be the first one from a new picture
bool bNewPicture = isNewPicture(&bitstreamFile, &bytestream);
bool bNewAccessUnit = bNewPicture && isNewAccessUnit( bNewPicture, &bitstreamFile, &bytestream );
bool bNewPicture = m_cDecLib.isNewPicture(&bitstreamFile, &bytestream);
bool bNewAccessUnit = bNewPicture && m_cDecLib.isNewAccessUnit( bNewPicture, &bitstreamFile, &bytestream );
if(!bNewPicture)
{
AnnexBStats stats = AnnexBStats();
......@@ -210,6 +210,8 @@ uint32_t DecApp::decode()
}
m_cDecLib.updateAssociatedIRAP();
m_cDecLib.updatePrevGDRInSameLayer();
m_cDecLib.updatePrevIRAPAndGDRSubpic();
}
else if ( (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS ) &&
m_cDecLib.getFirstSliceInSequence(nalu.m_nuhLayerId))
......@@ -270,15 +272,31 @@ uint32_t DecApp::decode()
xWriteOutput( pcListPic, nalu.m_temporalId );
}
}
if( bNewPicture )
{
m_cDecLib.checkSeiInPictureUnit();
m_cDecLib.resetPictureSeiNalus();
}
if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS)
{
m_cDecLib.checkAPSInPictureUnit();
m_cDecLib.resetPictureUnitNals();
}
if (bNewAccessUnit || !bitstreamFile)
{
m_cDecLib.CheckNoOutputPriorPicFlagsInAccessUnit();
m_cDecLib.resetAccessUnitNoOutputPriorPicFlags();
}
if(bNewAccessUnit)
{
m_cDecLib.isCvsStart();
m_cDecLib.checkTidLayerIdInAccessUnit();
m_cDecLib.resetAccessUnitSeiTids();
m_cDecLib.checkSEIInAccessUnit();
m_cDecLib.resetAccessUnitSeiPayLoadTypes();
m_cDecLib.resetAccessUnitNals();
m_cDecLib.resetAccessUnitApsNals();
m_cDecLib.resetAccessUnitPicInfo();
m_cDecLib.resetAccessUnitNals();
m_cDecLib.resetAccessUnitApsNals();
m_cDecLib.resetAccessUnitPicInfo();
}
}
......@@ -302,216 +320,27 @@ uint32_t DecApp::decode()
}
/**
- lookahead through next NAL units to determine if current NAL unit is the first NAL unit in a new picture
*/
bool DecApp::isNewPicture(ifstream *bitstreamFile, class InputByteStream *bytestream)
{
bool ret = false;
bool finished = false;
// cannot be a new picture if there haven't been any slices yet
if(m_cDecLib.getFirstSliceInPicture())
{
return false;
}
// save stream position for backup
#if RExt__DECODER_DEBUG_STATISTICS
CodingStatistics::CodingStatisticsData* backupStats = new CodingStatistics::CodingStatisticsData(CodingStatistics::GetStatistics());
streampos location = bitstreamFile->tellg() - streampos(bytestream->GetNumBufferedBytes());
#else
streampos location = bitstreamFile->tellg();
#endif
// look ahead until picture start location is determined
while (!finished && !!(*bitstreamFile))
{
AnnexBStats stats = AnnexBStats();
InputNALUnit nalu;
byteStreamNALUnit(*bytestream, nalu.getBitstream().getFifo(), stats);
if (nalu.getBitstream().getFifo().empty())
{
msg( ERROR, "Warning: Attempt to decode an empty NAL unit\n");
}
else
{
// get next NAL unit type
read(nalu);
switch( nalu.m_nalUnitType ) {
// NUT that indicate the start of a new picture
case NAL_UNIT_ACCESS_UNIT_DELIMITER:
case NAL_UNIT_DCI:
case NAL_UNIT_VPS:
case NAL_UNIT_SPS:
case NAL_UNIT_PPS:
case NAL_UNIT_PH:
ret = true;
finished = true;
break;
// NUT that may be the start of a new picture - check first bit in slice header
case NAL_UNIT_CODED_SLICE_TRAIL:
case NAL_UNIT_CODED_SLICE_STSA:
case NAL_UNIT_CODED_SLICE_RASL:
case NAL_UNIT_CODED_SLICE_RADL:
case NAL_UNIT_RESERVED_VCL_4:
case NAL_UNIT_RESERVED_VCL_5:
case NAL_UNIT_RESERVED_VCL_6:
case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
case NAL_UNIT_CODED_SLICE_IDR_N_LP:
case NAL_UNIT_CODED_SLICE_CRA:
case NAL_UNIT_CODED_SLICE_GDR:
case NAL_UNIT_RESERVED_IRAP_VCL_11:
case NAL_UNIT_RESERVED_IRAP_VCL_12:
ret = checkPictureHeaderInSliceHeaderFlag(nalu);
finished = true;
break;
// NUT that are not the start of a new picture
case NAL_UNIT_EOS:
case NAL_UNIT_EOB:
case NAL_UNIT_SUFFIX_APS:
case NAL_UNIT_SUFFIX_SEI:
case NAL_UNIT_FD:
ret = false;
finished = true;
break;
// NUT that might indicate the start of a new picture - keep looking
case NAL_UNIT_PREFIX_APS:
case NAL_UNIT_PREFIX_SEI:
case NAL_UNIT_RESERVED_NVCL_26:
case NAL_UNIT_RESERVED_NVCL_27:
case NAL_UNIT_UNSPECIFIED_28:
case NAL_UNIT_UNSPECIFIED_29:
case NAL_UNIT_UNSPECIFIED_30:
case NAL_UNIT_UNSPECIFIED_31:
default:
break;
}
}
}
// restore previous stream location - minus 3 due to the need for the annexB parser to read three extra bytes
#if RExt__DECODER_DEBUG_BIT_STATISTICS
bitstreamFile->clear();
bitstreamFile->seekg(location);
bytestream->reset();
CodingStatistics::SetStatistics(*backupStats);
delete backupStats;
#else
bitstreamFile->clear();
bitstreamFile->seekg(location-streamoff(3));
bytestream->reset();
#endif
// return TRUE if next NAL unit is the start of a new picture
return ret;
}
/**
- lookahead through next NAL units to determine if current NAL unit is the first NAL unit in a new access unit
*/
bool DecApp::isNewAccessUnit( bool newPicture, ifstream *bitstreamFile, class InputByteStream *bytestream )
{
bool ret = false;
bool finished = false;
// can only be the start of an AU if this is the start of a new picture
if( newPicture == false )
{
return false;
}
// save stream position for backup
#if RExt__DECODER_DEBUG_STATISTICS
CodingStatistics::CodingStatisticsData* backupStats = new CodingStatistics::CodingStatisticsData(CodingStatistics::GetStatistics());
streampos location = bitstreamFile->tellg() - streampos(bytestream->GetNumBufferedBytes());
#else
streampos location = bitstreamFile->tellg();
#endif
// look ahead until access unit start location is determined
while (!finished && !!(*bitstreamFile))
{
AnnexBStats stats = AnnexBStats();
InputNALUnit nalu;
byteStreamNALUnit(*bytestream, nalu.getBitstream().getFifo(), stats);
if (nalu.getBitstream().getFifo().empty())
{
msg( ERROR, "Warning: Attempt to decode an empty NAL unit\n");
}
else
{
// get next NAL unit type
read(nalu);
switch( nalu.m_nalUnitType ) {
// AUD always indicates the start of a new access unit
case NAL_UNIT_ACCESS_UNIT_DELIMITER:
ret = true;
finished = true;
break;
// slice types - check layer ID and POC
case NAL_UNIT_CODED_SLICE_TRAIL:
case NAL_UNIT_CODED_SLICE_STSA:
case NAL_UNIT_CODED_SLICE_RASL:
case NAL_UNIT_CODED_SLICE_RADL:
case NAL_UNIT_CODED_SLICE_IDR_W_RADL:
case NAL_UNIT_CODED_SLICE_IDR_N_LP:
case NAL_UNIT_CODED_SLICE_CRA:
case NAL_UNIT_CODED_SLICE_GDR:
ret = m_cDecLib.isSliceNaluFirstInAU( newPicture, nalu );
finished = true;
break;
// NUT that are not the start of a new access unit
case NAL_UNIT_EOS:
case NAL_UNIT_EOB:
case NAL_UNIT_SUFFIX_APS:
case NAL_UNIT_SUFFIX_SEI:
case NAL_UNIT_FD:
ret = false;
finished = true;
break;
// all other NUT - keep looking to find first VCL
default:
break;
}
}
}
// restore previous stream location
#if RExt__DECODER_DEBUG_BIT_STATISTICS
bitstreamFile->clear();
bitstreamFile->seekg(location);
bytestream->reset();
CodingStatistics::SetStatistics(*backupStats);
delete backupStats;
#else
bitstreamFile->clear();
bitstreamFile->seekg(location);
bytestream->reset();
#endif
// return TRUE if next NAL unit is the start of a new picture
return ret;
}
void DecApp::writeLineToOutputLog(Picture * pcPic)
{
if (m_oplFileStream.is_open() && m_oplFileStream.good())
{
const SPS* sps = pcPic->cs->sps;
PictureHash recon_digest;
auto numChar = calcMD5(((const Picture*)pcPic)->getRecoBuf(), recon_digest, sps->getBitDepths());
m_oplFileStream << std::setw(8) << pcPic->getPOC() << "," << std::setw(5) << pcPic->Y().width << "," << std::setw(5) << pcPic->Y().height << "," << hashToString(recon_digest, numChar) << "\n";
const SPS * sps = pcPic->cs->sps;
ChromaFormat chromaFormatIDC = sps->getChromaFormatIdc();
const Window &conf = pcPic->getConformanceWindow();
const int leftOffset = conf.getWindowLeftOffset() * SPS::getWinUnitX(chromaFormatIDC);
const int rightOffset = conf.getWindowRightOffset() * SPS::getWinUnitX(chromaFormatIDC);
const int topOffset = conf.getWindowTopOffset() * SPS::getWinUnitY(chromaFormatIDC);
const int bottomOffset = conf.getWindowBottomOffset() * SPS::getWinUnitY(chromaFormatIDC);
PictureHash recon_digest;
auto numChar = calcMD5WithCropping(((const Picture *) pcPic)->getRecoBuf(), recon_digest, sps->getBitDepths(),
leftOffset, rightOffset, topOffset, bottomOffset);
const int croppedWidth = pcPic->Y().width - leftOffset - rightOffset;
const int croppedHeight = pcPic->Y().height - topOffset - bottomOffset;
m_oplFileStream << std::setw(8) << pcPic->getPOC() << "," << std::setw(5) << croppedWidth << "," << std::setw(5)
<< croppedHeight << "," << hashToString(recon_digest, numChar) << "\n";
}
}
......
This diff is collapsed.