...
 
Commits (2171)
......@@ -10,3 +10,8 @@ deploy
*.suo
.vs/
.vscode/
*.blg
*.bbl
*.pyc
/out/
/doc/_minted-software-manual/
stages:
- build
.build_template:
stage: build
script:
- make realclean
- make all
only:
refs:
- master
- merge_requests
variables:
- $CI_PROJECT_URL == 'https://vcgit.hhi.fraunhofer.de/jvet/VVCSoftware_VTM'
- $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'master'
.build_template_linux:
extends: .build_template
script:
- make realclean
- make all
- make realclean
- make linuxbuild enable-tracing=true
#build_macos:
# extends: .build_template
# tags:
# - macos
build_ubuntu1604:
extends: .build_template_linux
tags:
- ubuntu1604
build_ubuntu1804:
extends: .build_template_linux
tags:
- ubuntu1804
build_ubuntu1804-gcc8:
extends: .build_template_linux
script:
- make realclean
- make all toolset=gcc-8
- make realclean
- make linuxbuild enable-tracing=true toolset=gcc-8
tags:
- ubuntu1804-gcc8
build_vc191x:
extends: .build_template
tags:
- vc191x
build_vc192x:
extends: .build_template
tags:
- vc192x
......@@ -28,6 +28,7 @@ if( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
endif()
set( EXTENSION_360_VIDEO OFF CACHE BOOL "If EXTENSION_360_VIDEO is on, 360Lib will be added" )
set( EXTENSION_HDRTOOLS OFF CACHE BOOL "If EXTENSION_HDRTOOLS is on, HDRLib will be added" )
set( SET_ENABLE_TRACING OFF CACHE BOOL "Set ENABLE_TRACING as a compiler flag" )
set( ENABLE_TRACING OFF CACHE BOOL "If SET_ENABLE_TRACING is on, it will be set to this value" )
......@@ -112,6 +113,7 @@ if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
if( USE_ADDRESS_SANITIZER )
# add compile options
add_compile_options( "-fsanitize=address" )
add_link_options( "-fsanitize=address" )
endif()
endif()
......@@ -136,6 +138,9 @@ if( EXTENSION_360_VIDEO )
add_subdirectory( "source/Lib/Lib360" )
add_subdirectory( "source/Lib/AppEncHelper360" )
endif()
if ( EXTENSION_HDRTOOLS )
add_subdirectory( "source/Lib/HDRLib")
endif()
add_subdirectory( "source/Lib/DecoderAnalyserLib" )
add_subdirectory( "source/Lib/DecoderLib" )
add_subdirectory( "source/Lib/EncoderLib" )
......@@ -146,6 +151,7 @@ add_subdirectory( "source/App/DecoderApp" )
add_subdirectory( "source/App/EncoderApp" )
add_subdirectory( "source/App/SEIRemovalApp" )
add_subdirectory( "source/App/Parcat" )
add_subdirectory( "source/App/StreamMergeApp" )
if( EXTENSION_360_VIDEO )
add_subdirectory( "source/App/utils/360ConvertApp" )
endif()
......@@ -3,7 +3,7 @@ License, included below. This software may be subject to other third party
and contributor rights, including patent rights, and no such rights are
granted under this license.  
Copyright (c) 2010-2019, ITU/ISO/IEC
Copyright (c) 2010-2020, ITU/ISO/IEC
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -17,7 +17,7 @@ BUILD_SCRIPT := $(CURDIR)/cmake/CMakeBuild/bin/cmake.py
#
TARGETS := CommonLib DecoderAnalyserApp DecoderAnalyserLib DecoderApp DecoderLib
TARGETS += EncoderApp EncoderLib Utilities SEIRemovalApp
TARGETS += EncoderApp EncoderLib Utilities SEIRemovalApp StreamMergeApp
ifeq ($(OS),Windows_NT)
ifneq ($(MSYSTEM),)
......
How to build VTM
================
VTM reference software for VVC
==============================
This software package is the reference software for Versatile Video Coding (VVC). The reference software includes both encoder and decoder functionality.
Reference software is useful in aiding users of a video coding standard to establish and test conformance and interoperability, and to educate users and demonstrate the capabilities of the standard. For these purposes, this software is provided as an aid for the study and implementation of Versatile Video Coding.
The software has been jointly developed by the ITU-T Video Coding Experts Group (VCEG, Question 6 of ITU-T Study Group 16) and the ISO/IEC Moving Picture Experts Group (MPEG, Working Group 11 of Subcommittee 29 of ISO/IEC Joint Technical Committee 1).
A software manual, which contains usage instructions, can be found in the "doc" subdirectory of this software package.
Build instructions
==================
The CMake tool is used to create platform-specific build files.
Although CMake may be able to generate 32-bit binaries, **it is generally suggested to build 64-bit binaries**. 32-bit binaries are not able to access more than 2GB of RAM, which will not be sufficient for coding larger image formats. Building in 32-bit environments is not tested and will not be supported.
The software uses CMake to create platform-specific build files.
Build instructions for plain CMake (suggested)
----------------------------------------------
......@@ -21,20 +35,38 @@ mkdir build
Use one of the following CMake commands, based on your platform. Feel free to change the commands to satisfy
your needs.
**Windows Visual Studio 2015 64 Bit:**
**Windows Visual Studio 2015/17/19 64 Bit:**
Use the proper generator string for generating Visual Studio files, e.g. for VS 2015:
```bash
cd build
cmake .. -G "Visual Studio 14 2015 Win64"
```
Then open the generated solution file in MS Visual Studio.
For VS 2017 use "Visual Studio 15 2017 Win64", for VS 2019 use "Visual Studio 16 2019".
Visual Studio 2019 also allows you to open the CMake directory directly. Choose "File->Open->CMake" for this option.
**macOS Xcode:**
For generating an Xcode workspace type:
```bash
cd build
cmake .. -G "Xcode"
```
Then open the generated work space in Xcode.
For generating Makefiles with optional non-default compilers, use the following commands:
```bash
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9
```
In this example the brew installed GCC 9 is used for a release build.
**Linux**
For generating Linux Release Makefile:
......@@ -68,16 +100,21 @@ To use the default system compiler simply call:
```bash
make all
```
For MSYS2 and MinGW: Open an MSYS MinGW 64-Bit terminal and change into the root directory of this project.
**MSYS2 and MinGW (Windows)**
**Note:** Build files for MSYS MinGW were added on request. The build platform is not regularily tested and can't be supported.
Open an MSYS MinGW 64-Bit terminal and change into the root directory of this project.
Call:
```bash
make all toolset=gcc
```
The following tools need to be installed for MSYS2 and MinGW:
Tool Installation on Windows
----------------------------
Download CMake: http://www.cmake.org/ and install it.
Python and GnuWin32 are not mandatory, but they simplify the build process for the user.
......
......@@ -3,7 +3,7 @@ BitstreamFile : str.bin
ReconFile : rec.yuv
#======== Profile ================
Profile : next
Profile : auto
#======== Unit definition ================
MaxCUWidth : 64 # Maximum coding unit width in pixel
......@@ -34,8 +34,12 @@ RDOQTS : 1 # RDOQ for transform skip
#=========== Deblock Filter ============
LoopFilterOffsetInPPS : 1 # Dbl params: 0=varying params in SliceHeader, param = base_param + GOP_offset_param; 1 (default) =constant params in PPS, param = base_param)
LoopFilterDisable : 0 # Disable deblocking filter (0=Filter, 1=No Filter)
LoopFilterBetaOffset_div2 : 0 # base_param: -6 ~ 6
LoopFilterTcOffset_div2 : 0 # base_param: -6 ~ 6
LoopFilterBetaOffset_div2 : 0 # base_param: -12 ~ 12
LoopFilterTcOffset_div2 : 0 # base_param: -12 ~ 12
LoopFilterCbBetaOffset_div2 : 0 # base_param: -12 ~ 12
LoopFilterCbTcOffset_div2 : 0 # base_param: -12 ~ 12
LoopFilterCrBetaOffset_div2 : 0 # base_param: -12 ~ 12
LoopFilterCrTcOffset_div2 : 0 # base_param: -12 ~ 12
DeblockingFilterMetric : 0 # blockiness metric (automatically configures deblocking parameters in bitstream). Applies slice-level loop filter offsets (LoopFilterOffsetInPPS and LoopFilterDisable must be 0)
#=========== Misc. ============
......@@ -48,35 +52,17 @@ TransformSkipFast : 1 # Fast Transform skipping (0: OFF, 1
TransformSkipLog2MaxSize : 5
SAOLcuBoundary : 0 # SAOLcuBoundary using non-deblocked pixels (0: OFF, 1: ON)
#============ Slices ================
SliceMode : 0 # 0: Disable all slice options.
# 1: Enforce maximum number of LCU in an slice,
# 2: Enforce maximum number of bytes in an 'slice'
# 3: Enforce maximum number of tiles in a slice
SliceArgument : 1500 # Argument for 'SliceMode'.
# If SliceMode==1 it represents max. SliceGranularity-sized blocks per slice.
# If SliceMode==2 it represents max. bytes per slice.
# If SliceMode==3 it represents max. tiles per slice.
LFCrossSliceBoundaryFlag : 1 # In-loop filtering, including ALF and DB, is across or not across slice boundary.
# 0:not across, 1: across
#============ PCM ================
PCMEnabledFlag : 0 # 0: No PCM mode
PCMLog2MaxSize : 5 # Log2 of maximum PCM block size.
PCMLog2MinSize : 3 # Log2 of minimum PCM block size.
PCMInputBitDepthFlag : 1 # 0: PCM bit-depth is internal bit-depth. 1: PCM bit-depth is input bit-depth.
PCMFilterDisableFlag : 0 # 0: Enable loop filtering on I_PCM samples. 1: Disable loop filtering on I_PCM samples.
#============ Lossless ================
TransquantBypassEnable : 0 # Value of PPS flag.
CUTransquantBypassFlagForce: 0 # Force transquant bypass mode, when transquant_bypass_enable_flag is enabled
#============ Tiles / Slices ================
EnablePicPartitioning : 0 # Enable picture partitioning (0: single tile, single slice, 1: multiple tiles/slices can be used)
#============ VTM settings ======================
LoopFilterTcOffset_div2 : 0
SEIDecodedPictureHash : 0
CbQpOffset : 1
CrQpOffset : 1
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 1 31 43
QpOutValCb : 1 32 41
TemporalSubsampleRatio : 8
ReWriteParamSets : 1
......@@ -90,15 +76,15 @@ DualITree : 1 # separate partitioning of luma and chroma
MinQTLumaISlice : 8
MinQTChromaISlice : 4
MinQTNonISlice : 8
MaxBTDepth : 3
MaxBTDepthISliceL : 3
MaxBTDepthISliceC : 3
MaxMTTHierarchyDepth : 3
MaxMTTHierarchyDepthISliceL : 3
MaxMTTHierarchyDepthISliceC : 3
MTS : 1
MTSIntraMaxCand : 3
MTSIntraMaxCand : 4
MTSInterMaxCand : 4
SBT : 1
LFNST : 1
LFNST : 1
ISP : 1
Affine : 1
SubPuMvp : 1
......@@ -107,11 +93,17 @@ LMChroma : 1 # use CCLM only
DepQuant : 1
IMV : 1
ALF : 1
IBC : 0 # turned off in CTC
IBC : 0 # turned off in CTC
AllowDisFracMMVD : 1
AffineAmvr : 0
LumaReshapeEnable : 1 # luma reshaping. 0: disable 1:enable
LMCSEnable : 1 # LMCS: 0: disable, 1:enable
LMCSSignalType : 0 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSUpdateCtrl : 1 # LMCS model update control: 0:RA, 1:AI, 2:LDB/LDP
LMCSOffset : 2 # chroma residual scaling offset
MRL : 1
MIP : 1
JointCbCr : 1 # joint coding of chroma residuals (if available): 0: disable, 1: enable
ChromaTS : 1
# Fast tools
PBIntraFast : 1
......@@ -119,7 +111,7 @@ ISPFast : 1
FastMrg : 1
AMaxBT : 1
FastMIP : 1
FastLFNST : 1
FastLFNST : 1
# Encoder optimization tools
AffineAmvrEncOpt : 0
......
This diff is collapsed.
This diff is collapsed.
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 : 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 2 5 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 9 10 17 18 25 26 8 8 1 2 9 10 17 18 25 26
Frame2: B 3 5 -6.5 0.2590 0 0 1.0 0 0 0 8 9 1 2 3 10 11 18 19 26 27 8 9 1 2 3 10 11 18 19 26 27
Frame3: B 4 4 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 3 4 11 12 19 20 8 8 1 2 3 4 11 12 19 20
Frame4: B 5 4 -6.5 0.2590 0 0 1.0 0 0 0 8 9 1 2 3 4 5 12 13 20 21 8 9 1 2 3 4 5 12 13 20 21
Frame5: B 6 5 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 5 6 13 14 21 22 8 8 1 2 5 6 13 14 21 22
Frame6: B 7 5 -6.5 0.2590 0 0 1.0 0 0 0 8 9 1 2 3 6 7 14 15 22 23 8 9 1 2 3 6 7 14 15 22 23
Frame7: B 8 4 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 7 8 15 16 23 24 8 8 1 2 7 8 15 16 23 24
Frame8: B 9 4 -6.5 0.2590 0 0 1.0 0 0 0 8 9 1 2 3 8 9 16 17 24 25 8 9 1 2 3 8 9 16 17 24 25
Frame9: B 10 5 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 9 10 17 18 25 26 8 8 1 2 9 10 17 18 25 26
Frame10: B 11 5 -6.5 0.2590 0 0 1.0 0 0 0 8 9 1 2 3 10 11 18 19 26 27 8 9 1 2 3 10 11 18 19 26 27
Frame11: B 12 4 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 3 4 11 12 19 20 8 8 1 2 3 4 11 12 19 20
Frame12: B 13 4 -6.5 0.2590 0 0 1.0 0 0 0 8 9 1 2 3 4 5 12 13 20 21 8 9 1 2 3 4 5 12 13 20 21
Frame13: B 14 5 -6.5 0.2590 0 0 1.0 0 0 0 8 8 1 2 5 6 13 14 21 22 8 8 1 2 5 6 13 14 21 22
Frame14: B 15 5 -6.5 0.2590 0 0 1.0 0 0 0 8 9 1 2 3 6 7 14 15 22 23 8 9 1 2 3 6 7 14 15 22 23
Frame15: B 16 1 0.0 0.0 0 0 1.0 0 0 0 8 8 1 2 7 8 15 16 23 24 8 8 1 2 7 8 15 16 23 24
Frame16: B 17 1 0.0 0.0 0 0 1.0 0 0 0 8 9 1 2 3 8 9 16 17 24 25 8 9 1 2 3 8 9 16 17 24 25
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
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
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 : 64 # Period of I-Frame ( -1 = only first)
DecodingRefreshType : 1 # Random Accesss 0:none, 1:CRA, 2:IDR, 3:Recovery Point SEI
GOPSize : 32 # 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 33 1 0.0 0.0 0 0 1.0 0 0 0 4 4 32 33 48 49 4 4 32 33 48 49
Frame2: B 32 1 0.0 0.0 0 0 1.0 0 0 0 4 5 31 32 47 48 -1 4 5 -1 31 32 47 48
Frame3: B 16 1 -4.8848 0.2061 0 0 1.0 0 0 1 4 4 15 16 31 32 4 4 -16 -17 15 16
Frame4: B 17 1 -4.8848 0.2061 0 0 1.0 0 0 1 4 5 1 16 17 32 33 4 4 -15 -16 16 17
Frame5: B 8 4 -5.7476 0.2286 0 0 1.0 0 0 2 4 4 7 8 23 24 4 4 -8 -9 -24 -25
Frame6: B 9 4 -5.7476 0.2286 0 0 1.0 0 0 2 4 5 1 8 9 24 25 4 4 -7 -8 -23 -24
Frame7: B 4 5 -5.90 0.2333 0 0 1.0 0 0 3 4 4 3 4 19 20 4 6 -4 -5 -12 -13 -28 -29
Frame8: B 5 5 -5.90 0.2333 0 0 1.0 0 0 3 4 5 1 4 5 20 21 4 6 -3 -4 -11 -12 -27 -28
Frame9: B 2 6 -7.1444 0.3 0 0 1.0 0 0 4 4 4 1 2 -2 -3 4 8 -2 -3 -6 -7 -14 -15 -30 -31
Frame10: B 3 6 -7.1444 0.3 0 0 1.0 0 0 4 4 5 1 2 3 -1 -2 4 8 -1 -2 -5 -6 -13 -14 -29 -30
Frame11: B 6 6 -7.1444 0.3 0 0 1.0 0 0 4 4 4 1 2 5 6 4 6 -2 -3 -10 -11 -26 -27
Frame12: B 7 6 -7.1444 0.3 0 0 1.0 0 0 4 4 5 1 2 3 6 7 4 6 -1 -2 -9 -10 -25 -26
Frame13: B 12 5 -5.90 0.2333 0 0 1.0 0 0 3 4 4 3 4 11 12 4 4 -4 -5 -20 -21
Frame14: B 13 5 -5.90 0.2333 0 0 1.0 0 0 3 4 5 1 4 5 12 13 4 4 -3 -4 -19 -20
Frame15: B 10 6 -7.1444 0.3 0 0 1.0 0 0 4 4 4 1 2 9 10 4 6 -2 -3 -6 -7 -22 -23
Frame16: B 11 6 -7.1444 0.3 0 0 1.0 0 0 4 4 5 1 2 3 10 11 4 6 -1 -2 -5 -6 -21 -22
Frame17: B 14 6 -7.1444 0.3 0 0 1.0 0 0 4 4 6 1 2 5 6 13 14 4 4 -2 -3 -18 -19
Frame18: B 15 6 -7.1444 0.3 0 0 1.0 0 0 4 4 7 1 2 3 6 7 14 15 4 4 -1 -2 -17 -18
Frame19: B 24 4 -5.7476 0.2286 0 0 1.0 0 0 2 4 4 7 8 23 24 4 4 -8 -9 7 8
Frame20: B 25 4 -5.7476 0.2286 0 0 1.0 0 0 2 4 5 1 8 9 24 25 4 4 -7 -8 8 9
Frame21: B 20 5 -5.90 0.2333 0 0 1.0 0 0 3 4 4 3 4 19 20 4 4 -4 -5 -12 -13
Frame22: B 21 5 -5.90 0.2333 0 0 1.0 0 0 3 4 5 1 4 5 20 21 4 4 -3 -4 -11 -12
Frame23: B 18 6 -7.1444 0.3 0 0 1.0 0 0 4 4 4 1 2 17 18 4 6 -2 -3 -6 -7 -14 -15
Frame24: B 19 6 -7.1444 0.3 0 0 1.0 0 0 4 4 5 1 2 3 18 19 4 6 -1 -2 -5 -6 -13 -14
Frame25: B 22 6 -7.1444 0.3 0 0 1.0 0 0 4 4 6 1 2 5 6 21 22 4 4 -2 -3 -10 -11
Frame26: B 23 6 -7.1444 0.3 0 0 1.0 0 0 4 4 7 1 2 3 6 7 22 23 4 4 -1 -2 -9 -10
Frame27: B 28 5 -5.90 0.2333 0 0 1.0 0 0 3 4 6 3 4 11 12 27 28 4 4 -4 -5 3 4
Frame28: B 29 5 -5.90 0.2333 0 0 1.0 0 0 3 4 7 1 4 5 12 13 28 29 4 4 -3 -4 4 5
Frame29: B 26 6 -7.1444 0.3 0 0 1.0 0 0 4 4 6 1 2 9 10 25 26 4 4 -2 -3 -6 -7
Frame30: B 27 6 -7.1444 0.3 0 0 1.0 0 0 4 4 7 1 2 3 10 11 26 27 4 4 -1 -2 -5 -6
Frame31: B 30 6 -7.1444 0.3 0 0 1.0 0 0 4 4 8 1 2 5 6 13 14 29 30 4 4 -2 -3 1 2
Frame32: B 31 6 -7.1444 0.3 0 0 1.0 0 0 4 4 9 1 2 3 6 7 14 15 30 31 4 4 -1 -2 2 3
#======== Layers ===============
MaxLayers : 2
MaxSublayers : 1
AllLayersSameNumSublayersFlag : 0
AllIndependentLayersFlag : 0
#======== OLSs ===============
EachLayerIsAnOlsFlag : 0
OlsModeIdc : 2
NumOutputLayerSets : 2
OlsOutputLayer1 : 1 0
#======== Layer-0 ===============
LayerId0 : 0
#======== Layer-1 ===============
LayerId1 : 1
NumRefLayers1 : 1
RefLayerIdx1 : 0
CostMode : lossless
ChromaTS : 1
DepQuant : 0
RDOQ : 0
RDOQTS : 0
SBT : 0
LMCSEnable : 0
ISP : 0
MTS : 0
LFNST : 0
JointCbCr : 0
LoopFilterDisable : 1
SAO : 0
ALF : 0
DMVR : 0
BIO : 0
PROF : 0
Log2MaxTbSize : 5
InternalBitDepth : 0
\ No newline at end of file
# 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
#| | |
#| | |
#----------
SubPicPresentFlag : 1 # subpicture enabling 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
SubPicIdPresentFlag : 0 # specifies that subpicture ID mapping is present in the SPS(0: OFF, 1: ON)
SubPicIdSignallingPresentFlag : 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)
# 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:
#----------
#| | |
#| | |
#|----|---|
#| | |
#| | |
#----------
# |
# v
# vertically divided into 2 subpicture, each subpicture contains two slices
SubPicPresentFlag : 1 # subpicture enabling flag(0: OFF, 1: ON)
NumSubPics : 2 # number of subpictures in a picture
SubPicCtuTopLeftX : 0 4 # specifies horizontal position of top left CTU of i-th subpicture in unit of CtbSizeY
SubPicCtuTopLeftY : 0 0 # specifies vertical position of top left CTU of i-th subpicture in unit of CtbSizeY
SubPicWidth : 4 3 # specifies the width of the i-th subpicture in units of CtbSizeY
SubPicHeight : 4 4 # 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
SubPicIdPresentFlag : 0 # specifies that subpicture ID mapping is present in the SPS(0: OFF, 1: ON)
SubPicIdSignallingPresentFlag : 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)
IBC : 1
HashME : 1
RDPCM: 1
BDPCM: 2
# ======== Luma adaptive QP ==========
LumaLevelToDeltaQPMode : 1 # Change luma delta QP based on average luma
LumaLevelToDeltaQPMode : 0 # Change luma delta QP based on average luma
isSDR : 0 # 1: SDR in PQ container, 0: HDR
# ======= LMCS =======================
LumaReshapeEnable : 0 # turned off in HDR CTC
LMCSEnable : 1 # turned on in HDR CTC
LMCSSignalType : 1 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSOffset : 1 # chroma residual scaling offset
#======== Chroma QP scale ============
WCGPPSEnable : 1 # enable WCG Chroma scale
WCGPPSChromaQpScale : -0.46 # Linear chroma QP offset mapping (scale) based on QP
WCGPPSChromaQpOffset : 9.26 # Linear chroma QP offset mapping (offset) based on QP
WCGPPSCbQpScale : 1.14 # Scale factor depending on capture and representation color space
WCGPPSCrQpScale : 1.79 # Scale factor depending on capture and representation color space
WCGPPSEnable : 0 # enable WCG Chroma scale
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 0
QpInValCb : 13 20 36 38 43 54
QpOutValCb : 13 21 29 29 32 37
QpInValCr : 13 20 37 41 44 54
QpOutValCr : 13 21 27 29 32 37
QpInValCbCr : 12 21 41 43 54
QpOutValCbCr : 12 22 30 32 37
VerCollocatedChroma : 1
#======== HDR Metrics ============
CalculateHdrMetrics : 1 # Calculate HDR metrics for Class H1 (PQ) content
......@@ -2,8 +2,15 @@
LumaLevelToDeltaQPMode : 0 # Change luma delta QP based on average luma
# ======= LMCS =======================
LumaReshapeEnable : 0 # turned off in HDR CTC
ReshapeSignalType : 2 # set signal type to HLG if enabled
LMCSEnable : 1 # turned on in HLG CTC
LMCSSignalType : 2 # Input signal type: 0:SDR, 1:HDR-PQ, 2:HDR-HLG
LMCSOffset : 0 # chroma residual scaling offset
#======== Chroma QP scale ============
WCGPPSEnable : 0 # enable WCG Chroma scale
CbQpOffset : 0
CrQpOffset : 0
SameCQPTablesForAllChroma : 1
QpInValCb : 9 23 33 42
QpOutValCb : 9 24 33 37
......@@ -12,4 +12,10 @@ Level : 4.1
#======== Chroma QP scale =============
WCGPPSCbQpScale : 1.04 # Scale factor depending on capture and representation color space
WCGPPSCrQpScale : 1.39 # Scale factor depending on capture and representation color space
WCGPPSCrQpScale : 1.39 # Scale factor depending on capture and representation color space
#======== HDR Metrics ============
CropOffsetLeft : 10
CropOffsetTop : 10
CropOffsetRight : -10
CropOffsetBottom : -10
#======== File I/O ===============
InputFile : sc_robot_1280x720_30_8bit_300_444.yuv
InputBitDepth : 8 # Input bitdepth
InputChromaFormat : 444 # Ratio of luminance to chrominance samples
FrameRate : 30 # Frame Rate per second
FrameSkip : 0 # Number of frames to be skipped in input
SourceWidth : 1280 # Input frame width
SourceHeight : 720 # Input frame height
FramesToBeEncoded : 300 # Number of frames to be coded
Level : 6.2
#======== File I/O ===============
InputFile : sc_robot_1280x720_30_8bit_300.rgb
InputBitDepth : 8 # Input bitdepth
InputChromaFormat : 444 # Ratio of luminance to chrominance samples
FrameRate : 30 # Frame Rate per second
FrameSkip : 0 # Number of frames to be skipped in input
SourceWidth : 1280 # Input frame width
SourceHeight : 720 # Input frame height
FramesToBeEncoded : 300 # Number of frames to be coded
InputColourSpaceConvert : RGBtoGBR # Non-normative colour space conversion to apply to input video
SNRInternalColourSpace : 1 # Evaluate SNRs in GBR order
OutputInternalColourSpace : 0 # Convert recon output back to RGB order. Use --OutputColourSpaceConvert GBRtoRGB on decoder to produce a matching output file.
Level : 6.2
# Reference picture resampling CE settings for scaling ratio and number of encoded frames
ScalingRatioHor : 1.5
ScalingRatioVer : 1.5
FractionNumFrames : 0.5
UpscaledOutput : 1
\ No newline at end of file
# Reference picture resampling CE settings for scaling ratio and number of encoded frames
ScalingRatioHor : 2.0
ScalingRatioVer : 2.0
FractionNumFrames : 0.5
UpscaledOutput : 1
#======== Alternative transfer characteristics SEI message =====================
SEIPreferredTransferCharacterisics : 18
#======== Ambient viewing environment SEI message =====================
SEIAVEEnabled : 1
SEIAVEAmbientIlluminance : 100000
SEIAVEAmbientLightX : 15635
SEIAVEAmbientLightY : 16450
#======== Content Colour Volume SEI message =====================
SEICCVEnabled : 1
SEICCVCancelFlag : 0
SEICCVPersistenceFlag : 1
SEICCVPrimariesPresent : 1
m_ccvSEIPrimariesX0 : 0.300
m_ccvSEIPrimariesY0 : 0.600
m_ccvSEIPrimariesX1 : 0.150
m_ccvSEIPrimariesY1 : 0.060
m_ccvSEIPrimariesX2 : 0.640
m_ccvSEIPrimariesY2 : 0.330
SEICCVMinLuminanceValuePresent : 1
SEICCVMinLuminanceValue : 0.0
SEICCVMaxLuminanceValuePresent : 1
SEICCVMaxLuminanceValue : 0.1
SEICCVAvgLuminanceValuePresent : 1
SEICCVAvgLuminanceValue : 0.01
#======== Content Light Level SEI message =====================
SEICLLEnabled : 1
SEICLLMaxContentLightLevel : 4000
SEICLLMaxPicAvgLightLevel : 0
#======== Equirectangular Projection SEI message =====================
SEIErpEnabled : 1
SEIErpCancelFlag : 0
SEIErpPersistenceFlag : 1
SEIErpGuardBandFlag : 1
SEIErpGuardBandType : 0
SEIErpLeftGuardBandWidth : 254
SEIErpRightGuardBandWidth : 254
#======== Film grain characteristics SEI message =====================
SEIFGCEnabled : 1
SEIFGCCancelFlag : 0
SEIFGCPersistenceFlag : 1
SEIFGCModelID : 0 # 0: frequency filtering; 1: auto-regression; 2-3 are reserved
SEIFGCSepColourDescPresentFlag : 0 # if not 0, need to specify separate colour description (not implemented in current encoder cmd line)
SEIFGCBlendingModeID : 0 # 0: additive; 1: multipliciative
SEIFGCLog2ScaleFactor : 0
SEIFGCCompModelPresentComp0 : 0 # if not 0, need to specify model for comp 0 (not implemented in current encoder cmd line)
SEIFGCCompModelPresentComp1 : 0 # if not 0, need to specify model for comp 1 (not implemented in current encoder cmd line)
SEIFGCCompModelPresentComp2 : 0 # if not 0, need to specify model for comp 2 (not implemented in current encoder cmd line)
#======== Frame Packing SEI message =====================
SEIFramePacking : 1
SEIFramePackingId : 0
SEIFramePackingType : 3
SEIFramePackingQuincunx : 1
SEIFramePackingInterpretation : 0
#======== Generalized Cubemap Projection SEI message =====================
SEIGcmpEnabled : 1
SEIGcmpCancelFlag : 0
SEIGcmpPersistenceFlag : 1
SEIGcmpPackingType : 2
SEIGcmpMappingFunctionType : 2
SEIGcmpFaceIndex : 5 0 4 3 1 2
SEIGcmpFaceRotation : 2 2 2 2 2 2
SEIGcmpFunctionCoeffU : 0.28 0.28 0.28 0.28 0.28 0.28
SEIGcmpFunctionUAffectedByVFlag : 0 0 0 0 0 0
SEIGcmpFunctionCoeffV : 0.4 0.4 0.4 0.28 0.4 0.28
SEIGcmpFunctionVAffectedByUFlag : 1 1 1 0 1 0
SEIGcmpGuardBandFlag : 1
SEIGcmpGuardBandBoundaryType : 1
SEIGcmpGuardBandSamplesMinus1 : 15
#======== Mastering Display Colour Volume SEI message =====================
SEIMasteringDisplayColourVolume : 1
SEIMasteringDisplayMaxLuminance : 10000
SEIMasteringDisplayMinLuminance : 0
SEIMasteringDisplayPrimaries : 0 50000 0 0 50000 0
SEIMasteringDisplayWhitePoint : 16667 16667
#======== Omni Viewport SEI message =====================
SEIOmniViewportEnabled : 1
SEIOmniViewportId : 0
SEIOmniViewportCancelFlag : 0
SEIOmniViewportPersistenceFlag : 1
SEIOmniViewportCntMinus1 : 2
SEIOmniViewportAzimuthCentre : -5898240 5898240 0
SEIOmniViewportElevationCentre : -5898240 5898240 0
SEIOmniViewportTiltCentre : -11796480 5898240 0
SEIOmniViewportHorRange : 2949120 2949120 2949120
SEIOmniViewportVerRange : 2949120 2949120 2949120
#======== Region-wise packing SEI message =====================
SEIRwpEnabled : 1
SEIRwpCancelFlag : 0
SEIRwpPersistenceFlag : 1
SEIRwpConstituentPictureMatchingFlag : 1
SEIRwpNumPackedRegions : 6
SEIRwpProjPictureWidth : 2048
SEIRwpProjPictureHeight : 1024
SEIRwpPackedPictureWidth : 1536
SEIRwpPackedPictureHeight : 768
SEIRwpTransformType : 0 1 2 3 4 5
SEIRwpGuardBandFlag : 1 1 1 1 1 1
SEIRwpProjRegionWidth : 512 512 512 512 512 512
SEIRwpProjRegionHeight : 128 128 128 128 128 128
SEIRwpProjRegionTop : 256 256 256 256 256 256
SEIRwpProjRegionLeft : 0 256 512 768 1024 1280
SEIRwpPackedRegionWidth : 512 512 512 384 384 384
SEIRwpPackedRegionHeight : 128 128 128 192 192 192
SEIRwpPackedRegionTop : 64 64 64 64 64 64
SEIRwpPackedRegionLeft : 32 32 32 32 32 32
SEIRwpLeftGuardBandWidth : 64 64 64 64 64 64
SEIRwpRightGuardBandWidth : 128 128 128 128 128 128
SEIRwpTopGuardBandHeight : 192 192 192 192 192 192
SEIRwpBottomGuardBandHeight : 255 255 255 255 255 255
SEIRwpGuardBandNotUsedForPredFlag : 1 1 1 1 1 1
SEIRwpGuardBandType : 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 0 0 0 0 1 1 1 1
SEISampleAspectRatioInfo: 1
SEISARICancelFlag: 0
SEISARIPersistenceFlag: 1
SEISARIAspectRatioIdc: 255
SEISARISarWidth: 1
SEISARISarHeight: 1
#======== Sphere Rotation SEI message =====================
SEISphereRotationEnabled : 1
SEISphereRotationCancelFlag : 0
SEISphereRotationPersistenceFlag : 1
SEISphereRotationYaw : -5898240
SEISphereRotationPitch : -5898240
SEISphereRotationRoll : -11796480
SEISubpicureLevelInfo: 1
SEIBufferingPeriod: 1
SEIPictureTiming: 1
VuiParametersPresent: 1
RCCpbSize: 2000
VuiParametersPresent: 1 // enable VUI
AspectRatioInfoPresent: 1 // enable presence of sample aspect ratio information
AspectRatioIdc: 1 // sample aspect ratio pre-defined types according to Rec. ITU-T H.273 | ISO/IEC 23091-2
SarWidth: 1 // sample aspect ratio width, if AspectRatioIdc is equal to 255
SarHeight: 1 // sample aspect ratio height, if AspectRatioIdc is equal to 255
ColourDescriptionPresent: 1 // enable presence of colour description information
ColourPrimaries: 1 // the source colour primaries according to Rec. ITU-T H.273 | ISO/IEC 23091-2
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
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
ChromaSampleLocType: 0 // the location of chroma sample frame
OverscanInfoPresent: 1 // enable presence of overscan information
OverscanAppropriate: 0 // indicates if the cropped decoded pictures output are suitable for display using overscan
VuiParametersPresent: 1 // enable VUI
AspectRatioInfoPresent: 1 // enable presence of sample aspect ratio information
AspectRatioIdc: 1 // sample aspect ratio pre-defined types according to Rec. ITU-T H.273 | ISO/IEC 23091-2
SarWidth: 1 // sample aspect ratio width, if AspectRatioIdc is equal to 255
SarHeight: 1 // sample aspect ratio height, if AspectRatioIdc is equal to 255
ColourDescriptionPresent: 1 // enable presence of colour description information
ColourPrimaries: 9 // the source colour primaries according to Rec. ITU-T H.273 | ISO/IEC 23091-2
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
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
ChromaSampleLocType: 2 // the location of chroma sample frame
OverscanInfoPresent: 1 // enable presence of overscan information
OverscanAppropriate: 0 // indicates if the cropped decoded pictures output are suitable for display using overscan
......@@ -11,6 +11,7 @@ import sys
import pyhhi.build.common.system as system
import pyhhi.build.common.util as util
import pyhhi.build.common.ver as ver
import pyhhi.build.common.bldtools as bldtools
import pyhhi.build.cmksupp as cmksupp
from pyhhi.build.common.bldtools import BuildScriptInstaller
from pyhhi.build.common.error import InvalidCommandLineArgumentError
......@@ -24,7 +25,7 @@ class CMakeLauncherApp(object):
self._cmake_launcher = None
self._dict_generator_choice = {'linux': ['umake', 'ninja'],
'macosx': ['xcode', 'umake', 'ninja'],
'windows': ['vs15', 'vs14', 'vs12', 'vs11', 'vs10', 'umake', 'mgwmake', 'ninja']}
'windows': ['vs16', 'vs15', 'vs14', 'vs12', 'vs11', 'vs10', 'umake', 'mgwmake', 'ninja']}
self._top_dir = None
self._cmake_mod_list = ['pyhhi.build.app.cmk',
'pyhhi.build.cmkfnd',
......@@ -93,14 +94,14 @@ class CMakeLauncherApp(object):
%(prog)s [options] [variant=debug,release,relwithdebinfo,minsizerel] [link=static,shared] [toolset=<toolset_spec>] [address-model=32]
%(prog)s is a script front end to cmake to simplify its usage on Linux,
Windows, MacOSX using cmake's generators "Unix Makefiles", "Xcode" and
"Visual Studio 15 - Visual Studio 10" and its compilers.
Windows, MacOSX using cmake's generators "Unix Makefiles", "Ninja", "Xcode" and
"Visual Studio 16 - Visual Studio 10" and its compilers.
arguments:
variant: debug if not specified
link: static if not specified
toolset: default c++ compiler if not specified
examples/windows: msvc-19.13, msvc-19.0, msvc-18.0, msvc-17.0, msvc-16.0, intel, gcc
examples/windows: msvc-19.1x, msvc-19.0, msvc-18.0, msvc-17.0, msvc-16.0, intel, gcc
examples/linux: gcc-4.9, gcc-5, gcc-6, clang, intel
address-model=32: windows: builds 32 bit binaries instead of 64 bit binaries
......@@ -131,7 +132,7 @@ usage examples:
parser.add_argument("-g", "-G", action="store", dest="generator", choices=self._dict_generator_choice[self._sys_info.get_platform()],
help="""specify a cmake generator the script has special support for.
Supported generators: ninja, umake, mgwmake, vs15, vs14, vs12, vs11, vs10, xcode.
Supported generators: ninja, umake, mgwmake, vs16, vs15, vs14, vs12, vs11, vs10, xcode.
The choices accepted are platform and installation dependent. The environment variable
DEFAULT_CMAKE_GENERATOR may be used to override the default value.""")
......@@ -155,13 +156,14 @@ usage examples:
parser.add_argument("--clean-first", action="store_true", dest="clean_first", default=False,
help="build target clean first, then build the active target.")
parser.add_argument("--verbosity", action="store", dest="build_verbosity", choices=['quiet', 'minimal', 'normal', 'detailed', 'diagnostic'], default='minimal',
help="specify msbuild verbosity level [default: %(default)s].")
parser.add_argument("--verbosity", action="store", dest="build_verbosity", choices=['cmake', 'quiet', 'minimal', 'normal', 'detailed', 'diagnostic'], default='minimal',
help="""specify (ms)build verbosity level [default: %(default)s].
The choice 'cmake' requires cmake 3.14.x or higher to increase build verbosity for Visual Studio and other generators.""")
util.app_args_add_log_level(parser)
g = parser.add_argument_group("advanced options")
g.add_argument("-i", action="store", dest="install_dir", nargs='?', const=os.path.join(self._sys_info.get_home_dir(), 'bin'),
g.add_argument("-i", action="store", dest="install_dir", nargs='?', const=os.path.join(self._sys_info.get_home_dir(native=True), 'bin'),
help="install this script and exit. The default destination directory is %(const)s.")
g.add_argument("--py-cache-clean", action="store", dest="py_cache_dirs", nargs='+',
......@@ -282,11 +284,26 @@ usage examples:
# looks like a cross compiler specification which requires a toolchain file matching the toolset spec and the linux system.
toolset_spec_norm = self._find_toolchain_file(toolset_spec_norm)
elif self._sys_info.is_windows():
# msvc-19.00 -> normalized to 19.0
re_match = re.match(r'msvc-(\d+)\.(\d+)', toolset_spec)
if re_match:
minor_version = int(re_match.group(2))
toolset_spec_norm = "msvc-{0}.{1:d}".format(re_match.group(1), minor_version)
if toolset_spec.startswith('msvc-'):
msvc_registry = bldtools.MsvcRegistry()
if toolset_spec == 'msvc-19.2x':
if msvc_registry.is_version_installed((14, 2)):
cl_version = msvc_registry.get_compiler_version((14, 2))
toolset_spec_norm = "msvc-{0:d}.{1:d}".format(cl_version[0], cl_version[1])
else:
raise InvalidCommandLineArgumentError("toolset={} not available.".format(toolset_spec))
elif toolset_spec == 'msvc-19.1x':
if msvc_registry.is_version_installed((14, 1)):
cl_version = msvc_registry.get_compiler_version((14, 1))
toolset_spec_norm = "msvc-{0:d}.{1:d}".format(cl_version[0], cl_version[1])
else:
raise InvalidCommandLineArgumentError("toolset={} not available.".format(toolset_spec))
else:
# msvc-19.00 -> normalized to 19.0
re_match = re.match(r'msvc-(\d+)\.(\d+)', toolset_spec)
if re_match:
minor_version = int(re_match.group(2))
toolset_spec_norm = "msvc-{0}.{1:d}".format(re_match.group(1), minor_version)
elif self._sys_info.is_macosx():
pass
else:
......
......@@ -155,6 +155,7 @@ class CMakeLauncher(object):
'mgwmake': 'MinGW Makefiles',
'ninja': 'Ninja',
'xcode': 'Xcode',
'vs16': 'Visual Studio 16 2019',
'vs15': 'Visual Studio 15 2017',
'vs14': 'Visual Studio 14 2015',
'vs12': 'Visual Studio 12 2013',
......@@ -178,13 +179,30 @@ class CMakeLauncher(object):
'vs12': ['msvc-18.0', 'msvc-17.0', 'msvc-16.0'],
'vs11': ['msvc-17.0', 'msvc-16.0'],
'vs10': ['msvc-16.0']}
# vs15 has not a fixed compiler version and therefore the mapping is generated dynamically.
if self._msvc_registry.is_version_installed((14, 1)):
cl_version = self._msvc_registry.get_compiler_version((14, 1))
msvc_str = 'msvc-' + ver.version_tuple_to_str(cl_version[:2])
if cl_version[1] < 20:
self._dict_to_vs_platform_toolset[msvc_str] = 'v141'
self._dict_generator_alias_to_msvc_toolsets['vs15'] = [msvc_str, 'msvc-19.0', 'msvc-18.0', 'msvc-17.0', 'msvc-16.0']
if not self._msvc_registry.is_vs2019_toolset((14, 1)):
self._dict_generator_alias_to_msvc_toolsets['vs15'] = [msvc_str, 'msvc-19.0', 'msvc-18.0', 'msvc-17.0', 'msvc-16.0']
else:
assert False
# vs16 has not a fixed compiler version and therefore the mapping is generated dynamically.
if self._msvc_registry.is_version_installed((14, 2)):
cl_version = self._msvc_registry.get_compiler_version((14, 2))
msvc_str = 'msvc-' + ver.version_tuple_to_str(cl_version[:2])
if cl_version[1] < 30:
self._dict_to_vs_platform_toolset[msvc_str] = 'v142'
msvc_version_list = [msvc_str]
if self._msvc_registry.is_version_installed((14, 1)):
cl_version = self._msvc_registry.get_compiler_version((14, 1))
msvc_version_list.append("msvc-{0:d}.{1:d}".format(cl_version[0], cl_version[1]))
msvc_version_list.extend(['msvc-19.0', 'msvc-18.0', 'msvc-17.0', 'msvc-16.0'])
self._dict_generator_alias_to_msvc_toolsets['vs16'] = msvc_version_list
else:
assert False
......@@ -259,38 +277,43 @@ class CMakeLauncher(object):
vs_toolset = "Intel C++ Compiler %d.%d" % (compiler_info.version_major_minor[0], compiler_info.version_major_minor[1])
else:
assert False
cmake_argv = ['-G', self._dict_to_cmake_generator[generator_alias],
'-T', vs_toolset,
'-A', self._dict_to_vs_platform_name[compiler_info.target_arch]]
cmake_argv = ['-G', self._dict_to_cmake_generator[generator_alias]]
if generator_alias == 'vs16':
if ver.version_compare(compiler_info.version_major_minor, (19, 20)) < 0:
cmake_argv.extend(['-T', self._dict_to_vs_platform_toolset['msvc-' + ver.version_tuple_to_str(compiler_info.version_major_minor)]])
if compiler_info.target_arch != 'x86_64':
cmake_argv.extend(['-A', self._dict_to_vs_platform_name[compiler_info.target_arch]])
else:
cmake_argv.extend(['-T', vs_toolset, '-A', self._dict_to_vs_platform_name[compiler_info.target_arch]])
elif generator_alias == 'xcode':
cmake_argv = ['-G', self._dict_to_cmake_generator[generator_alias]]
elif generator_alias in ['umake', 'mgwmake', 'ninja']:
cmake_argv = ['-G', self._dict_to_cmake_generator[generator_alias],
'-DCMAKE_BUILD_TYPE=' + self._dict_to_cmake_config[cfg]]
'-DCMAKE_BUILD_TYPE:STRING=' + self._dict_to_cmake_config[cfg]]
if compiler_info.is_cross_compiler():
cmake_argv.append('-DCMAKE_TOOLCHAIN_FILE=' + compiler_info.cmake_toolchain_file)
cmake_argv.append('-DCMAKE_TOOLCHAIN_FILE:FILEPATH=' + compiler_info.cmake_toolchain_file)
else:
if compiler_info.cmake_cxx_compiler:
cmake_argv.append('-DCMAKE_CXX_COMPILER=' + compiler_info.cmake_cxx_compiler)
cmake_argv.append('-DCMAKE_CXX_COMPILER:FILEPATH=' + compiler_info.cmake_cxx_compiler)
if compiler_info.cmake_c_compiler:
cmake_argv.append('-DCMAKE_C_COMPILER=' + compiler_info.cmake_c_compiler)
cmake_argv.append('-DCMAKE_C_COMPILER:FILEPATH=' + compiler_info.cmake_c_compiler)
if cmake_argv_optional:
# Add any additional arguments to the cmake command line.
cmake_argv.extend(cmake_argv_optional)
if lnk_variant == 'shared':
cmake_argv.append('-DBUILD_SHARED_LIBS=1')
cmake_argv.append('-DBUILD_SHARED_LIBS:BOOL=ON')
if self._is_multi_configuration_generator():
cmake_config_types = [self._dict_to_cmake_config[x] for x in self._default_config_types]
for b_cfg in build_configs:
if b_cfg not in self._default_config_types:
cmake_config_types.append(self._dict_to_cmake_config[b_cfg])
cmake_argv.append('-DCMAKE_CONFIGURATION_TYPES=' + ';'.join(cmake_config_types))
cmake_argv.append('-DCMAKE_CONFIGURATION_TYPES:STRING=' + ';'.join(cmake_config_types))
# cmake_argv.append(self._top_dir)
# print("launch_config(): cmake_args", cmake_argv)
# print("build dir:", b_dir)
# print("top dir:", self._top_dir)
if (not self._sys_info.is_windows()) and (ver.version_compare(self._cmake_finder.get_cmake_version(), (3, 13, 0)) >= 0):
# Not done for windows yet avoiding potential issues with command line length limits.
if ver.version_compare(self._cmake_finder.get_cmake_version(), (3, 13, 0)) >= 0:
cmake_argv.extend(['-S', self._top_dir, '-B', b_dir])
retv = self.launch_cmake(cmake_argv)
else:
......@@ -410,9 +433,11 @@ class CMakeLauncher(object):
elif self._sys_info.get_platform() == 'macosx':
generator_alias = 'xcode'
elif self._sys_info.get_platform() == 'windows':
# e.g. 14.1, 14.0, 12.0 etc.
# e.g. 14.2, 14.1, 14.0, 12.0 etc.
bb_vs_latest_version = self._msvc_registry.get_latest_version()
if ver.version_compare(bb_vs_latest_version, (14,1)) == 0:
if ver.version_compare(bb_vs_latest_version, (14, 2)) == 0:
generator_alias = 'vs16'
elif ver.version_compare(bb_vs_latest_version, (14, 1)) == 0:
generator_alias = 'vs15'
else:
generator_alias = 'vs' + str(bb_vs_latest_version[0])
......@@ -565,8 +590,20 @@ class CMakeLauncher(object):
self._add_cmake_build_tool_options(cmake_argv, ['-parallelizeTargets', '-jobs', str(build_jobs)])
def _add_cmake_build_verbosity_option(self, cmake_argv, generator_alias, verbosity_level):
if generator_alias.startswith('vs'):
self._add_cmake_build_tool_options(cmake_argv, ['/verbosity:' + verbosity_level])
if verbosity_level == 'cmake':
cmake_version = self._cmake_finder.get_cmake_version()
if ver.version_compare(cmake_version, (3, 14)) >= 0:
# self._add_cmake_build_tool_options(cmake_argv, ['-v'])
# -v is a cmake option and not a build tool option and therefore
# it has to be inserted left of '--'
if '--' in cmake_argv:
index = cmake_argv.index('--')
cmake_argv.insert(index, '-v')
else:
cmake_argv.append('-v')
else:
if generator_alias.startswith('vs'):
self._add_cmake_build_tool_options(cmake_argv, ['/verbosity:' + verbosity_level])
def _add_cmake_build_tool_options(self, cmake_argv, build_tool_options):
if not build_tool_options:
......
......@@ -4,4 +4,4 @@
# Any manual changes here will be overridden by the next build.
#-------------
CMAKE_BUILD_VERSION_STR = "3.13.0.2"
CMAKE_BUILD_VERSION_STR = "3.14.4.4"
......@@ -98,18 +98,18 @@ class SystemInfo(object):
if self._os_arch == 'x86_64':
if self._python_arch == 'x86':
self._program_dir = os.getenv('PROGRAMW6432')
self._programx86_dir = os.getenv('PROGRAMFILES')
self._program_dir = os.path.normpath(os.getenv('PROGRAMW6432'))
self._programx86_dir = os.path.normpath(os.getenv('PROGRAMFILES'))
else:
self._program_dir = os.getenv('PROGRAMFILES')
self._programx86_dir = os.getenv('PROGRAMFILES(X86)')
self._program_dir = os.path.normpath(os.getenv('PROGRAMFILES'))
self._programx86_dir = os.path.normpath(os.getenv('PROGRAMFILES(X86)'))
assert self._programx86_dir is not None
elif self._os_arch == 'x86':
self._program_dir = os.getenv('PROGRAMFILES')
self._program_dir = os.path.normpath(os.getenv('PROGRAMFILES'))
else:
assert False
assert self._program_dir is not None
self._program_data_dir = os.getenv('PROGRAMDATA')
self._program_data_dir = os.path.normpath(os.getenv('PROGRAMDATA'))
if self._windows_msys:
pass
......@@ -315,8 +315,12 @@ class SystemInfo(object):
def get_path(self):
return self._search_path
def get_home_dir(self):
return self._home_dir
def get_home_dir(self, native=False):
if self.is_windows_msys() and native:
home_dir = os.path.normpath(os.path.expandvars('$USERPROFILE'))
else:
home_dir = self._home_dir
return home_dir
def get_default_proj_home_dir(self):
return self._default_proj_home_dir
......@@ -339,7 +343,7 @@ class SystemInfo(object):
def get_short_path(self, fpath):
if self.is_windows():
fpath = self.get_short_path_win(fpath)
fpath = os.path.normpath(self.get_short_path_win(fpath))
return fpath
def get_short_path_win(self, fpath):
......@@ -440,13 +444,13 @@ class SystemInfo(object):
# make sure the user's home directory exists
if not os.path.exists(home_dir):
raise Exception('home directory "' + home_dir + '" does not exist.')
self._home_dir = home_dir
self._