Commit 5547da95 authored by jamesxxiu's avatar jamesxxiu

sync to master

parent cff4f429
......@@ -70,9 +70,11 @@ if( OpenMP_FOUND )
endif()
# Enable warnings for some generators and toolsets.
bb_enable_warnings( gcc warnings-as-errors -Wno-sign-compare )
# bb_enable_warnings( gcc warnings-as-errors -Wno-sign-compare )
# bb_enable_warnings( gcc -Wno-unused-variable )
# bb_enable_warnings( gcc-4.8 warnings-as-errors -Wno-unused-variable )
# for gcc 8.2:
bb_enable_warnings( gcc warnings-as-errors -Wno-sign-compare -Wno-class-memaccess)
if( XCODE )
bb_enable_warnings( clang warnings-as-errors
......@@ -104,6 +106,7 @@ endif()
if( MSVC )
add_compile_options( "/MP" )
add_compile_options( "/EHsc" )
add_compile_options( "/MT" )
endif()
# set address sanitizer compiler arguments
......
......@@ -104,16 +104,21 @@ MTT : 1
EMT : 3
EMTFast : 3
NSST : 1
Affine : 1
HighPrecMv : 1
ALF : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
IMV : 2
ALF : 1
NSST : 1
CPR : 1
DMVR : 1
GBi : 1
GBiFast : 1
# Fast tools
PBIntraFast : 1
......
......@@ -106,13 +106,11 @@ EMT : 1
EMTFast : 1
Affine : 1
HighPrecMv : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1 # use CCLM only
DepQuant : 1
IMV : 2
ALF : 1
# Fast tools
......
......@@ -120,16 +120,21 @@ MTT : 1
EMT : 3
EMTFast : 3
NSST : 1
Affine : 1
HighPrecMv : 1
ALF : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
IMV : 2
ALF : 1
NSST : 1
CPR : 1
DMVR : 1
GBi : 1
GBiFast : 1
# Fast tools
PBIntraFast : 1
......
......@@ -122,13 +122,11 @@ EMT : 1
EMTFast : 1
Affine : 1
HighPrecMv : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1 # use CCLM only
DepQuant : 1
IMV : 2
ALF : 1
# Fast tools
......
......@@ -120,16 +120,21 @@ MTT : 1
EMT : 3
EMTFast : 3
NSST : 1
Affine : 1
HighPrecMv : 1
ALF : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
IMV : 2
ALF : 1
NSST : 1
CPR : 1
DMVR : 1
GBi : 1
GBiFast : 1
# Fast tools
PBIntraFast : 1
......
......@@ -122,13 +122,11 @@ EMT : 1
EMTFast : 1
Affine : 1
HighPrecMv : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1 # use CCLM only
DepQuant : 1
IMV : 2
ALF : 1
# Fast tools
......
......@@ -134,18 +134,23 @@ MTT : 1
EMT : 3
EMTFast : 3
NSST : 1
Affine : 1
HighPrecMv : 1
ALF : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1
DMVR : 1
IMV : 2
DepQuant : 1
IMV : 2
ALF : 1
NSST : 1
CPR : 1
DMVR : 1
BIO : 1
GBi : 1
GBiFast : 1
# Fast tools
PBIntraFast : 1
FastMrg : 1
......
......@@ -136,13 +136,11 @@ EMT : 1
EMTFast : 1
Affine : 1
HighPrecMv : 1
SubPuMvp : 1
MaxNumMergeCand : 6
LMChroma : 1 # use CCLM only
DepQuant : 1
IMV : 2
ALF : 1
# Fast tools
......@@ -150,7 +148,6 @@ PBIntraFast : 1
FastMrg : 1
AMaxBT : 1
### DO NOT ADD ANYTHING BELOW THIS LINE ###
### DO NOT DELETE THE EMPTY LINE BELOW ###
# ignore these Latex files
jctvcdoc.cls
*.aux
*.log
*.lot
*.out
*.toc
*~
No preview for this file type
......@@ -3021,4 +3021,226 @@ If the decoder is compiled with the macro RExt__DECODER_DEBUG_BIT_STATISTICS def
The Linux makefile will compile both the analyser and standard version when the `all' or `everything' target is used (where the latter will also build high-bit-depth executables).
\section{Block statistics extension}
\label{sec:block-stat-extens}
The block statistics extension enables straightforward visualization and statistical analysis of coding tool
usage in encoded bitstreams. The extension enables the reference
software encoder and decoder to write out statistics files in a configurable
way, which in turn can be loaded into a suitable YUV player for overlay of the
reconstructed YUV sequence, or can be used for statistical analysis at a
selectable scope (e.g. block/picture/sequence level). An example implementation
for such visualization is available with the open-source YUView player
(https://github.com/IENT/YUView).
\subsection{Usage}
\label{sec:usage}
The software has to be compiled with the macros ENABLE_TRACING and
K0149_BLOCK_STATISTICS defined as 1. The statistics can be written by either
encoder or decoder.
The extension adds additional trace channels to the ``dtrace'' functionality of
the software. The following trace channels were added:
\begin{description}
\item[D_BLOCK_STATISTICS_ALL] All syntax elements are written, no matter whether
they are actually encoded or derived.
\item[D_BLOCK_STATISTICS_CODED] Tries to write only syntax elements, which have
also been encoded.
\end{description}
The following additional encoder options are available (part of ``dtrace''). See
the file dtrace_next.h for more details.
\begin{OptionTableNoShorthand}{Decoder options}{tab:decoder-block-statistics}
\Option{TraceFile} &
%\ShortOption{\None} &
\Default{\None} &
File name of the produced trace file.
\\
\Option{TraceRule} &
%\ShortOption{-b} &
\Default{\NotSet} &
Specifies which traces should be saved, and for which POCs.
\\
\end{OptionTableNoShorthand}
Concrete examples of calls for generating a block statistics file are:
\begin{verbatim}
bin/DecoderAppStatic -b str/BasketballDrive_1920x1080_QP37.vvc \
--TraceFile="stats/BasketballDrive_1920x1080_QP37_coded.vtmbmsstats" \
--TraceRule="D_BLOCK_STATISTICS_CODED:poc>=0"
bin/DecoderAppStatic -b str/BasketballDrive_1920x1080_QP37.vvc \
--TraceFile="stats/BasketballDrive_1920x1080_QP37_all.vtmbmsstats" \
--TraceRule="D_BLOCK_STATISTICS_ALL:poc>=0"
\end{verbatim}
\subsection{Block statistics file formats}
\label{sec:block-stat-file}
The trace file will contain a header listing information of all available block
statistics. For each statistic it lists a type and a scale for vectors or range
for integers if applicable:
\begin{verbatim}
# VTMBMS Block Statistics
# Sequence size: [832x 480]
# Block Statistic Type: PredMode; Flag;
# Block Statistic Type: MergeFlag; Flag;
# Block Statistic Type: MVL0; Vector; Scale: 4
# Block Statistic Type: MVL1; Vector; Scale: 4
# Block Statistic Type: IPCM; Flag;
# Block Statistic Type: Y_IntraMode; Integer; [0, 73]
# Block Statistic Type: Cb_IntraMode; Integer; [0, 73]
\end{verbatim}
Two formats are available for the statistics for each block, a human readable
format and a CSV based format. The header remains the same for both cases.
For both formats each row contains the information for one block statistic. The
order of the data is: picture order count (POC), location of top left corner of
the block, size of the block, name of the statistic, and value of the
statistic.
The macro BLOCK_STATS_AS_CSV is available in order to choose the required format.
The human readable format can also be easily processed with other software, for
example YUView, using regular expressions. The CSV based formats provides the
universal interface required by spreadsheet applications.
The human readable format is based on the format used for the other dtrace
statistics. Some examples for this format are:
\begin{verbatim}
BlockStat: POC 16 @( 112, 0) [ 8x 8] SkipFlag=1
BlockStat: POC 16 @( 112, 0) [ 8x 8] InterDir=1
BlockStat: POC 16 @( 112, 0) [ 8x 8] MergeFlag=1
BlockStat: POC 16 @( 112, 0) [ 8x 8] MergeIdx=0
BlockStat: POC 16 @( 112, 0) [ 8x 8] MergeType=0
BlockStat: POC 16 @( 112, 0) [ 8x 8] MVPIdxL0=255
BlockStat: POC 16 @( 112, 0) [ 8x 8] MVPNumL0=255
BlockStat: POC 16 @( 112, 0) [ 8x 8] RefIdxL0=0
BlockStat: POC 16 @( 112, 0) [ 8x 8] MVDL0={ 0, 0}
BlockStat: POC 16 @( 112, 0) [ 8x 8] MVL0={ -70, 18}
BlockStat: POC 16 @( 112, 8) [ 8x 8] PredMode=0
BlockStat: POC 16 @( 112, 8) [ 8x 8] PartSize=0
\end{verbatim}
Some examples of the CSV based format are:
\begin{verbatim}
BlockStat;16; 112; 0; 8; 8;SkipFlag;1
BlockStat;16; 112; 0; 8; 8;InterDir;1
BlockStat;16; 112; 0; 8; 8;MergeFlag;1
BlockStat;16; 112; 0; 8; 8;MergeIdx;0
BlockStat;16; 112; 0; 8; 8;MergeType;0
BlockStat;16; 112; 0; 8; 8;MVPIdxL0;255
BlockStat;16; 112; 0; 8; 8;MVPNumL0;255
BlockStat;16; 112; 0; 8; 8;RefIdxL0;0
BlockStat;16; 112; 0; 8; 8;MVDL0; 0; 0
BlockStat;16; 112; 0; 8; 8;MVL0; -70; 18
BlockStat;16; 112; 8; 8; 8;PredMode;0
BlockStat;16; 112; 8; 8; 8;PartSize;0
\end{verbatim}
\subsection{Visualization}
\label{sec:visualization}
The block statistics can be viewed with YUView, which is freely available under
GPLv3: \url{https://github.com/IENT/YUView}. The latest releases and the master
branch have the functionality required for viewing the block statistics. YUView
assumes that the file extension of block statistics file is
“.vtmbmsstats”. However, if a file is not recognized you can choose from a list
of supported file formats.
Statistics can be overlaid with YUV sequences. Some example snapshots are:
\begin{figure}[htpb]
\centering
\includegraphics[width=0.8\linewidth]{figures/YUView}
\caption{YUView}
\label{fig:yuview}
\end{figure}
\begin{figure}[htpb]
\centering
\includegraphics[width=0.5\linewidth]{figures/raceHorsesShot2MotionVectors}
\caption{Motion vectors}
\label{fig:motion-vectors}
\end{figure}
\begin{figure}[htpb]
\centering
\includegraphics[width=0.5\linewidth]{figures/raceHorsesShot3SkipFlag}
\caption{Skip flag}
\label{fig:skip-flag}
\end{figure}
\subsection{Adding statistics}
\label{sec:adding-statistics}
In order to add further block statistics, do the following:
\begin{description}
\item[source/Lib/CommonLib/dtrace_blockstatistics.h]
Add your statistic to the BlockStatistic enum:
\begin{verbatim}
enum class BlockStatistic {
// general
PredMode,
PartSize,
Depth,
\end{verbatim}
Further, add your statistic to the map blockstatistic2description:
\begin{verbatim}
static const std::map<BlockStatistic,
std::tuple<std::string, BlockStatisticType, std::string>>
blockstatistic2description =
{
{ BlockStatistic::PredMode,
std::tuple<std::string, BlockStatisticType, std::string>
{"PredMode", BlockStatisticType::Flag, ""}},
{ BlockStatistic::MergeFlag,
std::tuple<std::string, BlockStatisticType, std::string>
{"MergeFlag", BlockStatisticType::Flag, ""}},
{ BlockStatistic::MVL0,
std::tuple<std::string, BlockStatisticType, std::string>
{"MVL0", BlockStatisticType::Vector, "Scale: 4"}},
YOURS
\end{verbatim}
\item[source/Lib/CommonLib/dtrace_blockstatistics.cpp] All code for
writing syntax elements is kept in this file in
getAndStoreBlockStatistics. This function is called once for each
CTU, after it has been en/decoded. The following macros have been
defined to facilitate writing of block statistics:
\begin{verbatim}
DTRACE_BLOCK_SCALAR(ctx,channel,cs_cu_pu,stat_type,val)
DTRACE_BLOCK_SCALAR_CHROMA(ctx,channel,cs_cu_pu,stat_type,val)
DTRACE_BLOCK_VECTOR(ctx,channel,cu_pu,stat_type,v_x,v_y)
DTRACE_BLOCK_AFFINETF(ctx,channel,pu,stat_type,v_x0,v_y0,v_x1,v_y1,v_x2,v_y2)
\end{verbatim}
An example:
\begin{verbatim}
DTRACE_BLOCK_SCALAR(g_trace_ctx, D_BLOCK_STATISTICS_ALL,
cu, GetBlockStatisticName(BlockStatistic::PredMode), cu.predMode);
\end{verbatim}
\item[Block statistics for debugging] The statistics can also be used
to write out other data, not just syntax elements. Add your
statistics to dtrace_blockstatistics.h. Where it should be used the
following headers have to be included:
\begin{verbatim}
#include "dtrace_next.h"
#include "dtrace_blockstatistics.h"
\end{verbatim}
\end{description}
\end{document}
......@@ -121,6 +121,10 @@ uint32_t DecApp::decode()
* requires the DecApp::decode() method to be called again with the same
* nal unit. */
#if RExt__DECODER_DEBUG_STATISTICS
CodingStatistics& stat = CodingStatistics::GetSingletonInstance();
CHECK(m_statMode < STATS__MODE_NONE || m_statMode > STATS__MODE_ALL, "Wrong coding statistics output mode");
stat.m_mode = m_statMode;
CodingStatistics::CodingStatisticsData* backupStats = new CodingStatistics::CodingStatisticsData(CodingStatistics::GetStatistics());
#endif
......@@ -210,6 +214,11 @@ uint32_t DecApp::decode()
}
}
if (m_packedYUVMode && (m_outputBitDepth[CH_L] != 10 && m_outputBitDepth[CH_L] != 12))
{
EXIT ("Invalid output bit-depth for packed YUV output, aborting\n");
}
m_cVideoIOYuvReconFile.open( m_reconFileName, true, m_outputBitDepth, m_outputBitDepth, bitDepths.recon ); // write mode
openedReconFile = true;
}
......@@ -279,9 +288,9 @@ void DecApp::xCreateDecLib()
m_cDecLib.create();
// initialize decoder class
m_cDecLib.init(
m_cDecLib.init(
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
m_cacheCfgFile
m_cacheCfgFile
#endif
);
m_cDecLib.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
......@@ -394,11 +403,13 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId )
if (display)
{
m_cVideoIOYuvReconFile.write( pcPicTop->getRecoBuf(), pcPicBottom->getRecoBuf(),
m_outputColourSpaceConvert,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff );
m_outputColourSpaceConvert,
false, // TODO: m_packedYUVMode,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
NUM_CHROMA_FORMAT, isTff );
}
}
......@@ -445,6 +456,7 @@ void DecApp::xWriteOutput( PicList* pcListPic, uint32_t tId )
m_cVideoIOYuvReconFile.write( pcPic->getRecoBuf(),
m_outputColourSpaceConvert,
m_packedYUVMode,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
......@@ -502,15 +514,18 @@ void DecApp::xFlushOutput( PicList* pcListPic )
// write to file
if ( !m_reconFileName.empty() )
{
const Window &conf = pcPicTop->cs->sps->getConformanceWindow();
const Window &conf = pcPicTop->cs->sps->getConformanceWindow();
const Window defDisp = (m_respectDefDispWindow && pcPicTop->cs->sps->getVuiParametersPresentFlag()) ? pcPicTop->cs->sps->getVuiParameters()->getDefaultDisplayWindow() : Window();
const bool isTff = pcPicTop->topField;
const bool isTff = pcPicTop->topField;
m_cVideoIOYuvReconFile.write( pcPicTop->getRecoBuf(), pcPicBottom->getRecoBuf(),
m_outputColourSpaceConvert,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), NUM_CHROMA_FORMAT, isTff );
m_outputColourSpaceConvert,
false, // TODO: m_packedYUVMode,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
NUM_CHROMA_FORMAT, isTff );
}
// update POC of display order
......@@ -560,6 +575,7 @@ void DecApp::xFlushOutput( PicList* pcListPic )
m_cVideoIOYuvReconFile.write( pcPic->getRecoBuf(),
m_outputColourSpaceConvert,
m_packedYUVMode,
conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
......
......@@ -96,6 +96,7 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] )
("SEIColourRemappingInfoFilename", m_colourRemapSEIFileName, string(""), "Colour Remapping YUV output file name. If empty, no remapping is applied (ignore SEI message)\n")
("OutputDecodedSEIMessagesFilename", m_outputDecodedSEIMessagesFilename, string(""), "When non empty, output decoded SEI messages to the indicated file. If file is '-', then output to stdout\n")
("ClipOutputVideoToRec709Range", m_bClipOutputVideoToRec709Range, false, "If true then clip output video to the Rec. 709 Range on saving")
("PYUV", m_packedYUVMode, false, "If true then output 10-bit and 12-bit YUV data as 5-byte and 3-byte (respectively) packed YUV data. Ignored for interlaced output.")
#if ENABLE_TRACING
("TraceChannelsList", bTracingChannelsList, false, "List all available tracing channels" )
("TraceRule", sTracingRule, string( "" ), "Tracing rule (ex: \"D_CABAC:poc==8\" or \"D_REC_CB_LUMA:poc==8\")" )
......@@ -103,6 +104,13 @@ bool DecAppCfg::parseCfg( int argc, char* argv[] )
#endif
#if JVET_J0090_MEMORY_BANDWITH_MEASURE
("CacheCfg", m_cacheCfgFile, string( "" ), "CacheCfg File" )
#endif
#if RExt__DECODER_DEBUG_STATISTICS
("Stats", m_statMode, 3, "Control decoder debugging statistic output mode\n"
"\t0: disable statistic\n"
"\t1: enable bit statistic\n"
"\t2: enable tool statistic\n"
"\t3: enable bit and tool statistic\n")
#endif
;
......@@ -220,6 +228,8 @@ DecAppCfg::DecAppCfg()
, m_respectDefDispWindow(0)
, m_outputDecodedSEIMessagesFilename()
, m_bClipOutputVideoToRec709Range(false)
, m_packedYUVMode(false)
, m_statMode(0)
{
for (uint32_t channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++)
{
......
......@@ -70,7 +70,9 @@ protected:
int m_respectDefDispWindow; ///< Only output content inside the default display window
std::string m_outputDecodedSEIMessagesFilename; ///< filename to output decoded SEI messages to. If '-', then use stdout. If empty, do not output details.
bool m_bClipOutputVideoToRec709Range; ///< If true, clip the output video to the Rec 709 range on saving.
bool m_packedYUVMode; ///< If true, output 10-bit and 12-bit YUV data as 5-byte and 3-byte (respectively) packed YUV data
std::string m_cacheCfgFile; ///< Config file of cache model
int m_statMode; ///< Config statistic mode (0 - bit stat, 1 - tool stat, 3 - both)
public:
DecAppCfg();
......
......@@ -300,6 +300,22 @@ void EncApp::xInitLibCfg()
#if JEM_TOOLS
m_cEncLib.setUseDMVR ( m_DMVR );
m_cEncLib.setMDMS ( m_MDMS );
#endif
#if JVET_K0157
m_cEncLib.setUseCompositeRef ( m_compositeRefEnabled );
#endif
#if JVET_K0076_CPR
m_cEncLib.setIBCMode ( m_IBCMode );
m_cEncLib.setIBCLocalSearchRangeX ( m_IBCLocalSearchRangeX );
m_cEncLib.setIBCLocalSearchRangeY ( m_IBCLocalSearchRangeY );
m_cEncLib.setIBCHashSearch ( m_IBCHashSearch );
m_cEncLib.setIBCHashSearchMaxCand ( m_IBCHashSearchMaxCand );
m_cEncLib.setIBCHashSearchRange4SmallBlk ( m_IBCHashSearchRange4SmallBlk );
m_cEncLib.setIBCFastMethod ( m_IBCFastMethod );
#endif
#if JVET_K0248_GBI
m_cEncLib.setUseGBi ( m_GBi );
m_cEncLib.setUseGBiFast ( m_GBiFast);
#endif
// ADD_NEW_TOOL : (encoder app) add setting of tool enabling flags and associated parameters here
......@@ -602,6 +618,17 @@ void EncApp::xCreateLib( std::list<PelUnitBuf*>& recBufList
#endif
if (!m_reconFileName.empty())
{
if (m_packedYUVMode && ((m_outputBitDepth[CH_L] != 10 && m_outputBitDepth[CH_L] != 12)
|| ((m_iSourceWidth & (1 + (m_outputBitDepth[CH_L] & 3))) != 0)))
{
EXIT ("Invalid output bit-depth or image width for packed YUV output, aborting\n");
}
if (m_packedYUVMode && (m_chromaFormatIDC != CHROMA_400) && ((m_outputBitDepth[CH_C] != 10 && m_outputBitDepth[CH_C] != 12)
|| (((m_iSourceWidth / SPS::getWinUnitX (m_chromaFormatIDC)) & (1 + (m_outputBitDepth[CH_C] & 3))) != 0)))
{
EXIT ("Invalid chroma output bit-depth or image width for packed YUV output, aborting\n");
}
m_cVideoIOYuvReconFile.open(m_reconFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode
}
......@@ -790,7 +817,10 @@ void EncApp::xWriteOutput( int iNumEncoded, std::list<PelUnitBuf*>& recBufList
if (!m_reconFileName.empty())
{
m_cVideoIOYuvReconFile.write( *pcPicYuvRecTop, *pcPicYuvRecBottom, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_isTopFieldFirst );
m_cVideoIOYuvReconFile.write( *pcPicYuvRecTop, *pcPicYuvRecBottom,
ipCSC,
false, // TODO: m_packedYUVMode,
m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_isTopFieldFirst );
}
}
}
......@@ -802,7 +832,9 @@ void EncApp::xWriteOutput( int iNumEncoded, std::list<PelUnitBuf*>& recBufList
if (!m_reconFileName.empty())
{
m_cVideoIOYuvReconFile.write( *pcPicYuvRec,
ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range );
ipCSC,
m_packedYUVMode,
m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_bClipOutputVideoToRec709Range );
}
}
}
......
This diff is collapsed.
......@@ -115,6 +115,7 @@ protected:
bool m_cabacZeroWordPaddingEnabled;
bool m_bClipInputVideoToRec709Range;
bool m_bClipOutputVideoToRec709Range;
bool m_packedYUVMode; ///< If true, output 10-bit and 12-bit YUV data as 5-byte and 3-byte (respectively) packed YUV data
// profile/level
Profile::Name m_profile;
......@@ -281,6 +282,22 @@ protected:
#if JEM_TOOLS
bool m_DMVR;
bool m_MDMS;
#endif
#if JVET_K0157
bool m_compositeRefEnabled;
#endif
#if JVET_K0076_CPR
unsigned m_IBCMode;
unsigned m_IBCLocalSearchRangeX;
unsigned m_IBCLocalSearchRangeY;
unsigned m_IBCHashSearch;
unsigned m_IBCHashSearchMaxCand;
unsigned m_IBCHashSearchRange4SmallBlk;
unsigned m_IBCFastMethod;
#endif
#if JVET_K0248_GBI
bool m_GBi;
bool m_GBiFast;
#endif
// ADD_NEW_TOOL : (encoder app) add tool enabling flags and associated parameters here
......@@ -338,7 +355,7 @@ protected:
int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture
bool m_saoCtuBoundary; ///< SAO parameter estimation using non-deblocked pixels for CTU bottom and right boundary areas
#if K0238_SAO_GREEDY_MERGE_ENCODING
bool m_saoGreedyMergeEnc; ///< SAO greedy merge encoding algorithm
bool m_saoGreedyMergeEnc; ///< SAO greedy merge encoding algorithm
#endif
// coding tools (loop filter)
bool m_bLoopFilterDisable; ///< flag for using deblocking filter
......
......@@ -27,6 +27,9 @@ file( GLOB AVX2_SRC_FILES "../CommonLib/x86/avx2/*.cpp" )
# get sse4.1 source files
file( GLOB SSE41_SRC_FILES "../CommonLib/x86/sse41/*.cpp" )
# get sse4.2 source files
file( GLOB SSE42_SRC_FILES "../CommonLib/x86/sse42/*.cpp" )
# get libmd5 source files
file( GLOB MD5_SRC_FILES "../libmd5/*.cpp" )
......@@ -35,7 +38,7 @@ file( GLOB MD5_INC_FILES "../libmd5/*.h" )
# get all source files
set( SRC_FILES ${BASE_SRC_FILES} ${X86_SRC_FILES} ${SSE41_SRC_FILES} ${AVX_SRC_FILES} ${AVX2_SRC_FILES} ${MD5_SRC_FILES} )
set( SRC_FILES ${BASE_SRC_FILES} ${X86_SRC_FILES} ${SSE41_SRC_FILES} ${SSE42_SRC_FILES} ${AVX_SRC_FILES} ${AVX2_SRC_FILES} ${MD5_SRC_FILES} )
# get all include files
set( INC_FILES ${BASE_INC_FILES} ${X86_INC_FILES} ${MD5_INC_FILES} )
......@@ -86,6 +89,7 @@ target_link_libraries( ${LIB_NAME} Threads::Threads )
# set needed compile definitions
set_property( SOURCE ${SSE41_SRC_FILES} APPEND PROPERTY COMPILE_DEFINITIONS USE_SSE41 )
set_property( SOURCE ${SSE42_SRC_FILES} APPEND PROPERTY COMPILE_DEFINITIONS USE_SSE42 )
set_property( SOURCE ${AVX_SRC_FILES} APPEND PROPERTY COMPILE_DEFINITIONS USE_AVX )
set_property( SOURCE ${AVX2_SRC_FILES} APPEND PROPERTY COMPILE_DEFINITIONS USE_AVX2 )
# set needed compile flags
......@@ -94,6 +98,7 @@ if( MSVC )
set_property( SOURCE ${AVX2_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS "/arch:AVX2" )
elseif( UNIX )
set_property( SOURCE ${SSE41_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS "-msse4.1" )
set_property( SOURCE ${SSE42_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS "-msse4.2" )
set_property( SOURCE ${AVX_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS "-mavx" )
set_property( SOURCE ${AVX2_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS "-mavx2" )
endif()
......
......@@ -217,19 +217,25 @@ void AdaptiveLoopFilter::create( const int picWidth, const int picHeight, const