Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port v1.12.1-rc1 to master #446

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ if( NOT CMAKE_VERSION VERSION_LESS 3.13.0 )
endif()

# project name
project( vvenc VERSION 1.12.0 )
project( vvenc VERSION 1.12.1 )

# set alternative version numbering for release candidates
#set( PROJECT_VERSION_RC rc1 )
set( PROJECT_VERSION_RC rc1 )
if( PROJECT_VERSION_RC )
set( PROJECT_VERSION "${PROJECT_VERSION}-${PROJECT_VERSION_RC}" )
endif()
Expand Down
28 changes: 28 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
/////////////////////////////////////////
tag 1.12.1

* libvvenc:
- changed parameters (vvenc_config::) for proper VUI signalization:
- m_aspectRatioIdc=1 per default (sar 1x1)
- m_chromaLocInfoPresent=-1 and m_chromaSampleLocType=-1 per default (auto behavior depending on HDR/SDR mode)
m_chromaSampleLocType is auto set, depending on m_horCollocatedChromaFlag and m_verCollocatedChromaFlag
m_chromaLocInfoPresent=1 and m_chromaSampleLocType=2 for VVENC_HDR_PQ, VVENC_HDR_PQ_BT2020,
VVENC_HDR_HLG, VVENC_HDR_HLG_BT2020, VVENC_SDR_BT2020
else m_chromaLocInfoPresent=0 and m_chromaSampleLocType=0
- m_aspectRatioInfoPresent flag is auto on, if m_aspectRatioIdc>0 or non-default Sar is given
- m_overscanInfoPresent flag is auto on, when m_overscanAppropriateFlag is enabled
- m_chromaSampleLocTypeTopField and m_chromaSampleLocTypeBottomField unused now (will be removed in next major release)
- VUI defaults changed:
- progressiveSourceFlag=1
- nonPackedFlag=1
- nonProjectedFlag=1

* vvencFFapp:
- added parameters:
- Sar: specify Sample aspect ratio - ratio of width to height (WidthxHeight)
- removed unused parameter: ChromaSampleLocTypeTopField, ChromaSampleLocTypeBottomField
- changed parameter section:
- cleanup section "VUI and SEI options" into separate sections:
"HDR/SDR and Color Options", "SEI and auxiliary options", "VUI options"
- "ChromaLocInfoPresent" is now auto behavior "Signals whether chroma_sample_loc_type is present (-1: auto, 0: off, 1: on)")

/////////////////////////////////////////
tag 1.12.0

Expand Down
2 changes: 1 addition & 1 deletion include/vvenc/vvencCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ typedef struct vvenc_config
int m_colourPrimaries; // Indicates chromaticity coordinates of the source primaries
int m_transferCharacteristics; // Indicates the opto-electronic transfer characteristics of the source
int m_matrixCoefficients; // Describes the matrix coefficients used in deriving luma and chroma from RGB primaries
bool m_chromaLocInfoPresent; // Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present
int8_t m_chromaLocInfoPresent; // Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present
int m_chromaSampleLocTypeTopField; // Specifies the location of chroma samples for top field
int m_chromaSampleLocTypeBottomField; // Specifies the location of chroma samples for bottom field
int m_chromaSampleLocType; // Specifies the location of chroma samples for progressive content
Expand Down
6 changes: 3 additions & 3 deletions source/Lib/CommonLib/Slice.h
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,10 @@ struct VUI
uint32_t chromaSampleLocType;

VUI()
: progressiveSourceFlag (false)
: progressiveSourceFlag (true)
, interlacedSourceFlag (false)
, nonPackedFlag (false)
, nonProjectedFlag (false)
, nonPackedFlag (true)
, nonProjectedFlag (true)
, aspectRatioInfoPresent (false) //TODO: This initialiser list contains magic numbers
, aspectRatioConstantFlag (false)
, aspectRatioIdc (0)
Expand Down
4 changes: 2 additions & 2 deletions source/Lib/EncoderLib/EncGOP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,9 +1016,9 @@ void EncGOP::xInitSPS(SPS &sps) const
vui.transferCharacteristics = m_pcEncCfg->m_transferCharacteristics;
vui.matrixCoefficients = m_pcEncCfg->m_matrixCoefficients;
vui.chromaLocInfoPresent = m_pcEncCfg->m_chromaLocInfoPresent;
vui.chromaSampleLocTypeTopField = m_pcEncCfg->m_chromaSampleLocTypeTopField;
vui.chromaSampleLocTypeBottomField= m_pcEncCfg->m_chromaSampleLocTypeBottomField;
vui.chromaSampleLocType = m_pcEncCfg->m_chromaSampleLocType;
vui.chromaSampleLocTypeTopField = 0;
vui.chromaSampleLocTypeBottomField= 0;
vui.overscanInfoPresent = m_pcEncCfg->m_overscanInfoPresent;
vui.overscanAppropriateFlag = m_pcEncCfg->m_overscanAppropriateFlag;
vui.videoFullRangeFlag = m_pcEncCfg->m_videoFullRangeFlag;
Expand Down
49 changes: 28 additions & 21 deletions source/Lib/apputils/VVEncAppCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ int parse( int argc, char* argv[], vvenc_config* c, std::ostream& rcOstr )
IStreamToFunc<vvencPresetMode> toPreset ( setPresets, this, c, &PresetToEnumMap,vvencPresetMode::VVENC_MEDIUM);
IStreamToRefVec<int> toSourceSize ( { &c->m_SourceWidth, &c->m_SourceHeight }, true, 'x' );
IStreamToRefVec<int> toMaxPicSize ( { &c->m_maxPicWidth, &c->m_maxPicHeight }, true, 'x' );
IStreamToRefVec<int> toSarSize ( { &c->m_sarWidth, &c->m_sarHeight }, true, 'x' );
IStreamToRefVec<int> toFps ( { &c->m_FrameRate, &c->m_FrameScale }, false, '/' );

IStreamToEnum<vvencProfile> toProfile ( &c->m_profile, &ProfileToEnumMap );
Expand Down Expand Up @@ -576,6 +577,7 @@ int parse( int argc, char* argv[], vvenc_config* c, std::ostream& rcOstr )

IStreamToEnum<int8_t> toUseWpp ( &c->m_entropyCodingSyncEnabled, &FlagToIntMap<int8_t> );
IStreamToEnum<int8_t> toUseIfp ( &c->m_ifp, &FlagToIntMap<int8_t> );
IStreamToEnum<int8_t> toChromaLocInfo ( &c->m_chromaLocInfoPresent, &FlagToIntMap<int8_t> );
IStreamToEnum<int8_t> toMtProfile ( &c->m_mtProfile, &MtAbrevToIntMap );

po::Options opts;
Expand Down Expand Up @@ -720,9 +722,9 @@ int parse( int argc, char* argv[], vvenc_config* c, std::ostream& rcOstr )
("Tier", toLevelTier, "tier for interpretation of level (main, high)")
;

opts.setSubSection("HDR/SDR and Color Options");
if( m_easyMode )
{
opts.setSubSection("HDR/SDR and Color Options");
opts.addOptions()
("sdr", toSDRMode, "set SDR mode + BT.709, BT.2020, BT.470 color space. "
"use: off, sdr|sdr_709, sdr_2020, sdr_470bg")
Expand All @@ -732,13 +734,15 @@ int parse( int argc, char* argv[], vvenc_config* c, std::ostream& rcOstr )
}
else
{
opts.setSubSection("VUI and SEI options");
opts.addOptions()
("Sdr", toSDRMode, "set SDR mode + BT.709, BT.2020, BT.470 color space. "
"use: off, sdr|sdr_709, sdr_2020, sdr_470bg")
("Hdr", toHDRMode, "set HDR mode + BT.709 or BT.2020 color space (+SEI messages for hlg) "
"If maxcll or masteringdisplay is set, HDR10/PQ is enabled. use: off, pq|hdr10, pq_2020|hdr10_2020, hlg, hlg_2020")
;

opts.setSubSection("SEI and auxiliary options");
opts.setSubSection("VUI options");
}


Expand Down Expand Up @@ -996,20 +1000,35 @@ int parse( int argc, char* argv[], vvenc_config* c, std::ostream& rcOstr )
("SaoChromaOffsetBitShift", c->m_saoOffsetBitShift[ 1 ], "Specify the chroma SAO bit-shift. If negative, automatically calculate a suitable value based upon bit depth and initial QP")
;

opts.setSubSection("VUI and SEI options");
opts.setSubSection("SEI and auxiliary options");
opts.addOptions()
("SEIDecodedPictureHash,-dph", toHashType, "Control generation of decode picture hash SEI messages, (0:off, 1:md5, 2:crc, 3:checksum)" )
("SEIBufferingPeriod", c->m_bufferingPeriodSEIEnabled, "Control generation of buffering period SEI messages")
("SEIPictureTiming", c->m_pictureTimingSEIEnabled, "Control generation of picture timing SEI messages")
("SEIDecodingUnitInfo", c->m_decodingUnitInfoSEIEnabled, "Control generation of decoding unit information SEI message.")
("MasteringDisplayColourVolume", toMasteringDisplay, "SMPTE ST 2086 mastering display colour volume info SEI (HDR), "
"vec(uint) size 10, x,y,x,y,x,y,x,y,max,min where: \"G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)\""
"range: 0 <= GBR,WP <= 50000, 0 <= L <= uint; GBR xy coordinates in increment of 1/50000, min/max luminance in units of 1/10000 cd/m2" )
("MaxContentLightLevel", toContentLightLevel, "Specify content light level info SEI as \"cll,fall\" (HDR) max. content light level, "
"max. frame average light level, range: 1 <= cll,fall <= 65535'")
("PreferredTransferCharacteristics", toPrefTransferCharacteristics, "Specify preferred transfer characteristics SEI and overwrite transfer entry in VUI (0-18): reserved, bt709, unknown, empty, bt470m, bt470bg, smpte170m, "
"smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, "
"bt2020-10, bt2020-12, smpte2084, smpte428, arib-std-b67")
("AccessUnitDelimiter,-aud", toAud, "Enable Access Unit Delimiter NALUs (-1: auto, 0: off, 1: on; default: auto - enable only if needed by dependent options)" , true)
("HrdParametersPresent,-hrd", c->m_hrdParametersPresent, "Enable generation of hrd_parameters() (0: off, 1: on)")
("EnableDecodingParameterSet", c->m_decodingParameterSetEnabled, "Enable writing of Decoding Parameter Set")
("AccessUnitDelimiter,-aud", toAud, "Enable Access Unit Delimiter NALUs, (default: auto - enable only if needed by dependent options)" , true)
("VuiParametersPresent,-vui", toVui, "Enable generation of vui_parameters(), (default: auto - enable only if needed by dependent options)", true)
("HrdParametersPresent,-hrd", c->m_hrdParametersPresent, "Enable generation of hrd_parameters(), (0: off, 1: on; default: 1)")
;

opts.setSubSection("VUI options");
opts.addOptions()
("VuiParametersPresent,-vui", toVui, "Enable generation of vui_parameters() (-1: auto, 0: off, 1: on; default: auto - enable only if needed by dependent options)", true)
("AspectRatioInfoPresent", c->m_aspectRatioInfoPresent, "Signals whether aspect_ratio_idc is present")
("AspectRatioIdc", c->m_aspectRatioIdc, "aspect_ratio_idc")
("AspectRatioIdc", c->m_aspectRatioIdc, "Aspect ratio idc (0-16,255) 0=undef, 1=1:1, 2=12:11, 3=10:11, 4=16:11, 5=40:33, 6=24:11, 7=20:11, 8=32:11, 9=80:33, 10=18:11, 11=15:11, 12=64:33, "
"13=160:99, 14=4:3, 15=3:2, 16=2:1")
("Sar", toSarSize, "Sample aspect ratio - ratio of width to height (WidthxHeight)")
("SarWidth", c->m_sarWidth, "horizontal size of the sample aspect ratio")
("SarHeight", c->m_sarHeight, "vertical size of the sample aspect ratio")

("ColourDescriptionPresent", c->m_colourDescriptionPresent, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present")
("ColourPrimaries", toColorPrimaries, "Specify color primaries (0-13): reserved, bt709, unknown, empty, bt470m, bt470bg, smpte170m, "
"smpte240m, film, bt2020, smpte428, smpte431, smpte432")
Expand All @@ -1020,23 +1039,11 @@ int parse( int argc, char* argv[], vvenc_config* c, std::ostream& rcOstr )
("MatrixCoefficients", toColorMatrix, "Specify color matrix setting to derive luma/chroma from RGB primaries (0-14): gbr, bt709, unknown, empty, fcc, bt470bg, smpte170m, "
"smpte240m, ycgco, bt2020nc, bt2020c, smpte2085, chroma-derived-nc, chroma-derived-c, ictcp")

("ChromaLocInfoPresent", c->m_chromaLocInfoPresent, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present")
("ChromaSampleLocTypeTopField", c->m_chromaSampleLocTypeTopField, "Specifies the location of chroma samples for top field")
("ChromaSampleLocTypeBottomField", c->m_chromaSampleLocTypeBottomField, "Specifies the location of chroma samples for bottom field")
("ChromaSampleLocType", c->m_chromaSampleLocType, "Specifies the location of chroma samples for progressive content")
("ChromaLocInfoPresent", toChromaLocInfo, "Signals whether chroma_sample_loc_type is present (-1: auto, 0: off, 1: on)")
("ChromaSampleLocType", c->m_chromaSampleLocType, "Specifies the location of chroma samples for progressive content(-1 auto, 0-5 Chroma420LocType)")
("OverscanInfoPresent", c->m_overscanInfoPresent, "Indicates whether conformant decoded pictures are suitable for display using overscan")
("OverscanAppropriate", c->m_overscanAppropriateFlag, "Indicates whether conformant decoded pictures are suitable for display using overscan")
("VideoFullRange", c->m_videoFullRangeFlag, "Indicates the black level and range of luma and chroma signals")


("MasteringDisplayColourVolume", toMasteringDisplay, "SMPTE ST 2086 mastering display colour volume info SEI (HDR), "
"vec(uint) size 10, x,y,x,y,x,y,x,y,max,min where: \"G(x,y)B(x,y)R(x,y)WP(x,y)L(max,min)\""
"range: 0 <= GBR,WP <= 50000, 0 <= L <= uint; GBR xy coordinates in increment of 1/50000, min/max luminance in units of 1/10000 cd/m2" )
("MaxContentLightLevel", toContentLightLevel, "Specify content light level info SEI as \"cll,fall\" (HDR) max. content light level, "
"max. frame average light level, range: 1 <= cll,fall <= 65535'")
("PreferredTransferCharacteristics", toPrefTransferCharacteristics, "Specify preferred transfer characteristics SEI and overwrite transfer entry in VUI (0-18): reserved, bt709, unknown, empty, bt470m, bt470bg, smpte170m, "
"smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, "
"bt2020-10, bt2020-12, smpte2084, smpte428, arib-std-b67")
;

opts.setSubSection("Summary options (debugging)");
Expand Down
Loading